001// Generated by delombok at Fri Oct 04 16:05:59 CEST 2024 002/* 003 * Copyright (c) 2010-2024 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.ads; 024 025import java.util.List; 026import com.restfb.Facebook; 027import com.restfb.types.AbstractFacebookType; 028import com.restfb.types.features.HasMessage; 029 030/** 031 * Represents the 032 * <a href="https://developers.facebook.com/docs/marketing-api/reference/ad-creative-link-data/">AdCreativeLinkData</a> 033 * Marketing API type 034 */ 035public class AdCreativeLinkData extends AbstractFacebookType implements HasMessage { 036 /** 037 * The index (zero based) of the image from the additionalimages array to use as the ad image for a dynamic product ad 038 */ 039 @Facebook("additional_image_index") 040 private Long additionalImageIndex; 041 /** 042 * Native deeplinks attached to the post 043 */ 044 @Facebook("app_link_spec") 045 private AdCreativeLinkDataAppLinkSpec appLinkSpec; 046 /** 047 * The style of the attachment. 048 */ 049 @Facebook("attachment_style") 050 private String attachmentStyle; 051 /** 052 * The branded content sponsor page id. 053 */ 054 @Facebook("branded_content_sponsor_page_id") 055 private String brandedContentSponsorPageId; 056 /** 057 * The branded content sponsor relationship option. 058 */ 059 @Facebook("branded_content_sponsor_relationship") 060 private String brandedContentSponsorRelationship; 061 /** 062 * An optional call to action button. If not specified, on Instagram, a default CTA would be used, 063 * <code>{"type":"LEARN_MORE","value": {"link":<LINK VALUE OF LINK_DATA>,}}</code>. 064 */ 065 @Facebook("call_to_action") 066 private AdCreativeLinkDataCallToAction callToAction; 067 /** 068 * If canvas experience is enabled post click 069 */ 070 @Facebook("canvas_enabled") 071 private Boolean canvasEnabled; 072 /** 073 * Link caption. Overwrites the caption under the title in the link on Facebook. See post for more info. This setting 074 * is not used on Instagram. 075 */ 076 @Facebook 077 private String caption; 078 /** 079 */ 080 @Facebook("child_attachments") 081 private List<AdCreativeLinkDataChildAttachment> childAttachments; 082 /** 083 * Link description. Overwrites the description in the link on Facebook. See post for more info. This setting is not 084 * used on Instagram. 085 */ 086 @Facebook 087 private String description; 088 /** 089 * The id of a Facebook event. This is only to be used if this creative is for a Website Clicks campaign, the Call To 090 * Action is Buy Tickets, and the link points to the ticketing website of this Facebook event. 091 */ 092 @Facebook("event_id") 093 private String eventId; 094 /** 095 * Whether to force the post to render in a single link format 096 */ 097 @Facebook("force_single_link") 098 private Boolean forceSingleLink; 099 /** 100 * How to the image should be cropped. Different placements use different crop specs. For example, Facebook News Feed 101 * uses the crop spec with 191x100 key, and Instagram uses 100x100 crop spec. 102 */ 103 @Facebook("image_crops") 104 private AdsImageCrops imageCrops; 105 /** 106 * Hash of an image in your image library with Facebook. Specify this field or picture but not both 107 */ 108 @Facebook("image_hash") 109 private String imageHash; 110 /** 111 * Link url. See post for more info. This field is required for a carousel ad . 112 */ 113 @Facebook 114 private String link; 115 /** 116 * The main body of the post. See post for more info. This field is required for a carousel ad . 117 */ 118 @Facebook 119 private String message; 120 /** 121 * If set to false, removes the end card which displays the page icon. Default is true. Used by carousel ads. 122 */ 123 @Facebook("multi_share_end_card") 124 private Boolean multiShareEndCard; 125 /** 126 * If set to true, automatically select and order images and links. Default is true. Used by carousel ads. 127 */ 128 @Facebook("multi_share_optimized") 129 private Boolean multiShareOptimized; 130 /** 131 * Name of the link. Overwrites the title of the link preview. See post for more info. 132 */ 133 @Facebook 134 private String name; 135 /** 136 * The id of a Facebook native offer. 137 */ 138 @Facebook("offer_id") 139 private String offerId; 140 /** 141 * A welcome text from page to user on Messenger once a user performs send message action on an ad. 142 */ 143 @Facebook("page_welcome_message") 144 private String pageWelcomeMessage; 145 /** 146 * URL of a picture to use in the post. Specify this field or image_hash but not both. See post for more info. The 147 * image specified at the URL will be saved into the ad accounts image library 148 */ 149 @Facebook 150 private String picture; 151 @Facebook("post_click_configuration") 152 private AdCreativePostClickConfiguration postClickConfiguration; 153 /** 154 * List of product IDs provided by the advertiser for Collections 155 */ 156 @Facebook("retailer_item_ids") 157 private List<String> retailerItemIds; 158 159 /** 160 * @return The index (zero based) of the image from the additionalimages array to use as the ad image for a dynamic 161 * product ad 162 */ 163 @java.lang.SuppressWarnings("all") 164 public Long getAdditionalImageIndex() { 165 return this.additionalImageIndex; 166 } 167 168 /** 169 * The index (zero based) of the image from the additionalimages array to use as the ad image for a dynamic product ad 170 */ 171 @java.lang.SuppressWarnings("all") 172 public void setAdditionalImageIndex(final Long additionalImageIndex) { 173 this.additionalImageIndex = additionalImageIndex; 174 } 175 176 /** 177 * @return Native deeplinks attached to the post 178 */ 179 @java.lang.SuppressWarnings("all") 180 public AdCreativeLinkDataAppLinkSpec getAppLinkSpec() { 181 return this.appLinkSpec; 182 } 183 184 /** 185 * Native deeplinks attached to the post 186 */ 187 @java.lang.SuppressWarnings("all") 188 public void setAppLinkSpec(final AdCreativeLinkDataAppLinkSpec appLinkSpec) { 189 this.appLinkSpec = appLinkSpec; 190 } 191 192 /** 193 * @return The style of the attachment. 194 */ 195 @java.lang.SuppressWarnings("all") 196 public String getAttachmentStyle() { 197 return this.attachmentStyle; 198 } 199 200 /** 201 * The style of the attachment. 202 */ 203 @java.lang.SuppressWarnings("all") 204 public void setAttachmentStyle(final String attachmentStyle) { 205 this.attachmentStyle = attachmentStyle; 206 } 207 208 /** 209 * @return The branded content sponsor page id. 210 */ 211 @java.lang.SuppressWarnings("all") 212 public String getBrandedContentSponsorPageId() { 213 return this.brandedContentSponsorPageId; 214 } 215 216 /** 217 * The branded content sponsor page id. 218 */ 219 @java.lang.SuppressWarnings("all") 220 public void setBrandedContentSponsorPageId(final String brandedContentSponsorPageId) { 221 this.brandedContentSponsorPageId = brandedContentSponsorPageId; 222 } 223 224 /** 225 * @return The branded content sponsor relationship option. 226 */ 227 @java.lang.SuppressWarnings("all") 228 public String getBrandedContentSponsorRelationship() { 229 return this.brandedContentSponsorRelationship; 230 } 231 232 /** 233 * The branded content sponsor relationship option. 234 */ 235 @java.lang.SuppressWarnings("all") 236 public void setBrandedContentSponsorRelationship(final String brandedContentSponsorRelationship) { 237 this.brandedContentSponsorRelationship = brandedContentSponsorRelationship; 238 } 239 240 /** 241 * @return An optional call to action button 242 */ 243 @java.lang.SuppressWarnings("all") 244 public AdCreativeLinkDataCallToAction getCallToAction() { 245 return this.callToAction; 246 } 247 248 /** 249 * An optional call to action button. If not specified, on Instagram, a default CTA would be used, 250 * <code>{"type":"LEARN_MORE","value": {"link":<LINK VALUE OF LINK_DATA>,}}</code>. 251 */ 252 @java.lang.SuppressWarnings("all") 253 public void setCallToAction(final AdCreativeLinkDataCallToAction callToAction) { 254 this.callToAction = callToAction; 255 } 256 257 /** 258 * @return If canvas experience is enabled post click 259 */ 260 @java.lang.SuppressWarnings("all") 261 public Boolean getCanvasEnabled() { 262 return this.canvasEnabled; 263 } 264 265 /** 266 * If canvas experience is enabled post click 267 */ 268 @java.lang.SuppressWarnings("all") 269 public void setCanvasEnabled(final Boolean canvasEnabled) { 270 this.canvasEnabled = canvasEnabled; 271 } 272 273 /** 274 * @return Link caption. 275 */ 276 @java.lang.SuppressWarnings("all") 277 public String getCaption() { 278 return this.caption; 279 } 280 281 /** 282 * Link caption. Overwrites the caption under the title in the link on Facebook. See post for more info. This setting 283 * is not used on Instagram. 284 */ 285 @java.lang.SuppressWarnings("all") 286 public void setCaption(final String caption) { 287 this.caption = caption; 288 } 289 290 /** 291 */ 292 @java.lang.SuppressWarnings("all") 293 public List<AdCreativeLinkDataChildAttachment> getChildAttachments() { 294 return this.childAttachments; 295 } 296 297 /** 298 */ 299 @java.lang.SuppressWarnings("all") 300 public void setChildAttachments(final List<AdCreativeLinkDataChildAttachment> childAttachments) { 301 this.childAttachments = childAttachments; 302 } 303 304 /** 305 * @return Link description. 306 */ 307 @java.lang.SuppressWarnings("all") 308 public String getDescription() { 309 return this.description; 310 } 311 312 /** 313 * Link description. Overwrites the description in the link on Facebook. See post for more info. This setting is not 314 * used on Instagram. 315 */ 316 @java.lang.SuppressWarnings("all") 317 public void setDescription(final String description) { 318 this.description = description; 319 } 320 321 /** 322 * @return The id of a Facebook event. 323 */ 324 @java.lang.SuppressWarnings("all") 325 public String getEventId() { 326 return this.eventId; 327 } 328 329 /** 330 * The id of a Facebook event. This is only to be used if this creative is for a Website Clicks campaign, the Call To 331 * Action is Buy Tickets, and the link points to the ticketing website of this Facebook event. 332 */ 333 @java.lang.SuppressWarnings("all") 334 public void setEventId(final String eventId) { 335 this.eventId = eventId; 336 } 337 338 /** 339 * @return Whether to force the post to render in a single link format 340 */ 341 @java.lang.SuppressWarnings("all") 342 public Boolean getForceSingleLink() { 343 return this.forceSingleLink; 344 } 345 346 /** 347 * Whether to force the post to render in a single link format 348 */ 349 @java.lang.SuppressWarnings("all") 350 public void setForceSingleLink(final Boolean forceSingleLink) { 351 this.forceSingleLink = forceSingleLink; 352 } 353 354 /** 355 * @return How to the image should be cropped. 356 */ 357 @java.lang.SuppressWarnings("all") 358 public AdsImageCrops getImageCrops() { 359 return this.imageCrops; 360 } 361 362 /** 363 * How to the image should be cropped. Different placements use different crop specs. For example, Facebook News Feed 364 * uses the crop spec with 191x100 key, and Instagram uses 100x100 crop spec. 365 */ 366 @java.lang.SuppressWarnings("all") 367 public void setImageCrops(final AdsImageCrops imageCrops) { 368 this.imageCrops = imageCrops; 369 } 370 371 /** 372 * @return Hash of an image in your image library with Facebook. 373 */ 374 @java.lang.SuppressWarnings("all") 375 public String getImageHash() { 376 return this.imageHash; 377 } 378 379 /** 380 * Hash of an image in your image library with Facebook. Specify this field or picture but not both 381 */ 382 @java.lang.SuppressWarnings("all") 383 public void setImageHash(final String imageHash) { 384 this.imageHash = imageHash; 385 } 386 387 /** 388 * @return Link url 389 */ 390 @java.lang.SuppressWarnings("all") 391 public String getLink() { 392 return this.link; 393 } 394 395 /** 396 * Link url. See post for more info. This field is required for a carousel ad . 397 */ 398 @java.lang.SuppressWarnings("all") 399 public void setLink(final String link) { 400 this.link = link; 401 } 402 403 /** 404 * @return The main body of the post 405 */ 406 @Override 407 @java.lang.SuppressWarnings("all") 408 public String getMessage() { 409 return this.message; 410 } 411 412 /** 413 * The main body of the post. See post for more info. This field is required for a carousel ad . 414 */ 415 @java.lang.SuppressWarnings("all") 416 public void setMessage(final String message) { 417 this.message = message; 418 } 419 420 /** 421 * @return If set to false, removes the end card which displays the page icon. 422 */ 423 @java.lang.SuppressWarnings("all") 424 public Boolean getMultiShareEndCard() { 425 return this.multiShareEndCard; 426 } 427 428 /** 429 * If set to false, removes the end card which displays the page icon. Default is true. Used by carousel ads. 430 */ 431 @java.lang.SuppressWarnings("all") 432 public void setMultiShareEndCard(final Boolean multiShareEndCard) { 433 this.multiShareEndCard = multiShareEndCard; 434 } 435 436 /** 437 * @return If set to true, automatically select and order images and links. 438 */ 439 @java.lang.SuppressWarnings("all") 440 public Boolean getMultiShareOptimized() { 441 return this.multiShareOptimized; 442 } 443 444 /** 445 * If set to true, automatically select and order images and links. Default is true. Used by carousel ads. 446 */ 447 @java.lang.SuppressWarnings("all") 448 public void setMultiShareOptimized(final Boolean multiShareOptimized) { 449 this.multiShareOptimized = multiShareOptimized; 450 } 451 452 /** 453 * @return Name of the link. 454 */ 455 @java.lang.SuppressWarnings("all") 456 public String getName() { 457 return this.name; 458 } 459 460 /** 461 * Name of the link. Overwrites the title of the link preview. See post for more info. 462 */ 463 @java.lang.SuppressWarnings("all") 464 public void setName(final String name) { 465 this.name = name; 466 } 467 468 /** 469 * @return The id of a Facebook native offer. 470 */ 471 @java.lang.SuppressWarnings("all") 472 public String getOfferId() { 473 return this.offerId; 474 } 475 476 /** 477 * The id of a Facebook native offer. 478 */ 479 @java.lang.SuppressWarnings("all") 480 public void setOfferId(final String offerId) { 481 this.offerId = offerId; 482 } 483 484 /** 485 * @return A welcome text from page to user on Messenger once a user performs send message action on an ad. 486 */ 487 @java.lang.SuppressWarnings("all") 488 public String getPageWelcomeMessage() { 489 return this.pageWelcomeMessage; 490 } 491 492 /** 493 * A welcome text from page to user on Messenger once a user performs send message action on an ad. 494 */ 495 @java.lang.SuppressWarnings("all") 496 public void setPageWelcomeMessage(final String pageWelcomeMessage) { 497 this.pageWelcomeMessage = pageWelcomeMessage; 498 } 499 500 /** 501 * @return URL of a picture to use in the post. 502 */ 503 @java.lang.SuppressWarnings("all") 504 public String getPicture() { 505 return this.picture; 506 } 507 508 /** 509 * URL of a picture to use in the post. Specify this field or image_hash but not both. See post for more info. The 510 * image specified at the URL will be saved into the ad accounts image library 511 */ 512 @java.lang.SuppressWarnings("all") 513 public void setPicture(final String picture) { 514 this.picture = picture; 515 } 516 517 @java.lang.SuppressWarnings("all") 518 public AdCreativePostClickConfiguration getPostClickConfiguration() { 519 return this.postClickConfiguration; 520 } 521 522 @java.lang.SuppressWarnings("all") 523 public void setPostClickConfiguration(final AdCreativePostClickConfiguration postClickConfiguration) { 524 this.postClickConfiguration = postClickConfiguration; 525 } 526 527 /** 528 * @return List of product IDs provided by the advertiser for Collections 529 */ 530 @java.lang.SuppressWarnings("all") 531 public List<String> getRetailerItemIds() { 532 return this.retailerItemIds; 533 } 534 535 /** 536 * List of product IDs provided by the advertiser for Collections 537 */ 538 @java.lang.SuppressWarnings("all") 539 public void setRetailerItemIds(final List<String> retailerItemIds) { 540 this.retailerItemIds = retailerItemIds; 541 } 542}