001// Generated by delombok at Sun Jul 07 22:01:31 CEST 2019
002/**
003 * Copyright (c) 2010-2019 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.util.MappingUtils;
032
033/**
034 * Represents the <a href="https://developers.facebook.com/docs/places/fields">SearchPlace</a>
035 */
036public class SearchPlace extends NamedFacebookType {
037  /**
038   * Information about the Place provided by the Page administrator.
039   */
040  @Facebook
041  private String about;
042  /**
043   * AppLinks to the Place on various devices.
044   */
045  @Facebook("app_links")
046  private AppLinks appLinks;
047  @Facebook("category_list")
048  private List<Category> categoryList = new ArrayList<>();
049  /**
050   * The number of checkins at this Place.
051   */
052  @Facebook
053  private Long checkins;
054  /**
055   * Information about the cover photo.
056   */
057  @Facebook
058  private CoverPhoto cover;
059  /**
060   * The description of the Place provided by the Page administrator.
061   */
062  @Facebook
063  private String description;
064  /**
065   * The social sentence and the like count information for this Place. This is the same information used for the like
066   * button.
067   */
068  @Facebook
069  private Page.Engagement engagement;
070  /**
071   */
072  @Facebook
073  private String hours;
074  /**
075   * Indicates whether this Place is always open.
076   */
077  @Facebook("is_always_open")
078  private Boolean isAlwaysOpen;
079  /**
080   * Indicates whether this Place is permanently closed.
081   */
082  @Facebook("is_permanently_closed")
083  private Boolean isPermanentlyClosed;
084  /**
085   * Pages with a large number of followers can be manually verified by Facebook as having an authentic identity. This
086   * field indicates whether the Page has been verified by this process.
087   */
088  @Facebook("is_verified")
089  private Boolean isVerified;
090  /**
091   * The URL of the Facebook Page.
092   */
093  @Facebook
094  private String link;
095  /**
096   * Location information about the Place. E.g., latitude and longitude, and address.
097   */
098  @Facebook
099  private Location location;
100  /**
101   * The overall page rating, based on rating survey from users, on a scale of 1-5.
102   *
103   * This value is normalized, and is not guaranteed to be a strict average of user ratings.
104   */
105  @Facebook("overall_star_rating")
106  private Double overallStarRating;
107  /**
108   * The Page node corresponding to the Place.
109   */
110  @Facebook
111  private Page page;
112  /**
113   * Parking information about the Place.
114   */
115  @Facebook
116  private Page.PageParking parking;
117  /**
118   * Payment options accepted by the Place. Applicable to restaurants and nightlife.
119   */
120  @Facebook("payment_options")
121  private Page.PagePaymentOptions paymentOptions;
122  /**
123   * The Place's telephone number.
124   */
125  @Facebook
126  private String phone;
127  /**
128   * The pages's profile picture, if provided.
129   *
130   * To force Facebook to fill the <code>picture</code> field you have to fetch the page with the
131   * <code>fields=picture</code> parameter, otherwise the picture is <code>null</code>.
132   */
133  private ProfilePictureSource picture;
134  @Facebook("picture")
135  private transient String rawPicture;
136  /**
137   * Price range of the business.
138   *
139   * Applicable to Restaurants or Nightlife. Can be one of $ (0-10), $$ (10-30), $$$ (30-50), $$$$ (50+), or Unspecified
140   */
141  @Facebook("price_range")
142  private String priceRange;
143  /**
144   * Number of ratings for the Place
145   */
146  @Facebook("rating_count")
147  private Long ratingCount;
148  /**
149   * The services that the restaurant provides.
150   */
151  @Facebook("restaurant_services")
152  private Page.PageRestaurantServices restaurantServices;
153  /**
154   * The restaurant's specialties.
155   */
156  @Facebook("restaurant_specialties")
157  private Page.PageRestaurantSpecialties restaurantSpecialties;
158  /**
159   * The Place's complete postal address, on a single line.
160   */
161  @Facebook("single_line_address")
162  private String singleLineAddress;
163  /**
164   * The URL of the Place's website.
165   */
166  @Facebook
167  private String website;
168  /**
169   * Photos for the Place.
170   *
171   * By default, this edge returns the profile photos for the Place. You can also use an optional type parameter with
172   * the value uploaded to get the photos uploaded by the Place.
173   */
174  @Facebook
175  private List<Photo> photos = new ArrayList<>();
176  /**
177   * The native component workflows for this Place.
178   *
179   * Workflows allow people to perform actions like requesting appointments, buying tickets, and ordering from
180   * restaurants on Facebook
181   */
182  @Facebook
183  private List<PagesPlatformComponentFlowServiceConfig> workflows = new ArrayList<>();
184
185  @JsonMapper.JsonMappingCompleted
186  protected void fillProfilePicture(JsonMapper jsonMapper) {
187    MappingUtils mappingUtils = new MappingUtils(jsonMapper);
188    picture = mappingUtils.convertPicture(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  @java.lang.SuppressWarnings("all")
308  public CoverPhoto getCover() {
309    return this.cover;
310  }
311
312  /**
313   * Information about the cover photo.
314   */
315  @java.lang.SuppressWarnings("all")
316  public void setCover(final CoverPhoto cover) {
317    this.cover = cover;
318  }
319
320  /**
321   * The description of the Place provided by the Page administrator.
322   *
323   * @return The description of the Place provided by the Page administrator.
324   */
325  @java.lang.SuppressWarnings("all")
326  public String getDescription() {
327    return this.description;
328  }
329
330  /**
331   * The description of the Place provided by the Page administrator.
332   */
333  @java.lang.SuppressWarnings("all")
334  public void setDescription(final String description) {
335    this.description = description;
336  }
337
338  /**
339   * The social sentence and the like count information for this Place. This is the same information used for the like
340   * button.
341   *
342   * @return The social sentence and the like count information for this Place.
343   */
344  @java.lang.SuppressWarnings("all")
345  public Page.Engagement getEngagement() {
346    return this.engagement;
347  }
348
349  /**
350   * The social sentence and the like count information for this Place. This is the same information used for the like
351   * button.
352   */
353  @java.lang.SuppressWarnings("all")
354  public void setEngagement(final Page.Engagement engagement) {
355    this.engagement = engagement;
356  }
357
358  /**
359   */
360  @java.lang.SuppressWarnings("all")
361  public String getHours() {
362    return this.hours;
363  }
364
365  /**
366   */
367  @java.lang.SuppressWarnings("all")
368  public void setHours(final String hours) {
369    this.hours = hours;
370  }
371
372  /**
373   * Indicates whether this Place is always open.
374   *
375   * @return Indicates whether this Place is always open.
376   */
377  @java.lang.SuppressWarnings("all")
378  public Boolean getIsAlwaysOpen() {
379    return this.isAlwaysOpen;
380  }
381
382  /**
383   * Indicates whether this Place is always open.
384   */
385  @java.lang.SuppressWarnings("all")
386  public void setIsAlwaysOpen(final Boolean isAlwaysOpen) {
387    this.isAlwaysOpen = isAlwaysOpen;
388  }
389
390  /**
391   * Indicates whether this Place is permanently closed.
392   *
393   * @return Indicates whether this Place is permanently closed.
394   */
395  @java.lang.SuppressWarnings("all")
396  public Boolean getIsPermanentlyClosed() {
397    return this.isPermanentlyClosed;
398  }
399
400  /**
401   * Indicates whether this Place is permanently closed.
402   */
403  @java.lang.SuppressWarnings("all")
404  public void setIsPermanentlyClosed(final Boolean isPermanentlyClosed) {
405    this.isPermanentlyClosed = isPermanentlyClosed;
406  }
407
408  /**
409   * Pages with a large number of followers can be manually verified by Facebook as having an authentic identity. This
410   * field indicates whether the Page has been verified by this process.
411   */
412  @java.lang.SuppressWarnings("all")
413  public Boolean getIsVerified() {
414    return this.isVerified;
415  }
416
417  /**
418   * Pages with a large number of followers can be manually verified by Facebook as having an authentic identity. This
419   * field indicates whether the Page has been verified by this process.
420   */
421  @java.lang.SuppressWarnings("all")
422  public void setIsVerified(final Boolean isVerified) {
423    this.isVerified = isVerified;
424  }
425
426  /**
427   * The URL of the Facebook Page.
428   *
429   * @return The URL of the Facebook Page.
430   */
431  @java.lang.SuppressWarnings("all")
432  public String getLink() {
433    return this.link;
434  }
435
436  /**
437   * The URL of the Facebook Page.
438   */
439  @java.lang.SuppressWarnings("all")
440  public void setLink(final String link) {
441    this.link = link;
442  }
443
444  /**
445   * Location information about the Place. E.g., latitude and longitude, and address.
446   *
447   * @return Location information about the Place. E.g., latitude and longitude, and address.
448   */
449  @java.lang.SuppressWarnings("all")
450  public Location getLocation() {
451    return this.location;
452  }
453
454  /**
455   * Location information about the Place. E.g., latitude and longitude, and address.
456   */
457  @java.lang.SuppressWarnings("all")
458  public void setLocation(final Location location) {
459    this.location = location;
460  }
461
462  /**
463   * The overall page rating, based on rating survey from users, on a scale of 1-5.
464   *
465   * This value is normalized, and is not guaranteed to be a strict average of user ratings.
466   *
467   * @return The overall page rating, based on rating survey from users, on a scale of 1-5.
468   */
469  @java.lang.SuppressWarnings("all")
470  public Double getOverallStarRating() {
471    return this.overallStarRating;
472  }
473
474  /**
475   * The overall page rating, based on rating survey from users, on a scale of 1-5.
476   *
477   * This value is normalized, and is not guaranteed to be a strict average of user ratings.
478   */
479  @java.lang.SuppressWarnings("all")
480  public void setOverallStarRating(final Double overallStarRating) {
481    this.overallStarRating = overallStarRating;
482  }
483
484  /**
485   * The Page node corresponding to the Place.
486   *
487   * @return The Page node corresponding to the Place.
488   */
489  @java.lang.SuppressWarnings("all")
490  public Page getPage() {
491    return this.page;
492  }
493
494  /**
495   * The Page node corresponding to the Place.
496   */
497  @java.lang.SuppressWarnings("all")
498  public void setPage(final Page page) {
499    this.page = page;
500  }
501
502  /**
503   * Parking information about the Place.
504   *
505   * @return Parking information about the Place.
506   */
507  @java.lang.SuppressWarnings("all")
508  public Page.PageParking getParking() {
509    return this.parking;
510  }
511
512  /**
513   * Parking information about the Place.
514   */
515  @java.lang.SuppressWarnings("all")
516  public void setParking(final Page.PageParking parking) {
517    this.parking = parking;
518  }
519
520  /**
521   * Payment options accepted by the Place. Applicable to restaurants and nightlife.
522   *
523   * @return Payment options accepted by the Place.
524   */
525  @java.lang.SuppressWarnings("all")
526  public Page.PagePaymentOptions getPaymentOptions() {
527    return this.paymentOptions;
528  }
529
530  /**
531   * Payment options accepted by the Place. Applicable to restaurants and nightlife.
532   */
533  @java.lang.SuppressWarnings("all")
534  public void setPaymentOptions(final Page.PagePaymentOptions paymentOptions) {
535    this.paymentOptions = paymentOptions;
536  }
537
538  /**
539   * The Place's telephone number.
540   *
541   * @return The Place's telephone number.
542   */
543  @java.lang.SuppressWarnings("all")
544  public String getPhone() {
545    return this.phone;
546  }
547
548  /**
549   * The Place's telephone number.
550   */
551  @java.lang.SuppressWarnings("all")
552  public void setPhone(final String phone) {
553    this.phone = phone;
554  }
555
556  /**
557   * The pages's profile picture, if provided.
558   *
559   * To force Facebook to fill the <code>picture</code> field you have to fetch the page with the
560   * <code>fields=picture</code> parameter, otherwise the picture is <code>null</code>.
561   *
562   * @return the page's profile picture as ProfilePictureSource object
563   */
564  @java.lang.SuppressWarnings("all")
565  public ProfilePictureSource getPicture() {
566    return this.picture;
567  }
568
569  /**
570   * The pages's profile picture, if provided.
571   *
572   * To force Facebook to fill the <code>picture</code> field you have to fetch the page with the
573   * <code>fields=picture</code> parameter, otherwise the picture is <code>null</code>.
574   */
575  @java.lang.SuppressWarnings("all")
576  public void setPicture(final ProfilePictureSource picture) {
577    this.picture = picture;
578  }
579
580  /**
581   * Price range of the business.
582   *
583   * Applicable to Restaurants or Nightlife. Can be one of $ (0-10), $$ (10-30), $$$ (30-50), $$$$ (50+), or Unspecified
584   *
585   * @return Price range of the business.
586   */
587  @java.lang.SuppressWarnings("all")
588  public String getPriceRange() {
589    return this.priceRange;
590  }
591
592  /**
593   * Price range of the business.
594   *
595   * Applicable to Restaurants or Nightlife. Can be one of $ (0-10), $$ (10-30), $$$ (30-50), $$$$ (50+), or Unspecified
596   */
597  @java.lang.SuppressWarnings("all")
598  public void setPriceRange(final String priceRange) {
599    this.priceRange = priceRange;
600  }
601
602  /**
603   * Number of ratings for the Place
604   *
605   * @return Number of ratings for the Place
606   */
607  @java.lang.SuppressWarnings("all")
608  public Long getRatingCount() {
609    return this.ratingCount;
610  }
611
612  /**
613   * Number of ratings for the Place
614   */
615  @java.lang.SuppressWarnings("all")
616  public void setRatingCount(final Long ratingCount) {
617    this.ratingCount = ratingCount;
618  }
619
620  /**
621   * The services that the restaurant provides.
622   *
623   * @return The services that the restaurant provides.
624   */
625  @java.lang.SuppressWarnings("all")
626  public Page.PageRestaurantServices getRestaurantServices() {
627    return this.restaurantServices;
628  }
629
630  /**
631   * The services that the restaurant provides.
632   */
633  @java.lang.SuppressWarnings("all")
634  public void setRestaurantServices(final Page.PageRestaurantServices restaurantServices) {
635    this.restaurantServices = restaurantServices;
636  }
637
638  /**
639   * The restaurant's specialties.
640   *
641   * @return The restaurant's specialties.
642   */
643  @java.lang.SuppressWarnings("all")
644  public Page.PageRestaurantSpecialties getRestaurantSpecialties() {
645    return this.restaurantSpecialties;
646  }
647
648  /**
649   * The restaurant's specialties.
650   */
651  @java.lang.SuppressWarnings("all")
652  public void setRestaurantSpecialties(final Page.PageRestaurantSpecialties restaurantSpecialties) {
653    this.restaurantSpecialties = restaurantSpecialties;
654  }
655
656  /**
657   * The Place's complete postal address, on a single line.
658   *
659   * @return The Place's complete postal address, on a single line.
660   */
661  @java.lang.SuppressWarnings("all")
662  public String getSingleLineAddress() {
663    return this.singleLineAddress;
664  }
665
666  /**
667   * The Place's complete postal address, on a single line.
668   */
669  @java.lang.SuppressWarnings("all")
670  public void setSingleLineAddress(final String singleLineAddress) {
671    this.singleLineAddress = singleLineAddress;
672  }
673
674  /**
675   * The URL of the Place's website.
676   *
677   * @return The URL of the Place's website.
678   */
679  @java.lang.SuppressWarnings("all")
680  public String getWebsite() {
681    return this.website;
682  }
683
684  /**
685   * The URL of the Place's website.
686   */
687  @java.lang.SuppressWarnings("all")
688  public void setWebsite(final String website) {
689    this.website = website;
690  }
691
692  /**
693   * Photos for the Place.
694   *
695   * By default, this edge returns the profile photos for the Place. You can also use an optional type parameter with
696   * the value uploaded to get the photos uploaded by the Place.
697   */
698  @java.lang.SuppressWarnings("all")
699  public List<Photo> getPhotos() {
700    return this.photos;
701  }
702
703  /**
704   * Photos for the Place.
705   *
706   * By default, this edge returns the profile photos for the Place. You can also use an optional type parameter with
707   * the value uploaded to get the photos uploaded by the Place.
708   */
709  @java.lang.SuppressWarnings("all")
710  public void setPhotos(final List<Photo> photos) {
711    this.photos = photos;
712  }
713
714  /**
715   * The native component workflows for this Place.
716   *
717   * Workflows allow people to perform actions like requesting appointments, buying tickets, and ordering from
718   * restaurants on Facebook
719   */
720  @java.lang.SuppressWarnings("all")
721  public List<PagesPlatformComponentFlowServiceConfig> getWorkflows() {
722    return this.workflows;
723  }
724
725  /**
726   * The native component workflows for this Place.
727   *
728   * Workflows allow people to perform actions like requesting appointments, buying tickets, and ordering from
729   * restaurants on Facebook
730   */
731  @java.lang.SuppressWarnings("all")
732  public void setWorkflows(final List<PagesPlatformComponentFlowServiceConfig> workflows) {
733    this.workflows = workflows;
734  }
735}