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.annotation.GraphAPI; 030 031/** 032 * Represents information about the place where an event occurred, for example a {@link Checkin} or {@link Photo}. 033 * 034 * @author <a href="http://ex-nerd.com">Chris Petersen</a> 035 * @author <a href="http://restfb.com">Mark Allen</a> 036 * @since 1.6.10 037 */ 038public class Place extends NamedFacebookType { 039 /** 040 * Location containing geographic information such as latitude, longitude, country, and other fields (fields will vary 041 * based on geography and availability of information). 042 * 043 * It is possible for Facebook to return either this value or {@link #getLocationAsString()}. 044 */ 045 @Facebook 046 private Location location; 047 /** 048 * Overall Rating of Place, on a 5-star scale. 0 means not enough data to get a combined rating. 049 */ 050 @Facebook("overall_rating") 051 @GraphAPI(since = "2.5") 052 private Double overallRating; 053 /** 054 * Description for this location. 055 * <p> 056 * It is possible for Facebook to return either this value or {@link #getLocation()}. If {@link #getLocation()} 057 * returns {@code null}, then check this method to see if it has data, e.g. {@code "Philadelphia, PA"}. 058 * 059 * @since 1.6.12 060 */ 061 @Facebook("location") 062 private String locationAsString; 063 @Facebook("category_list") 064 private List<Category> categoryList = new ArrayList<>(); 065 066 /** 067 * List of other categories for this place. 068 * 069 * @return List of other categories for this place. 070 * @since 1.6.15 071 */ 072 public List<Category> getCategoryList() { 073 return unmodifiableList(categoryList); 074 } 075 076 public boolean addCategory(Category category) { 077 return categoryList.add(category); 078 } 079 080 public boolean removeCategory(Category category) { 081 return categoryList.remove(category); 082 } 083 084 private static final long serialVersionUID = 1L; 085 086 /** 087 * Location containing geographic information such as latitude, longitude, country, and other fields (fields will vary 088 * based on geography and availability of information). 089 * 090 * It is possible for Facebook to return either this value or {@link #getLocationAsString()}. 091 * 092 * @return Location containing geographic information such as latitude, longitude, country, and other fields. 093 */ 094 @java.lang.SuppressWarnings("all") 095 @lombok.Generated 096 public Location getLocation() { 097 return this.location; 098 } 099 100 /** 101 * Location containing geographic information such as latitude, longitude, country, and other fields (fields will vary 102 * based on geography and availability of information). 103 * 104 * It is possible for Facebook to return either this value or {@link #getLocationAsString()}. 105 */ 106 @java.lang.SuppressWarnings("all") 107 @lombok.Generated 108 public void setLocation(final Location location) { 109 this.location = location; 110 } 111 112 /** 113 * Overall Rating of Place, on a 5-star scale. 0 means not enough data to get a combined rating. 114 * 115 * @return Overall Rating of Place, on a 5-star scale. 116 */ 117 @GraphAPI(since = "2.5") 118 @java.lang.SuppressWarnings("all") 119 @lombok.Generated 120 public Double getOverallRating() { 121 return this.overallRating; 122 } 123 124 /** 125 * Overall Rating of Place, on a 5-star scale. 0 means not enough data to get a combined rating. 126 */ 127 @java.lang.SuppressWarnings("all") 128 @lombok.Generated 129 public void setOverallRating(final Double overallRating) { 130 this.overallRating = overallRating; 131 } 132 133 /** 134 * Description for this location. 135 * <p> 136 * It is possible for Facebook to return either this value or {@link #getLocation()}. If {@link #getLocation()} 137 * returns {@code null}, then check this method to see if it has data, e.g. {@code "Philadelphia, PA"}. 138 * 139 * @return Description for this location. 140 * @since 1.6.12 141 */ 142 @java.lang.SuppressWarnings("all") 143 @lombok.Generated 144 public String getLocationAsString() { 145 return this.locationAsString; 146 } 147 148 /** 149 * Description for this location. 150 * <p> 151 * It is possible for Facebook to return either this value or {@link #getLocation()}. If {@link #getLocation()} 152 * returns {@code null}, then check this method to see if it has data, e.g. {@code "Philadelphia, PA"}. 153 * 154 * @since 1.6.12 155 */ 156 @java.lang.SuppressWarnings("all") 157 @lombok.Generated 158 public void setLocationAsString(final String locationAsString) { 159 this.locationAsString = locationAsString; 160 } 161}