001// Generated by delombok at Fri Oct 09 16:27:16 CEST 2020
002/*
003 * Copyright (c) 2010-2020 Mark Allen, Norbert Bartels.
004 *
005 * Permission is hereby granted, free of charge, to any person obtaining a copy
006 * of this software and associated documentation files (the "Software"), to deal
007 * in the Software without restriction, including without limitation the rights
008 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
009 * copies of the Software, and to permit persons to whom the Software is
010 * furnished to do so, subject to the following conditions:
011 *
012 * The above copyright notice and this permission notice shall be included in
013 * all copies or substantial portions of the Software.
014 *
015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
016 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
017 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
018 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
019 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
020 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
021 * THE SOFTWARE.
022 */
023package com.restfb.types;
024
025import static java.util.Collections.unmodifiableList;
026import java.util.ArrayList;
027import java.util.List;
028import com.restfb.Facebook;
029import com.restfb.JsonMapper;
030import com.restfb.types.ads.AppLinks;
031import com.restfb.types.features.HasCover;
032import com.restfb.types.features.HasProfilePicture;
033
034/**
035 * Represents the <a href="https://developers.facebook.com/docs/places/fields">SearchPlace</a>
036 */
037public class SearchPlace extends NamedFacebookType implements HasProfilePicture, HasCover {
038  /**
039   * Information about the Place provided by the Page administrator.
040   */
041  @Facebook
042  private String about;
043  /**
044   * AppLinks to the Place on various devices.
045   */
046  @Facebook("app_links")
047  private AppLinks appLinks;
048  @Facebook("category_list")
049  private List<Category> categoryList = new ArrayList<>();
050  /**
051   * The number of checkins at this Place.
052   */
053  @Facebook
054  private Long checkins;
055  /**
056   * Information about the cover photo.
057   */
058  @Facebook
059  private CoverPhoto cover;
060  /**
061   * The description of the Place provided by the Page administrator.
062   */
063  @Facebook
064  private String description;
065  /**
066   * The social sentence and the like count information for this Place. This is the same information used for the like
067   * button.
068   */
069  @Facebook
070  private Page.Engagement engagement;
071  /**
072   */
073  @Facebook
074  private String hours;
075  /**
076   * Indicates whether this Place is always open.
077   */
078  @Facebook("is_always_open")
079  private Boolean isAlwaysOpen;
080  /**
081   * Indicates whether this Place is permanently closed.
082   */
083  @Facebook("is_permanently_closed")
084  private Boolean isPermanentlyClosed;
085  /**
086   * Pages with a large number of followers can be manually verified by Facebook as having an authentic identity. This
087   * field indicates whether the Page has been verified by this process.
088   */
089  @Facebook("is_verified")
090  private Boolean isVerified;
091  /**
092   * The URL of the Facebook Page.
093   */
094  @Facebook
095  private String link;
096  /**
097   * Location information about the Place. E.g., latitude and longitude, and address.
098   */
099  @Facebook
100  private Location location;
101  /**
102   * The overall page rating, based on rating survey from users, on a scale of 1-5.
103   *
104   * This value is normalized, and is not guaranteed to be a strict average of user ratings.
105   */
106  @Facebook("overall_star_rating")
107  private Double overallStarRating;
108  /**
109   * The Page node corresponding to the Place.
110   */
111  @Facebook
112  private Page page;
113  /**
114   * Parking information about the Place.
115   */
116  @Facebook
117  private Page.PageParking parking;
118  /**
119   * Payment options accepted by the Place. Applicable to restaurants and nightlife.
120   */
121  @Facebook("payment_options")
122  private Page.PagePaymentOptions paymentOptions;
123  /**
124   * The Place's telephone number.
125   */
126  @Facebook
127  private String phone;
128  /**
129   * The pages's profile picture, if provided.
130   *
131   * To force Facebook to fill the <code>picture</code> field you have to fetch the page with the
132   * <code>fields=picture</code> parameter, otherwise the picture is <code>null</code>.
133   */
134  private ProfilePictureSource picture;
135  @Facebook("picture")
136  private transient String rawPicture;
137  /**
138   * Price range of the business.
139   *
140   * Applicable to Restaurants or Nightlife. Can be one of $ (0-10), $$ (10-30), $$$ (30-50), $$$$ (50+), or Unspecified
141   */
142  @Facebook("price_range")
143  private String priceRange;
144  /**
145   * Number of ratings for the Place
146   */
147  @Facebook("rating_count")
148  private Long ratingCount;
149  /**
150   * The services that the restaurant provides.
151   */
152  @Facebook("restaurant_services")
153  private Page.PageRestaurantServices restaurantServices;
154  /**
155   * The restaurant's specialties.
156   */
157  @Facebook("restaurant_specialties")
158  private Page.PageRestaurantSpecialties restaurantSpecialties;
159  /**
160   * The Place's complete postal address, on a single line.
161   */
162  @Facebook("single_line_address")
163  private String singleLineAddress;
164  /**
165   * The URL of the Place's website.
166   */
167  @Facebook
168  private String website;
169  /**
170   * Photos for the Place.
171   *
172   * By default, this edge returns the profile photos for the Place. You can also use an optional type parameter with
173   * the value uploaded to get the photos uploaded by the Place.
174   */
175  @Facebook
176  private List<Photo> photos = new ArrayList<>();
177  /**
178   * The native component workflows for this Place.
179   *
180   * Workflows allow people to perform actions like requesting appointments, buying tickets, and ordering from
181   * restaurants on Facebook
182   */
183  @Facebook
184  private List<PagesPlatformComponentFlowServiceConfig> workflows = new ArrayList<>();
185
186  @JsonMapper.JsonMappingCompleted
187  protected void fillProfilePicture(JsonMapper jsonMapper) {
188    picture = convertPicture(jsonMapper, rawPicture);
189  }
190
191  /**
192   * The Place's categories.
193   *
194   * @return The Place's categories.
195   */
196  public List<Category> getCategoryList() {
197    return unmodifiableList(categoryList);
198  }
199
200  public boolean addCategory(Category category) {
201    return categoryList.add(category);
202  }
203
204  public boolean removeCategory(Category category) {
205    return categoryList.remove(category);
206  }
207
208
209  public static class PagesPlatformComponentFlowServiceConfig extends FacebookType {
210    @Facebook
211    private String deeplink;
212    @Facebook
213    private String label;
214    @Facebook("flow_category")
215    private String flowCategory;
216
217    @java.lang.SuppressWarnings("all")
218    public String getDeeplink() {
219      return this.deeplink;
220    }
221
222    @java.lang.SuppressWarnings("all")
223    public void setDeeplink(final String deeplink) {
224      this.deeplink = deeplink;
225    }
226
227    @java.lang.SuppressWarnings("all")
228    public String getLabel() {
229      return this.label;
230    }
231
232    @java.lang.SuppressWarnings("all")
233    public void setLabel(final String label) {
234      this.label = label;
235    }
236
237    @java.lang.SuppressWarnings("all")
238    public String getFlowCategory() {
239      return this.flowCategory;
240    }
241
242    @java.lang.SuppressWarnings("all")
243    public void setFlowCategory(final String flowCategory) {
244      this.flowCategory = flowCategory;
245    }
246  }
247
248  /**
249   * Information about the Place provided by the Page administrator.
250   *
251   * @return Information about the Place provided by the Page administrator.
252   */
253  @java.lang.SuppressWarnings("all")
254  public String getAbout() {
255    return this.about;
256  }
257
258  /**
259   * Information about the Place provided by the Page administrator.
260   */
261  @java.lang.SuppressWarnings("all")
262  public void setAbout(final String about) {
263    this.about = about;
264  }
265
266  /**
267   * AppLinks to the Place on various devices.
268   *
269   * @return AppLinks to the Place on various devices.
270   */
271  @java.lang.SuppressWarnings("all")
272  public AppLinks getAppLinks() {
273    return this.appLinks;
274  }
275
276  /**
277   * AppLinks to the Place on various devices.
278   */
279  @java.lang.SuppressWarnings("all")
280  public void setAppLinks(final AppLinks appLinks) {
281    this.appLinks = appLinks;
282  }
283
284  /**
285   * The number of checkins at this Place.
286   *
287   * @return The number of checkins at this Place.
288   */
289  @java.lang.SuppressWarnings("all")
290  public Long getCheckins() {
291    return this.checkins;
292  }
293
294  /**
295   * The number of checkins at this Place.
296   */
297  @java.lang.SuppressWarnings("all")
298  public void setCheckins(final Long checkins) {
299    this.checkins = checkins;
300  }
301
302  /**
303   * Information about the cover photo.
304   *
305   * @return Information about the cover photo.
306   */
307  @Override
308  @java.lang.SuppressWarnings("all")
309  public CoverPhoto getCover() {
310    return this.cover;
311  }
312
313  /**
314   * Information about the cover photo.
315   */
316  @java.lang.SuppressWarnings("all")
317  public void setCover(final CoverPhoto cover) {
318    this.cover = cover;
319  }
320
321  /**
322   * The description of the Place provided by the Page administrator.
323   *
324   * @return The description of the Place provided by the Page administrator.
325   */
326  @java.lang.SuppressWarnings("all")
327  public String getDescription() {
328    return this.description;
329  }
330
331  /**
332   * The description of the Place provided by the Page administrator.
333   */
334  @java.lang.SuppressWarnings("all")
335  public void setDescription(final String description) {
336    this.description = description;
337  }
338
339  /**
340   * The social sentence and the like count information for this Place. This is the same information used for the like
341   * button.
342   *
343   * @return The social sentence and the like count information for this Place.
344   */
345  @java.lang.SuppressWarnings("all")
346  public Page.Engagement getEngagement() {
347    return this.engagement;
348  }
349
350  /**
351   * The social sentence and the like count information for this Place. This is the same information used for the like
352   * button.
353   */
354  @java.lang.SuppressWarnings("all")
355  public void setEngagement(final Page.Engagement engagement) {
356    this.engagement = engagement;
357  }
358
359  /**
360   */
361  @java.lang.SuppressWarnings("all")
362  public String getHours() {
363    return this.hours;
364  }
365
366  /**
367   */
368  @java.lang.SuppressWarnings("all")
369  public void setHours(final String hours) {
370    this.hours = hours;
371  }
372
373  /**
374   * Indicates whether this Place is always open.
375   *
376   * @return Indicates whether this Place is always open.
377   */
378  @java.lang.SuppressWarnings("all")
379  public Boolean getIsAlwaysOpen() {
380    return this.isAlwaysOpen;
381  }
382
383  /**
384   * Indicates whether this Place is always open.
385   */
386  @java.lang.SuppressWarnings("all")
387  public void setIsAlwaysOpen(final Boolean isAlwaysOpen) {
388    this.isAlwaysOpen = isAlwaysOpen;
389  }
390
391  /**
392   * Indicates whether this Place is permanently closed.
393   *
394   * @return Indicates whether this Place is permanently closed.
395   */
396  @java.lang.SuppressWarnings("all")
397  public Boolean getIsPermanentlyClosed() {
398    return this.isPermanentlyClosed;
399  }
400
401  /**
402   * Indicates whether this Place is permanently closed.
403   */
404  @java.lang.SuppressWarnings("all")
405  public void setIsPermanentlyClosed(final Boolean isPermanentlyClosed) {
406    this.isPermanentlyClosed = isPermanentlyClosed;
407  }
408
409  /**
410   * Pages with a large number of followers can be manually verified by Facebook as having an authentic identity. This
411   * field indicates whether the Page has been verified by this process.
412   */
413  @java.lang.SuppressWarnings("all")
414  public Boolean getIsVerified() {
415    return this.isVerified;
416  }
417
418  /**
419   * Pages with a large number of followers can be manually verified by Facebook as having an authentic identity. This
420   * field indicates whether the Page has been verified by this process.
421   */
422  @java.lang.SuppressWarnings("all")
423  public void setIsVerified(final Boolean isVerified) {
424    this.isVerified = isVerified;
425  }
426
427  /**
428   * The URL of the Facebook Page.
429   *
430   * @return The URL of the Facebook Page.
431   */
432  @java.lang.SuppressWarnings("all")
433  public String getLink() {
434    return this.link;
435  }
436
437  /**
438   * The URL of the Facebook Page.
439   */
440  @java.lang.SuppressWarnings("all")
441  public void setLink(final String link) {
442    this.link = link;
443  }
444
445  /**
446   * Location information about the Place. E.g., latitude and longitude, and address.
447   *
448   * @return Location information about the Place. E.g., latitude and longitude, and address.
449   */
450  @java.lang.SuppressWarnings("all")
451  public Location getLocation() {
452    return this.location;
453  }
454
455  /**
456   * Location information about the Place. E.g., latitude and longitude, and address.
457   */
458  @java.lang.SuppressWarnings("all")
459  public void setLocation(final Location location) {
460    this.location = location;
461  }
462
463  /**
464   * The overall page rating, based on rating survey from users, on a scale of 1-5.
465   *
466   * This value is normalized, and is not guaranteed to be a strict average of user ratings.
467   *
468   * @return The overall page rating, based on rating survey from users, on a scale of 1-5.
469   */
470  @java.lang.SuppressWarnings("all")
471  public Double getOverallStarRating() {
472    return this.overallStarRating;
473  }
474
475  /**
476   * The overall page rating, based on rating survey from users, on a scale of 1-5.
477   *
478   * This value is normalized, and is not guaranteed to be a strict average of user ratings.
479   */
480  @java.lang.SuppressWarnings("all")
481  public void setOverallStarRating(final Double overallStarRating) {
482    this.overallStarRating = overallStarRating;
483  }
484
485  /**
486   * The Page node corresponding to the Place.
487   *
488   * @return The Page node corresponding to the Place.
489   */
490  @java.lang.SuppressWarnings("all")
491  public Page getPage() {
492    return this.page;
493  }
494
495  /**
496   * The Page node corresponding to the Place.
497   */
498  @java.lang.SuppressWarnings("all")
499  public void setPage(final Page page) {
500    this.page = page;
501  }
502
503  /**
504   * Parking information about the Place.
505   *
506   * @return Parking information about the Place.
507   */
508  @java.lang.SuppressWarnings("all")
509  public Page.PageParking getParking() {
510    return this.parking;
511  }
512
513  /**
514   * Parking information about the Place.
515   */
516  @java.lang.SuppressWarnings("all")
517  public void setParking(final Page.PageParking parking) {
518    this.parking = parking;
519  }
520
521  /**
522   * Payment options accepted by the Place. Applicable to restaurants and nightlife.
523   *
524   * @return Payment options accepted by the Place.
525   */
526  @java.lang.SuppressWarnings("all")
527  public Page.PagePaymentOptions getPaymentOptions() {
528    return this.paymentOptions;
529  }
530
531  /**
532   * Payment options accepted by the Place. Applicable to restaurants and nightlife.
533   */
534  @java.lang.SuppressWarnings("all")
535  public void setPaymentOptions(final Page.PagePaymentOptions paymentOptions) {
536    this.paymentOptions = paymentOptions;
537  }
538
539  /**
540   * The Place's telephone number.
541   *
542   * @return The Place's telephone number.
543   */
544  @java.lang.SuppressWarnings("all")
545  public String getPhone() {
546    return this.phone;
547  }
548
549  /**
550   * The Place's telephone number.
551   */
552  @java.lang.SuppressWarnings("all")
553  public void setPhone(final String phone) {
554    this.phone = phone;
555  }
556
557  /**
558   * The pages's profile picture, if provided.
559   *
560   * To force Facebook to fill the <code>picture</code> field you have to fetch the page with the
561   * <code>fields=picture</code> parameter, otherwise the picture is <code>null</code>.
562   *
563   * @return the page's profile picture as ProfilePictureSource object
564   */
565  @Override
566  @java.lang.SuppressWarnings("all")
567  public ProfilePictureSource getPicture() {
568    return this.picture;
569  }
570
571  /**
572   * The pages's profile picture, if provided.
573   *
574   * To force Facebook to fill the <code>picture</code> field you have to fetch the page with the
575   * <code>fields=picture</code> parameter, otherwise the picture is <code>null</code>.
576   */
577  @java.lang.SuppressWarnings("all")
578  public void setPicture(final ProfilePictureSource picture) {
579    this.picture = picture;
580  }
581
582  /**
583   * Price range of the business.
584   *
585   * Applicable to Restaurants or Nightlife. Can be one of $ (0-10), $$ (10-30), $$$ (30-50), $$$$ (50+), or Unspecified
586   *
587   * @return Price range of the business.
588   */
589  @java.lang.SuppressWarnings("all")
590  public String getPriceRange() {
591    return this.priceRange;
592  }
593
594  /**
595   * Price range of the business.
596   *
597   * Applicable to Restaurants or Nightlife. Can be one of $ (0-10), $$ (10-30), $$$ (30-50), $$$$ (50+), or Unspecified
598   */
599  @java.lang.SuppressWarnings("all")
600  public void setPriceRange(final String priceRange) {
601    this.priceRange = priceRange;
602  }
603
604  /**
605   * Number of ratings for the Place
606   *
607   * @return Number of ratings for the Place
608   */
609  @java.lang.SuppressWarnings("all")
610  public Long getRatingCount() {
611    return this.ratingCount;
612  }
613
614  /**
615   * Number of ratings for the Place
616   */
617  @java.lang.SuppressWarnings("all")
618  public void setRatingCount(final Long ratingCount) {
619    this.ratingCount = ratingCount;
620  }
621
622  /**
623   * The services that the restaurant provides.
624   *
625   * @return The services that the restaurant provides.
626   */
627  @java.lang.SuppressWarnings("all")
628  public Page.PageRestaurantServices getRestaurantServices() {
629    return this.restaurantServices;
630  }
631
632  /**
633   * The services that the restaurant provides.
634   */
635  @java.lang.SuppressWarnings("all")
636  public void setRestaurantServices(final Page.PageRestaurantServices restaurantServices) {
637    this.restaurantServices = restaurantServices;
638  }
639
640  /**
641   * The restaurant's specialties.
642   *
643   * @return The restaurant's specialties.
644   */
645  @java.lang.SuppressWarnings("all")
646  public Page.PageRestaurantSpecialties getRestaurantSpecialties() {
647    return this.restaurantSpecialties;
648  }
649
650  /**
651   * The restaurant's specialties.
652   */
653  @java.lang.SuppressWarnings("all")
654  public void setRestaurantSpecialties(final Page.PageRestaurantSpecialties restaurantSpecialties) {
655    this.restaurantSpecialties = restaurantSpecialties;
656  }
657
658  /**
659   * The Place's complete postal address, on a single line.
660   *
661   * @return The Place's complete postal address, on a single line.
662   */
663  @java.lang.SuppressWarnings("all")
664  public String getSingleLineAddress() {
665    return this.singleLineAddress;
666  }
667
668  /**
669   * The Place's complete postal address, on a single line.
670   */
671  @java.lang.SuppressWarnings("all")
672  public void setSingleLineAddress(final String singleLineAddress) {
673    this.singleLineAddress = singleLineAddress;
674  }
675
676  /**
677   * The URL of the Place's website.
678   *
679   * @return The URL of the Place's website.
680   */
681  @java.lang.SuppressWarnings("all")
682  public String getWebsite() {
683    return this.website;
684  }
685
686  /**
687   * The URL of the Place's website.
688   */
689  @java.lang.SuppressWarnings("all")
690  public void setWebsite(final String website) {
691    this.website = website;
692  }
693
694  /**
695   * Photos for the Place.
696   *
697   * By default, this edge returns the profile photos for the Place. You can also use an optional type parameter with
698   * the value uploaded to get the photos uploaded by the Place.
699   */
700  @java.lang.SuppressWarnings("all")
701  public List<Photo> getPhotos() {
702    return this.photos;
703  }
704
705  /**
706   * Photos for the Place.
707   *
708   * By default, this edge returns the profile photos for the Place. You can also use an optional type parameter with
709   * the value uploaded to get the photos uploaded by the Place.
710   */
711  @java.lang.SuppressWarnings("all")
712  public void setPhotos(final List<Photo> photos) {
713    this.photos = photos;
714  }
715
716  /**
717   * The native component workflows for this Place.
718   *
719   * Workflows allow people to perform actions like requesting appointments, buying tickets, and ordering from
720   * restaurants on Facebook
721   */
722  @java.lang.SuppressWarnings("all")
723  public List<PagesPlatformComponentFlowServiceConfig> getWorkflows() {
724    return this.workflows;
725  }
726
727  /**
728   * The native component workflows for this Place.
729   *
730   * Workflows allow people to perform actions like requesting appointments, buying tickets, and ordering from
731   * restaurants on Facebook
732   */
733  @java.lang.SuppressWarnings("all")
734  public void setWorkflows(final List<PagesPlatformComponentFlowServiceConfig> workflows) {
735    this.workflows = workflows;
736  }
737}