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.*; 026import com.restfb.Facebook; 027 028/** 029 * Represents the <a href="https://developers.facebook.com/docs/graph-api/reference/open-graph-property-config/">Open 030 * Graph Property Config</a> type 031 */ 032public class OpenGraphPropertyConfig { 033 @Facebook("allowed_values") 034 private List<String> allowedValues = new ArrayList<>(); 035 /** 036 * For string properties, whether the value is always lowercase 037 */ 038 @Facebook("convert_lowercase") 039 private Boolean convertLowercase; 040 /** 041 * For string properties, whether the value is always uppercase 042 */ 043 @Facebook("convert_uppercase") 044 private Boolean convertUppercase; 045 /** 046 * Human-readable name of the property 047 */ 048 @Facebook("display_name") 049 private String displayName; 050 /** 051 * The name of the property to use in markup and API 052 */ 053 @Facebook("formal_name") 054 private String formalName; 055 /** 056 * Whether the property is hidden from News Feed 057 */ 058 @Facebook("hide_from_news_feed") 059 private Boolean hideFromNewsFeed; 060 /** 061 * Whether the property takes multiple values 062 */ 063 @Facebook("is_array") 064 private Boolean isArray; 065 /** 066 * For numeric properties, the upper bound on the value 067 */ 068 @Facebook("max_allowed") 069 private Double maxAllowed; 070 /** 071 * For string properties, the upper bound on the value length 072 */ 073 @Facebook("max_length") 074 private Integer maxLength; 075 /** 076 * For numeric properties, the lower bound on the value 077 */ 078 @Facebook("min_allowed") 079 private Double minAllowed; 080 /** 081 * For string properties, the lower bound on the value length 082 */ 083 @Facebook("min_length") 084 private Integer minLength; 085 /** 086 * For reference properties, the object type associated with the property 087 */ 088 @Facebook("reference_object_type") 089 private String referenceObjectType; 090 /** 091 * Whether the property is required 092 */ 093 @Facebook 094 private Boolean required; 095 /** 096 * If set, at least one property for each group needs to be set 097 */ 098 @Facebook("required_group") 099 private String requiredGroup; 100 @Facebook("struct_config") 101 private Map<String, OpenGraphPropertyConfig> structConfig = new HashMap<>(); 102 /** 103 * Type of the property 104 */ 105 @Facebook 106 private String type; 107 108 /** 109 * For enum properties, the set of allowed values 110 * 111 * @return the set of allowed values 112 */ 113 public List<String> getAllowedValues() { 114 return Collections.unmodifiableList(allowedValues); 115 } 116 117 public boolean addAllowedValue(String value) { 118 return allowedValues.add(value); 119 } 120 121 public boolean removeAllowedValue(String value) { 122 return allowedValues.remove(value); 123 } 124 125 /** 126 * For struct properties, the config for the nested properties 127 * 128 * @return the config for the nested properties 129 */ 130 public Map<String, OpenGraphPropertyConfig> getStructConfig() { 131 return Collections.unmodifiableMap(structConfig); 132 } 133 134 public void addStructConfig(String key, OpenGraphPropertyConfig value) { 135 structConfig.put(key, value); 136 } 137 138 public void removeStructConfig(String key) { 139 structConfig.remove(key); 140 } 141 142 /** 143 * For string properties, whether the value is always lowercase 144 */ 145 @java.lang.SuppressWarnings("all") 146 @lombok.Generated 147 public Boolean getConvertLowercase() { 148 return this.convertLowercase; 149 } 150 151 /** 152 * For string properties, whether the value is always lowercase 153 */ 154 @java.lang.SuppressWarnings("all") 155 @lombok.Generated 156 public void setConvertLowercase(final Boolean convertLowercase) { 157 this.convertLowercase = convertLowercase; 158 } 159 160 /** 161 * For string properties, whether the value is always uppercase 162 */ 163 @java.lang.SuppressWarnings("all") 164 @lombok.Generated 165 public Boolean getConvertUppercase() { 166 return this.convertUppercase; 167 } 168 169 /** 170 * For string properties, whether the value is always uppercase 171 */ 172 @java.lang.SuppressWarnings("all") 173 @lombok.Generated 174 public void setConvertUppercase(final Boolean convertUppercase) { 175 this.convertUppercase = convertUppercase; 176 } 177 178 /** 179 * Human-readable name of the property 180 */ 181 @java.lang.SuppressWarnings("all") 182 @lombok.Generated 183 public String getDisplayName() { 184 return this.displayName; 185 } 186 187 /** 188 * Human-readable name of the property 189 */ 190 @java.lang.SuppressWarnings("all") 191 @lombok.Generated 192 public void setDisplayName(final String displayName) { 193 this.displayName = displayName; 194 } 195 196 /** 197 * The name of the property to use in markup and API 198 */ 199 @java.lang.SuppressWarnings("all") 200 @lombok.Generated 201 public String getFormalName() { 202 return this.formalName; 203 } 204 205 /** 206 * The name of the property to use in markup and API 207 */ 208 @java.lang.SuppressWarnings("all") 209 @lombok.Generated 210 public void setFormalName(final String formalName) { 211 this.formalName = formalName; 212 } 213 214 /** 215 * Whether the property is hidden from News Feed 216 */ 217 @java.lang.SuppressWarnings("all") 218 @lombok.Generated 219 public Boolean getHideFromNewsFeed() { 220 return this.hideFromNewsFeed; 221 } 222 223 /** 224 * Whether the property is hidden from News Feed 225 */ 226 @java.lang.SuppressWarnings("all") 227 @lombok.Generated 228 public void setHideFromNewsFeed(final Boolean hideFromNewsFeed) { 229 this.hideFromNewsFeed = hideFromNewsFeed; 230 } 231 232 /** 233 * Whether the property takes multiple values 234 */ 235 @java.lang.SuppressWarnings("all") 236 @lombok.Generated 237 public Boolean getIsArray() { 238 return this.isArray; 239 } 240 241 /** 242 * Whether the property takes multiple values 243 */ 244 @java.lang.SuppressWarnings("all") 245 @lombok.Generated 246 public void setIsArray(final Boolean isArray) { 247 this.isArray = isArray; 248 } 249 250 /** 251 * For numeric properties, the upper bound on the value 252 */ 253 @java.lang.SuppressWarnings("all") 254 @lombok.Generated 255 public Double getMaxAllowed() { 256 return this.maxAllowed; 257 } 258 259 /** 260 * For numeric properties, the upper bound on the value 261 */ 262 @java.lang.SuppressWarnings("all") 263 @lombok.Generated 264 public void setMaxAllowed(final Double maxAllowed) { 265 this.maxAllowed = maxAllowed; 266 } 267 268 /** 269 * For string properties, the upper bound on the value length 270 */ 271 @java.lang.SuppressWarnings("all") 272 @lombok.Generated 273 public Integer getMaxLength() { 274 return this.maxLength; 275 } 276 277 /** 278 * For string properties, the upper bound on the value length 279 */ 280 @java.lang.SuppressWarnings("all") 281 @lombok.Generated 282 public void setMaxLength(final Integer maxLength) { 283 this.maxLength = maxLength; 284 } 285 286 /** 287 * For numeric properties, the lower bound on the value 288 */ 289 @java.lang.SuppressWarnings("all") 290 @lombok.Generated 291 public Double getMinAllowed() { 292 return this.minAllowed; 293 } 294 295 /** 296 * For numeric properties, the lower bound on the value 297 */ 298 @java.lang.SuppressWarnings("all") 299 @lombok.Generated 300 public void setMinAllowed(final Double minAllowed) { 301 this.minAllowed = minAllowed; 302 } 303 304 /** 305 * For string properties, the lower bound on the value length 306 */ 307 @java.lang.SuppressWarnings("all") 308 @lombok.Generated 309 public Integer getMinLength() { 310 return this.minLength; 311 } 312 313 /** 314 * For string properties, the lower bound on the value length 315 */ 316 @java.lang.SuppressWarnings("all") 317 @lombok.Generated 318 public void setMinLength(final Integer minLength) { 319 this.minLength = minLength; 320 } 321 322 /** 323 * For reference properties, the object type associated with the property 324 */ 325 @java.lang.SuppressWarnings("all") 326 @lombok.Generated 327 public String getReferenceObjectType() { 328 return this.referenceObjectType; 329 } 330 331 /** 332 * For reference properties, the object type associated with the property 333 */ 334 @java.lang.SuppressWarnings("all") 335 @lombok.Generated 336 public void setReferenceObjectType(final String referenceObjectType) { 337 this.referenceObjectType = referenceObjectType; 338 } 339 340 /** 341 * Whether the property is required 342 */ 343 @java.lang.SuppressWarnings("all") 344 @lombok.Generated 345 public Boolean getRequired() { 346 return this.required; 347 } 348 349 /** 350 * Whether the property is required 351 */ 352 @java.lang.SuppressWarnings("all") 353 @lombok.Generated 354 public void setRequired(final Boolean required) { 355 this.required = required; 356 } 357 358 /** 359 * If set, at least one property for each group needs to be set 360 */ 361 @java.lang.SuppressWarnings("all") 362 @lombok.Generated 363 public String getRequiredGroup() { 364 return this.requiredGroup; 365 } 366 367 /** 368 * If set, at least one property for each group needs to be set 369 */ 370 @java.lang.SuppressWarnings("all") 371 @lombok.Generated 372 public void setRequiredGroup(final String requiredGroup) { 373 this.requiredGroup = requiredGroup; 374 } 375 376 /** 377 * Type of the property 378 */ 379 @java.lang.SuppressWarnings("all") 380 @lombok.Generated 381 public String getType() { 382 return this.type; 383 } 384 385 /** 386 * Type of the property 387 */ 388 @java.lang.SuppressWarnings("all") 389 @lombok.Generated 390 public void setType(final String type) { 391 this.type = type; 392 } 393}