001// Generated by delombok at Thu Aug 13 13:56:44 UTC 2026
002/*
003 * Copyright (c) 2010-2026 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    @lombok.Generated
219    public String getDeeplink() {
220      return this.deeplink;
221    }
222
223    @java.lang.SuppressWarnings("all")
224    @lombok.Generated
225    public void setDeeplink(final String deeplink) {
226      this.deeplink = deeplink;
227    }
228
229    @java.lang.SuppressWarnings("all")
230    @lombok.Generated
231    public String getLabel() {
232      return this.label;
233    }
234
235    @java.lang.SuppressWarnings("all")
236    @lombok.Generated
237    public void setLabel(final String label) {
238      this.label = label;
239    }
240
241    @java.lang.SuppressWarnings("all")
242    @lombok.Generated
243    public String getFlowCategory() {
244      return this.flowCategory;
245    }
246
247    @java.lang.SuppressWarnings("all")
248    @lombok.Generated
249    public void setFlowCategory(final String flowCategory) {
250      this.flowCategory = flowCategory;
251    }
252  }
253
254  /**
255   * Information about the Place provided by the Page administrator.
256   *
257   * @return Information about the Place provided by the Page administrator.
258   */
259  @java.lang.SuppressWarnings("all")
260  @lombok.Generated
261  public String getAbout() {
262    return this.about;
263  }
264
265  /**
266   * Information about the Place provided by the Page administrator.
267   */
268  @java.lang.SuppressWarnings("all")
269  @lombok.Generated
270  public void setAbout(final String about) {
271    this.about = about;
272  }
273
274  /**
275   * AppLinks to the Place on various devices.
276   *
277   * @return AppLinks to the Place on various devices.
278   */
279  @java.lang.SuppressWarnings("all")
280  @lombok.Generated
281  public AppLinks getAppLinks() {
282    return this.appLinks;
283  }
284
285  /**
286   * AppLinks to the Place on various devices.
287   */
288  @java.lang.SuppressWarnings("all")
289  @lombok.Generated
290  public void setAppLinks(final AppLinks appLinks) {
291    this.appLinks = appLinks;
292  }
293
294  /**
295   * The number of checkins at this Place.
296   *
297   * @return The number of checkins at this Place.
298   */
299  @java.lang.SuppressWarnings("all")
300  @lombok.Generated
301  public Long getCheckins() {
302    return this.checkins;
303  }
304
305  /**
306   * The number of checkins at this Place.
307   */
308  @java.lang.SuppressWarnings("all")
309  @lombok.Generated
310  public void setCheckins(final Long checkins) {
311    this.checkins = checkins;
312  }
313
314  /**
315   * Information about the cover photo.
316   *
317   * @return Information about the cover photo.
318   */
319  @Override
320  @java.lang.SuppressWarnings("all")
321  @lombok.Generated
322  public CoverPhoto getCover() {
323    return this.cover;
324  }
325
326  /**
327   * Information about the cover photo.
328   */
329  @java.lang.SuppressWarnings("all")
330  @lombok.Generated
331  public void setCover(final CoverPhoto cover) {
332    this.cover = cover;
333  }
334
335  /**
336   * The description of the Place provided by the Page administrator.
337   *
338   * @return The description of the Place provided by the Page administrator.
339   */
340  @java.lang.SuppressWarnings("all")
341  @lombok.Generated
342  public String getDescription() {
343    return this.description;
344  }
345
346  /**
347   * The description of the Place provided by the Page administrator.
348   */
349  @java.lang.SuppressWarnings("all")
350  @lombok.Generated
351  public void setDescription(final String description) {
352    this.description = description;
353  }
354
355  /**
356   * The social sentence and the like count information for this Place. This is the same information used for the like
357   * button.
358   *
359   * @return The social sentence and the like count information for this Place.
360   */
361  @java.lang.SuppressWarnings("all")
362  @lombok.Generated
363  public Page.Engagement getEngagement() {
364    return this.engagement;
365  }
366
367  /**
368   * The social sentence and the like count information for this Place. This is the same information used for the like
369   * button.
370   */
371  @java.lang.SuppressWarnings("all")
372  @lombok.Generated
373  public void setEngagement(final Page.Engagement engagement) {
374    this.engagement = engagement;
375  }
376
377  /**
378   */
379  @java.lang.SuppressWarnings("all")
380  @lombok.Generated
381  public String getHours() {
382    return this.hours;
383  }
384
385  /**
386   */
387  @java.lang.SuppressWarnings("all")
388  @lombok.Generated
389  public void setHours(final String hours) {
390    this.hours = hours;
391  }
392
393  /**
394   * Indicates whether this Place is always open.
395   *
396   * @return Indicates whether this Place is always open.
397   */
398  @java.lang.SuppressWarnings("all")
399  @lombok.Generated
400  public Boolean getIsAlwaysOpen() {
401    return this.isAlwaysOpen;
402  }
403
404  /**
405   * Indicates whether this Place is always open.
406   */
407  @java.lang.SuppressWarnings("all")
408  @lombok.Generated
409  public void setIsAlwaysOpen(final Boolean isAlwaysOpen) {
410    this.isAlwaysOpen = isAlwaysOpen;
411  }
412
413  /**
414   * Indicates whether this Place is permanently closed.
415   *
416   * @return Indicates whether this Place is permanently closed.
417   */
418  @java.lang.SuppressWarnings("all")
419  @lombok.Generated
420  public Boolean getIsPermanentlyClosed() {
421    return this.isPermanentlyClosed;
422  }
423
424  /**
425   * Indicates whether this Place is permanently closed.
426   */
427  @java.lang.SuppressWarnings("all")
428  @lombok.Generated
429  public void setIsPermanentlyClosed(final Boolean isPermanentlyClosed) {
430    this.isPermanentlyClosed = isPermanentlyClosed;
431  }
432
433  /**
434   * Pages with a large number of followers can be manually verified by Facebook as having an authentic identity. This
435   * field indicates whether the Page has been verified by this process.
436   */
437  @java.lang.SuppressWarnings("all")
438  @lombok.Generated
439  public Boolean getIsVerified() {
440    return this.isVerified;
441  }
442
443  /**
444   * Pages with a large number of followers can be manually verified by Facebook as having an authentic identity. This
445   * field indicates whether the Page has been verified by this process.
446   */
447  @java.lang.SuppressWarnings("all")
448  @lombok.Generated
449  public void setIsVerified(final Boolean isVerified) {
450    this.isVerified = isVerified;
451  }
452
453  /**
454   * The URL of the Facebook Page.
455   *
456   * @return The URL of the Facebook Page.
457   */
458  @java.lang.SuppressWarnings("all")
459  @lombok.Generated
460  public String getLink() {
461    return this.link;
462  }
463
464  /**
465   * The URL of the Facebook Page.
466   */
467  @java.lang.SuppressWarnings("all")
468  @lombok.Generated
469  public void setLink(final String link) {
470    this.link = link;
471  }
472
473  /**
474   * Location information about the Place. E.g., latitude and longitude, and address.
475   *
476   * @return Location information about the Place. E.g., latitude and longitude, and address.
477   */
478  @java.lang.SuppressWarnings("all")
479  @lombok.Generated
480  public Location getLocation() {
481    return this.location;
482  }
483
484  /**
485   * Location information about the Place. E.g., latitude and longitude, and address.
486   */
487  @java.lang.SuppressWarnings("all")
488  @lombok.Generated
489  public void setLocation(final Location location) {
490    this.location = location;
491  }
492
493  /**
494   * The overall page rating, based on rating survey from users, on a scale of 1-5.
495   *
496   * This value is normalized, and is not guaranteed to be a strict average of user ratings.
497   *
498   * @return The overall page rating, based on rating survey from users, on a scale of 1-5.
499   */
500  @java.lang.SuppressWarnings("all")
501  @lombok.Generated
502  public Double getOverallStarRating() {
503    return this.overallStarRating;
504  }
505
506  /**
507   * The overall page rating, based on rating survey from users, on a scale of 1-5.
508   *
509   * This value is normalized, and is not guaranteed to be a strict average of user ratings.
510   */
511  @java.lang.SuppressWarnings("all")
512  @lombok.Generated
513  public void setOverallStarRating(final Double overallStarRating) {
514    this.overallStarRating = overallStarRating;
515  }
516
517  /**
518   * The Page node corresponding to the Place.
519   *
520   * @return The Page node corresponding to the Place.
521   */
522  @java.lang.SuppressWarnings("all")
523  @lombok.Generated
524  public Page getPage() {
525    return this.page;
526  }
527
528  /**
529   * The Page node corresponding to the Place.
530   */
531  @java.lang.SuppressWarnings("all")
532  @lombok.Generated
533  public void setPage(final Page page) {
534    this.page = page;
535  }
536
537  /**
538   * Parking information about the Place.
539   *
540   * @return Parking information about the Place.
541   */
542  @java.lang.SuppressWarnings("all")
543  @lombok.Generated
544  public Page.PageParking getParking() {
545    return this.parking;
546  }
547
548  /**
549   * Parking information about the Place.
550   */
551  @java.lang.SuppressWarnings("all")
552  @lombok.Generated
553  public void setParking(final Page.PageParking parking) {
554    this.parking = parking;
555  }
556
557  /**
558   * Payment options accepted by the Place. Applicable to restaurants and nightlife.
559   *
560   * @return Payment options accepted by the Place.
561   */
562  @java.lang.SuppressWarnings("all")
563  @lombok.Generated
564  public Page.PagePaymentOptions getPaymentOptions() {
565    return this.paymentOptions;
566  }
567
568  /**
569   * Payment options accepted by the Place. Applicable to restaurants and nightlife.
570   */
571  @java.lang.SuppressWarnings("all")
572  @lombok.Generated
573  public void setPaymentOptions(final Page.PagePaymentOptions paymentOptions) {
574    this.paymentOptions = paymentOptions;
575  }
576
577  /**
578   * The Place's telephone number.
579   *
580   * @return The Place's telephone number.
581   */
582  @java.lang.SuppressWarnings("all")
583  @lombok.Generated
584  public String getPhone() {
585    return this.phone;
586  }
587
588  /**
589   * The Place's telephone number.
590   */
591  @java.lang.SuppressWarnings("all")
592  @lombok.Generated
593  public void setPhone(final String phone) {
594    this.phone = phone;
595  }
596
597  /**
598   * The pages's profile picture, if provided.
599   *
600   * To force Facebook to fill the <code>picture</code> field you have to fetch the page with the
601   * <code>fields=picture</code> parameter, otherwise the picture is <code>null</code>.
602   *
603   * @return the page's profile picture as ProfilePictureSource object
604   */
605  @Override
606  @java.lang.SuppressWarnings("all")
607  @lombok.Generated
608  public ProfilePictureSource getPicture() {
609    return this.picture;
610  }
611
612  /**
613   * The pages's profile picture, if provided.
614   *
615   * To force Facebook to fill the <code>picture</code> field you have to fetch the page with the
616   * <code>fields=picture</code> parameter, otherwise the picture is <code>null</code>.
617   */
618  @java.lang.SuppressWarnings("all")
619  @lombok.Generated
620  public void setPicture(final ProfilePictureSource picture) {
621    this.picture = picture;
622  }
623
624  /**
625   * Price range of the business.
626   *
627   * Applicable to Restaurants or Nightlife. Can be one of $ (0-10), $$ (10-30), $$$ (30-50), $$$$ (50+), or Unspecified
628   *
629   * @return Price range of the business.
630   */
631  @java.lang.SuppressWarnings("all")
632  @lombok.Generated
633  public String getPriceRange() {
634    return this.priceRange;
635  }
636
637  /**
638   * Price range of the business.
639   *
640   * Applicable to Restaurants or Nightlife. Can be one of $ (0-10), $$ (10-30), $$$ (30-50), $$$$ (50+), or Unspecified
641   */
642  @java.lang.SuppressWarnings("all")
643  @lombok.Generated
644  public void setPriceRange(final String priceRange) {
645    this.priceRange = priceRange;
646  }
647
648  /**
649   * Number of ratings for the Place
650   *
651   * @return Number of ratings for the Place
652   */
653  @java.lang.SuppressWarnings("all")
654  @lombok.Generated
655  public Long getRatingCount() {
656    return this.ratingCount;
657  }
658
659  /**
660   * Number of ratings for the Place
661   */
662  @java.lang.SuppressWarnings("all")
663  @lombok.Generated
664  public void setRatingCount(final Long ratingCount) {
665    this.ratingCount = ratingCount;
666  }
667
668  /**
669   * The services that the restaurant provides.
670   *
671   * @return The services that the restaurant provides.
672   */
673  @java.lang.SuppressWarnings("all")
674  @lombok.Generated
675  public Page.PageRestaurantServices getRestaurantServices() {
676    return this.restaurantServices;
677  }
678
679  /**
680   * The services that the restaurant provides.
681   */
682  @java.lang.SuppressWarnings("all")
683  @lombok.Generated
684  public void setRestaurantServices(final Page.PageRestaurantServices restaurantServices) {
685    this.restaurantServices = restaurantServices;
686  }
687
688  /**
689   * The restaurant's specialties.
690   *
691   * @return The restaurant's specialties.
692   */
693  @java.lang.SuppressWarnings("all")
694  @lombok.Generated
695  public Page.PageRestaurantSpecialties getRestaurantSpecialties() {
696    return this.restaurantSpecialties;
697  }
698
699  /**
700   * The restaurant's specialties.
701   */
702  @java.lang.SuppressWarnings("all")
703  @lombok.Generated
704  public void setRestaurantSpecialties(final Page.PageRestaurantSpecialties restaurantSpecialties) {
705    this.restaurantSpecialties = restaurantSpecialties;
706  }
707
708  /**
709   * The Place's complete postal address, on a single line.
710   *
711   * @return The Place's complete postal address, on a single line.
712   */
713  @java.lang.SuppressWarnings("all")
714  @lombok.Generated
715  public String getSingleLineAddress() {
716    return this.singleLineAddress;
717  }
718
719  /**
720   * The Place's complete postal address, on a single line.
721   */
722  @java.lang.SuppressWarnings("all")
723  @lombok.Generated
724  public void setSingleLineAddress(final String singleLineAddress) {
725    this.singleLineAddress = singleLineAddress;
726  }
727
728  /**
729   * The URL of the Place's website.
730   *
731   * @return The URL of the Place's website.
732   */
733  @java.lang.SuppressWarnings("all")
734  @lombok.Generated
735  public String getWebsite() {
736    return this.website;
737  }
738
739  /**
740   * The URL of the Place's website.
741   */
742  @java.lang.SuppressWarnings("all")
743  @lombok.Generated
744  public void setWebsite(final String website) {
745    this.website = website;
746  }
747
748  /**
749   * Photos for the Place.
750   *
751   * By default, this edge returns the profile photos for the Place. You can also use an optional type parameter with
752   * the value uploaded to get the photos uploaded by the Place.
753   */
754  @java.lang.SuppressWarnings("all")
755  @lombok.Generated
756  public List<Photo> getPhotos() {
757    return this.photos;
758  }
759
760  /**
761   * Photos for the Place.
762   *
763   * By default, this edge returns the profile photos for the Place. You can also use an optional type parameter with
764   * the value uploaded to get the photos uploaded by the Place.
765   */
766  @java.lang.SuppressWarnings("all")
767  @lombok.Generated
768  public void setPhotos(final List<Photo> photos) {
769    this.photos = photos;
770  }
771
772  /**
773   * The native component workflows for this Place.
774   *
775   * Workflows allow people to perform actions like requesting appointments, buying tickets, and ordering from
776   * restaurants on Facebook
777   */
778  @java.lang.SuppressWarnings("all")
779  @lombok.Generated
780  public List<PagesPlatformComponentFlowServiceConfig> getWorkflows() {
781    return this.workflows;
782  }
783
784  /**
785   * The native component workflows for this Place.
786   *
787   * Workflows allow people to perform actions like requesting appointments, buying tickets, and ordering from
788   * restaurants on Facebook
789   */
790  @java.lang.SuppressWarnings("all")
791  @lombok.Generated
792  public void setWorkflows(final List<PagesPlatformComponentFlowServiceConfig> workflows) {
793    this.workflows = workflows;
794  }
795}