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 java.util.Date; 026import com.restfb.Facebook; 027import com.restfb.types.features.HasCreatedTime; 028 029/** 030 * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/v2.5/open-graph-rating/"> Open Graph 031 * Rating API type</a>. 032 * 033 * @author Alexander Nenkov 034 * @since 1.20.0 035 */ 036public class OpenGraphRating extends FacebookType implements HasCreatedTime { 037 /** 038 * When the reviewer rated this object. 039 */ 040 @Facebook("created_time") 041 private Date createdTime; 042 /** 043 * Was a rating included 044 */ 045 @Facebook("has_rating") 046 private Boolean hasRating; 047 /** 048 * Was there text in the rating 049 */ 050 @Facebook("has_review") 051 private Boolean hasReview; 052 /** 053 * Rating 054 */ 055 @Facebook("rating") 056 private Integer rating; 057 /** 058 * Review text included in the review 059 */ 060 @Facebook("review_text") 061 private String reviewText; 062 /** 063 * Person who rated the object 064 */ 065 @Facebook("reviewer") 066 private User reviewer; 067 /** 068 * Recommendation field for change on August 17, 2018 069 * <p> 070 * for more information check here: 071 * <a href="https://www.facebook.com/business/recommendations">https://www.facebook.com/business/recommendations</a> 072 */ 073 @Facebook("recommendation_type") 074 private RecommendationType recommendationType; 075 /** 076 * Open Graph story generated by the rating action 077 */ 078 @Facebook("open_graph_story") 079 private PageRating openGraphStory; 080 081 /** 082 * If OpenGraphRating is a new recommendation 083 * 084 * @return <code>true</code> if it is a recommendation, <code>false</code> if it's a rating 085 */ 086 public boolean isRecommendation() { 087 return rating == null; 088 } 089 090 /** 091 * When the reviewer rated this object. 092 * 093 * @return When the reviewer rated this object. 094 */ 095 @Override 096 @java.lang.SuppressWarnings("all") 097 @lombok.Generated 098 public Date getCreatedTime() { 099 return this.createdTime; 100 } 101 102 /** 103 * When the reviewer rated this object. 104 */ 105 @java.lang.SuppressWarnings("all") 106 @lombok.Generated 107 public void setCreatedTime(final Date createdTime) { 108 this.createdTime = createdTime; 109 } 110 111 /** 112 * Was a rating included 113 * 114 * @return Was a rating included 115 */ 116 @java.lang.SuppressWarnings("all") 117 @lombok.Generated 118 public Boolean getHasRating() { 119 return this.hasRating; 120 } 121 122 /** 123 * Was a rating included 124 */ 125 @java.lang.SuppressWarnings("all") 126 @lombok.Generated 127 public void setHasRating(final Boolean hasRating) { 128 this.hasRating = hasRating; 129 } 130 131 /** 132 * Was there text in the rating 133 * 134 * @return Was there text in the rating 135 */ 136 @java.lang.SuppressWarnings("all") 137 @lombok.Generated 138 public Boolean getHasReview() { 139 return this.hasReview; 140 } 141 142 /** 143 * Was there text in the rating 144 */ 145 @java.lang.SuppressWarnings("all") 146 @lombok.Generated 147 public void setHasReview(final Boolean hasReview) { 148 this.hasReview = hasReview; 149 } 150 151 /** 152 * Rating 153 * 154 * @return Rating 155 */ 156 @java.lang.SuppressWarnings("all") 157 @lombok.Generated 158 public Integer getRating() { 159 return this.rating; 160 } 161 162 /** 163 * Rating 164 */ 165 @java.lang.SuppressWarnings("all") 166 @lombok.Generated 167 public void setRating(final Integer rating) { 168 this.rating = rating; 169 } 170 171 /** 172 * Review text included in the review 173 * 174 * @return Review text included in the review 175 */ 176 @java.lang.SuppressWarnings("all") 177 @lombok.Generated 178 public String getReviewText() { 179 return this.reviewText; 180 } 181 182 /** 183 * Review text included in the review 184 */ 185 @java.lang.SuppressWarnings("all") 186 @lombok.Generated 187 public void setReviewText(final String reviewText) { 188 this.reviewText = reviewText; 189 } 190 191 /** 192 * Person who rated the object 193 * 194 * @return Person who rated the object 195 */ 196 @java.lang.SuppressWarnings("all") 197 @lombok.Generated 198 public User getReviewer() { 199 return this.reviewer; 200 } 201 202 /** 203 * Person who rated the object 204 */ 205 @java.lang.SuppressWarnings("all") 206 @lombok.Generated 207 public void setReviewer(final User reviewer) { 208 this.reviewer = reviewer; 209 } 210 211 /** 212 * Recommendation field for change on August 17, 2018 213 * <p> 214 * for more information check here: 215 * <a href="https://www.facebook.com/business/recommendations">https://www.facebook.com/business/recommendations</a> 216 * 217 * @return the recommendation type 218 */ 219 @java.lang.SuppressWarnings("all") 220 @lombok.Generated 221 public RecommendationType getRecommendationType() { 222 return this.recommendationType; 223 } 224 225 /** 226 * Recommendation field for change on August 17, 2018 227 * <p> 228 * for more information check here: 229 * <a href="https://www.facebook.com/business/recommendations">https://www.facebook.com/business/recommendations</a> 230 */ 231 @java.lang.SuppressWarnings("all") 232 @lombok.Generated 233 public void setRecommendationType(final RecommendationType recommendationType) { 234 this.recommendationType = recommendationType; 235 } 236 237 /** 238 * Open Graph story generated by the rating action 239 * 240 * @return Open Graph story generated by the rating action 241 */ 242 @java.lang.SuppressWarnings("all") 243 @lombok.Generated 244 public PageRating getOpenGraphStory() { 245 return this.openGraphStory; 246 } 247 248 /** 249 * Open Graph story generated by the rating action 250 */ 251 @java.lang.SuppressWarnings("all") 252 @lombok.Generated 253 public void setOpenGraphStory(final PageRating openGraphStory) { 254 this.openGraphStory = openGraphStory; 255 } 256}