001// Generated by delombok at Thu Aug 13 13:56:43 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.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  @lombok.Generated
165  public Long getAdditionalImageIndex() {
166    return this.additionalImageIndex;
167  }
168
169  /**
170   * The index (zero based) of the image from the additionalimages array to use as the ad image for a dynamic product ad
171   */
172  @java.lang.SuppressWarnings("all")
173  @lombok.Generated
174  public void setAdditionalImageIndex(final Long additionalImageIndex) {
175    this.additionalImageIndex = additionalImageIndex;
176  }
177
178  /**
179   * @return Native deeplinks attached to the post
180   */
181  @java.lang.SuppressWarnings("all")
182  @lombok.Generated
183  public AdCreativeLinkDataAppLinkSpec getAppLinkSpec() {
184    return this.appLinkSpec;
185  }
186
187  /**
188   * Native deeplinks attached to the post
189   */
190  @java.lang.SuppressWarnings("all")
191  @lombok.Generated
192  public void setAppLinkSpec(final AdCreativeLinkDataAppLinkSpec appLinkSpec) {
193    this.appLinkSpec = appLinkSpec;
194  }
195
196  /**
197   * @return The style of the attachment.
198   */
199  @java.lang.SuppressWarnings("all")
200  @lombok.Generated
201  public String getAttachmentStyle() {
202    return this.attachmentStyle;
203  }
204
205  /**
206   * The style of the attachment.
207   */
208  @java.lang.SuppressWarnings("all")
209  @lombok.Generated
210  public void setAttachmentStyle(final String attachmentStyle) {
211    this.attachmentStyle = attachmentStyle;
212  }
213
214  /**
215   * @return The branded content sponsor page id.
216   */
217  @java.lang.SuppressWarnings("all")
218  @lombok.Generated
219  public String getBrandedContentSponsorPageId() {
220    return this.brandedContentSponsorPageId;
221  }
222
223  /**
224   * The branded content sponsor page id.
225   */
226  @java.lang.SuppressWarnings("all")
227  @lombok.Generated
228  public void setBrandedContentSponsorPageId(final String brandedContentSponsorPageId) {
229    this.brandedContentSponsorPageId = brandedContentSponsorPageId;
230  }
231
232  /**
233   * @return The branded content sponsor relationship option.
234   */
235  @java.lang.SuppressWarnings("all")
236  @lombok.Generated
237  public String getBrandedContentSponsorRelationship() {
238    return this.brandedContentSponsorRelationship;
239  }
240
241  /**
242   * The branded content sponsor relationship option.
243   */
244  @java.lang.SuppressWarnings("all")
245  @lombok.Generated
246  public void setBrandedContentSponsorRelationship(final String brandedContentSponsorRelationship) {
247    this.brandedContentSponsorRelationship = brandedContentSponsorRelationship;
248  }
249
250  /**
251   * @return An optional call to action button
252   */
253  @java.lang.SuppressWarnings("all")
254  @lombok.Generated
255  public AdCreativeLinkDataCallToAction getCallToAction() {
256    return this.callToAction;
257  }
258
259  /**
260   * An optional call to action button. If not specified, on Instagram, a default CTA would be used,
261   * <code>{"type":"LEARN_MORE","value": {"link":<LINK VALUE OF LINK_DATA>,}}</code>.
262   */
263  @java.lang.SuppressWarnings("all")
264  @lombok.Generated
265  public void setCallToAction(final AdCreativeLinkDataCallToAction callToAction) {
266    this.callToAction = callToAction;
267  }
268
269  /**
270   * @return If canvas experience is enabled post click
271   */
272  @java.lang.SuppressWarnings("all")
273  @lombok.Generated
274  public Boolean getCanvasEnabled() {
275    return this.canvasEnabled;
276  }
277
278  /**
279   * If canvas experience is enabled post click
280   */
281  @java.lang.SuppressWarnings("all")
282  @lombok.Generated
283  public void setCanvasEnabled(final Boolean canvasEnabled) {
284    this.canvasEnabled = canvasEnabled;
285  }
286
287  /**
288   * @return Link caption.
289   */
290  @java.lang.SuppressWarnings("all")
291  @lombok.Generated
292  public String getCaption() {
293    return this.caption;
294  }
295
296  /**
297   * Link caption. Overwrites the caption under the title in the link on Facebook. See post for more info. This setting
298   * is not used on Instagram.
299   */
300  @java.lang.SuppressWarnings("all")
301  @lombok.Generated
302  public void setCaption(final String caption) {
303    this.caption = caption;
304  }
305
306  /**
307   */
308  @java.lang.SuppressWarnings("all")
309  @lombok.Generated
310  public List<AdCreativeLinkDataChildAttachment> getChildAttachments() {
311    return this.childAttachments;
312  }
313
314  /**
315   */
316  @java.lang.SuppressWarnings("all")
317  @lombok.Generated
318  public void setChildAttachments(final List<AdCreativeLinkDataChildAttachment> childAttachments) {
319    this.childAttachments = childAttachments;
320  }
321
322  /**
323   * @return Link description.
324   */
325  @java.lang.SuppressWarnings("all")
326  @lombok.Generated
327  public String getDescription() {
328    return this.description;
329  }
330
331  /**
332   * Link description. Overwrites the description in the link on Facebook. See post for more info. This setting is not
333   * used on Instagram.
334   */
335  @java.lang.SuppressWarnings("all")
336  @lombok.Generated
337  public void setDescription(final String description) {
338    this.description = description;
339  }
340
341  /**
342   * @return The id of a Facebook event.
343   */
344  @java.lang.SuppressWarnings("all")
345  @lombok.Generated
346  public String getEventId() {
347    return this.eventId;
348  }
349
350  /**
351   * The id of a Facebook event. This is only to be used if this creative is for a Website Clicks campaign, the Call To
352   * Action is Buy Tickets, and the link points to the ticketing website of this Facebook event.
353   */
354  @java.lang.SuppressWarnings("all")
355  @lombok.Generated
356  public void setEventId(final String eventId) {
357    this.eventId = eventId;
358  }
359
360  /**
361   * @return Whether to force the post to render in a single link format
362   */
363  @java.lang.SuppressWarnings("all")
364  @lombok.Generated
365  public Boolean getForceSingleLink() {
366    return this.forceSingleLink;
367  }
368
369  /**
370   * Whether to force the post to render in a single link format
371   */
372  @java.lang.SuppressWarnings("all")
373  @lombok.Generated
374  public void setForceSingleLink(final Boolean forceSingleLink) {
375    this.forceSingleLink = forceSingleLink;
376  }
377
378  /**
379   * @return How to the image should be cropped.
380   */
381  @java.lang.SuppressWarnings("all")
382  @lombok.Generated
383  public AdsImageCrops getImageCrops() {
384    return this.imageCrops;
385  }
386
387  /**
388   * How to the image should be cropped. Different placements use different crop specs. For example, Facebook News Feed
389   * uses the crop spec with 191x100 key, and Instagram uses 100x100 crop spec.
390   */
391  @java.lang.SuppressWarnings("all")
392  @lombok.Generated
393  public void setImageCrops(final AdsImageCrops imageCrops) {
394    this.imageCrops = imageCrops;
395  }
396
397  /**
398   * @return Hash of an image in your image library with Facebook.
399   */
400  @java.lang.SuppressWarnings("all")
401  @lombok.Generated
402  public String getImageHash() {
403    return this.imageHash;
404  }
405
406  /**
407   * Hash of an image in your image library with Facebook. Specify this field or picture but not both
408   */
409  @java.lang.SuppressWarnings("all")
410  @lombok.Generated
411  public void setImageHash(final String imageHash) {
412    this.imageHash = imageHash;
413  }
414
415  /**
416   * @return Link url
417   */
418  @java.lang.SuppressWarnings("all")
419  @lombok.Generated
420  public String getLink() {
421    return this.link;
422  }
423
424  /**
425   * Link url. See post for more info. This field is required for a carousel ad .
426   */
427  @java.lang.SuppressWarnings("all")
428  @lombok.Generated
429  public void setLink(final String link) {
430    this.link = link;
431  }
432
433  /**
434   * @return The main body of the post
435   */
436  @Override
437  @java.lang.SuppressWarnings("all")
438  @lombok.Generated
439  public String getMessage() {
440    return this.message;
441  }
442
443  /**
444   * The main body of the post. See post for more info. This field is required for a carousel ad .
445   */
446  @java.lang.SuppressWarnings("all")
447  @lombok.Generated
448  public void setMessage(final String message) {
449    this.message = message;
450  }
451
452  /**
453   * @return If set to false, removes the end card which displays the page icon.
454   */
455  @java.lang.SuppressWarnings("all")
456  @lombok.Generated
457  public Boolean getMultiShareEndCard() {
458    return this.multiShareEndCard;
459  }
460
461  /**
462   * If set to false, removes the end card which displays the page icon. Default is true. Used by carousel ads.
463   */
464  @java.lang.SuppressWarnings("all")
465  @lombok.Generated
466  public void setMultiShareEndCard(final Boolean multiShareEndCard) {
467    this.multiShareEndCard = multiShareEndCard;
468  }
469
470  /**
471   * @return If set to true, automatically select and order images and links.
472   */
473  @java.lang.SuppressWarnings("all")
474  @lombok.Generated
475  public Boolean getMultiShareOptimized() {
476    return this.multiShareOptimized;
477  }
478
479  /**
480   * If set to true, automatically select and order images and links. Default is true. Used by carousel ads.
481   */
482  @java.lang.SuppressWarnings("all")
483  @lombok.Generated
484  public void setMultiShareOptimized(final Boolean multiShareOptimized) {
485    this.multiShareOptimized = multiShareOptimized;
486  }
487
488  /**
489   * @return Name of the link.
490   */
491  @java.lang.SuppressWarnings("all")
492  @lombok.Generated
493  public String getName() {
494    return this.name;
495  }
496
497  /**
498   * Name of the link. Overwrites the title of the link preview. See post for more info.
499   */
500  @java.lang.SuppressWarnings("all")
501  @lombok.Generated
502  public void setName(final String name) {
503    this.name = name;
504  }
505
506  /**
507   * @return The id of a Facebook native offer.
508   */
509  @java.lang.SuppressWarnings("all")
510  @lombok.Generated
511  public String getOfferId() {
512    return this.offerId;
513  }
514
515  /**
516   * The id of a Facebook native offer.
517   */
518  @java.lang.SuppressWarnings("all")
519  @lombok.Generated
520  public void setOfferId(final String offerId) {
521    this.offerId = offerId;
522  }
523
524  /**
525   * @return A welcome text from page to user on Messenger once a user performs send message action on an ad.
526   */
527  @java.lang.SuppressWarnings("all")
528  @lombok.Generated
529  public String getPageWelcomeMessage() {
530    return this.pageWelcomeMessage;
531  }
532
533  /**
534   * A welcome text from page to user on Messenger once a user performs send message action on an ad.
535   */
536  @java.lang.SuppressWarnings("all")
537  @lombok.Generated
538  public void setPageWelcomeMessage(final String pageWelcomeMessage) {
539    this.pageWelcomeMessage = pageWelcomeMessage;
540  }
541
542  /**
543   * @return URL of a picture to use in the post.
544   */
545  @java.lang.SuppressWarnings("all")
546  @lombok.Generated
547  public String getPicture() {
548    return this.picture;
549  }
550
551  /**
552   * URL of a picture to use in the post. Specify this field or image_hash but not both. See post for more info. The
553   * image specified at the URL will be saved into the ad accounts image library
554   */
555  @java.lang.SuppressWarnings("all")
556  @lombok.Generated
557  public void setPicture(final String picture) {
558    this.picture = picture;
559  }
560
561  @java.lang.SuppressWarnings("all")
562  @lombok.Generated
563  public AdCreativePostClickConfiguration getPostClickConfiguration() {
564    return this.postClickConfiguration;
565  }
566
567  @java.lang.SuppressWarnings("all")
568  @lombok.Generated
569  public void setPostClickConfiguration(final AdCreativePostClickConfiguration postClickConfiguration) {
570    this.postClickConfiguration = postClickConfiguration;
571  }
572
573  /**
574   * @return List of product IDs provided by the advertiser for Collections
575   */
576  @java.lang.SuppressWarnings("all")
577  @lombok.Generated
578  public List<String> getRetailerItemIds() {
579    return this.retailerItemIds;
580  }
581
582  /**
583   * List of product IDs provided by the advertiser for Collections
584   */
585  @java.lang.SuppressWarnings("all")
586  @lombok.Generated
587  public void setRetailerItemIds(final List<String> retailerItemIds) {
588    this.retailerItemIds = retailerItemIds;
589  }
590}