001// Generated by delombok at Sun Apr 14 14:59:49 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.threads;
024
025import com.restfb.Facebook;
026import com.restfb.types.FacebookType;
027import java.util.ArrayList;
028import java.util.Date;
029import java.util.List;
030
031/**
032 * Represents the <a href="https://developers.facebook.com/docs/threads/reply-moderation">Reply or Conversation type</a>
033 */
034public class TdReply extends FacebookType {
035  private static final long serialVersionUID = 1L;
036  /**
037   * Represents text for a Threads reply. This is optional on image, video, and carousel replies.
038   */
039  @Facebook
040  private String text;
041  /**
042   * Instagram username who created the post. Note: This only works for public users or your own user.
043   */
044  @Facebook
045  private String username;
046  /**
047   * Permanent link to the post. Will be omitted if the media contains copyrighted material or has been flagged for a
048   * copyright violation. Note: This only works for public users or your own user.
049   */
050  @Facebook
051  private String permalink;
052  /**
053   * The publish date and time of the post in ISO 8601 format.
054   */
055  @Facebook
056  private Date timestamp;
057  /**
058   * Surface where the media is published. In the case of Threads, the value is THREADS.
059   */
060  @Facebook("media_product_type")
061  private String mediaProductType;
062  /**
063   * The media type for a Threads reply. Values: TEXT_POST, IMAGE, VIDEO, CAROUSEL_ALBUM
064   */
065  @Facebook("media_type")
066  private TdMediaType mediaType;
067  /**
068   * The post’s media URL. This only shows for image, video, and carousel replies.
069   */
070  @Facebook("media_url")
071  private String mediaUrl;
072  /**
073   * Shortcode of the media.
074   */
075  @Facebook
076  private String shortcode;
077  /**
078   * URL of thumbnail. This only shows for Threads replies with video.
079   */
080  @Facebook("thumbnail_url")
081  private String thumbnailUrl;
082  /**
083   * List of child posts. This only shows for carousel replies.
084   */
085  @Facebook
086  private List<TdReply> children = new ArrayList<>();
087  /**
088   * true if the Threads post or reply has replies that you can see.
089   */
090  @Facebook("has_replies")
091  private Boolean hasReplies;
092  /**
093   * Media ID of the top-level post or original thread in the reply tree. Note: This only appears on replies.
094   */
095  @Facebook("root_post")
096  private TdReply rootPost;
097  /**
098   * Media ID of the immediate parent of the reply. Note: This only appears on replies.
099   */
100  @Facebook("replied_to")
101  private TdReply repliedTo;
102  /**
103   * true if the Threads media is a reply. false if the Threads media is a top-level post.
104   */
105  @Facebook("is_reply")
106  private Boolean isReply;
107  /**
108   * Whether or not the reply is hidden. Values: NOT_HUSHED, UNHUSHED, HIDDEN
109   */
110  @Facebook("hide_status")
111  private TdHideStatus hideStatus;
112
113
114  public enum TdHideStatus {
115    NOT_HUSHED, UNHUSHED, HIDDEN;
116  }
117
118  /**
119   * Represents text for a Threads reply. This is optional on image, video, and carousel replies.
120   */
121  @java.lang.SuppressWarnings("all")
122  public String getText() {
123    return this.text;
124  }
125
126  /**
127   * Represents text for a Threads reply. This is optional on image, video, and carousel replies.
128   */
129  @java.lang.SuppressWarnings("all")
130  public void setText(final String text) {
131    this.text = text;
132  }
133
134  /**
135   * Instagram username who created the post. Note: This only works for public users or your own user.
136   */
137  @java.lang.SuppressWarnings("all")
138  public String getUsername() {
139    return this.username;
140  }
141
142  /**
143   * Instagram username who created the post. Note: This only works for public users or your own user.
144   */
145  @java.lang.SuppressWarnings("all")
146  public void setUsername(final String username) {
147    this.username = username;
148  }
149
150  /**
151   * Permanent link to the post. Will be omitted if the media contains copyrighted material or has been flagged for a
152   * copyright violation. Note: This only works for public users or your own user.
153   */
154  @java.lang.SuppressWarnings("all")
155  public String getPermalink() {
156    return this.permalink;
157  }
158
159  /**
160   * Permanent link to the post. Will be omitted if the media contains copyrighted material or has been flagged for a
161   * copyright violation. Note: This only works for public users or your own user.
162   */
163  @java.lang.SuppressWarnings("all")
164  public void setPermalink(final String permalink) {
165    this.permalink = permalink;
166  }
167
168  /**
169   * The publish date and time of the post in ISO 8601 format.
170   */
171  @java.lang.SuppressWarnings("all")
172  public Date getTimestamp() {
173    return this.timestamp;
174  }
175
176  /**
177   * The publish date and time of the post in ISO 8601 format.
178   */
179  @java.lang.SuppressWarnings("all")
180  public void setTimestamp(final Date timestamp) {
181    this.timestamp = timestamp;
182  }
183
184  /**
185   * Surface where the media is published. In the case of Threads, the value is THREADS.
186   */
187  @java.lang.SuppressWarnings("all")
188  public String getMediaProductType() {
189    return this.mediaProductType;
190  }
191
192  /**
193   * Surface where the media is published. In the case of Threads, the value is THREADS.
194   */
195  @java.lang.SuppressWarnings("all")
196  public void setMediaProductType(final String mediaProductType) {
197    this.mediaProductType = mediaProductType;
198  }
199
200  /**
201   * The media type for a Threads reply. Values: TEXT_POST, IMAGE, VIDEO, CAROUSEL_ALBUM
202   */
203  @java.lang.SuppressWarnings("all")
204  public TdMediaType getMediaType() {
205    return this.mediaType;
206  }
207
208  /**
209   * The media type for a Threads reply. Values: TEXT_POST, IMAGE, VIDEO, CAROUSEL_ALBUM
210   */
211  @java.lang.SuppressWarnings("all")
212  public void setMediaType(final TdMediaType mediaType) {
213    this.mediaType = mediaType;
214  }
215
216  /**
217   * The post’s media URL. This only shows for image, video, and carousel replies.
218   */
219  @java.lang.SuppressWarnings("all")
220  public String getMediaUrl() {
221    return this.mediaUrl;
222  }
223
224  /**
225   * The post’s media URL. This only shows for image, video, and carousel replies.
226   */
227  @java.lang.SuppressWarnings("all")
228  public void setMediaUrl(final String mediaUrl) {
229    this.mediaUrl = mediaUrl;
230  }
231
232  /**
233   * Shortcode of the media.
234   */
235  @java.lang.SuppressWarnings("all")
236  public String getShortcode() {
237    return this.shortcode;
238  }
239
240  /**
241   * Shortcode of the media.
242   */
243  @java.lang.SuppressWarnings("all")
244  public void setShortcode(final String shortcode) {
245    this.shortcode = shortcode;
246  }
247
248  /**
249   * URL of thumbnail. This only shows for Threads replies with video.
250   */
251  @java.lang.SuppressWarnings("all")
252  public String getThumbnailUrl() {
253    return this.thumbnailUrl;
254  }
255
256  /**
257   * URL of thumbnail. This only shows for Threads replies with video.
258   */
259  @java.lang.SuppressWarnings("all")
260  public void setThumbnailUrl(final String thumbnailUrl) {
261    this.thumbnailUrl = thumbnailUrl;
262  }
263
264  /**
265   * List of child posts. This only shows for carousel replies.
266   */
267  @java.lang.SuppressWarnings("all")
268  public List<TdReply> getChildren() {
269    return this.children;
270  }
271
272  /**
273   * List of child posts. This only shows for carousel replies.
274   */
275  @java.lang.SuppressWarnings("all")
276  public void setChildren(final List<TdReply> children) {
277    this.children = children;
278  }
279
280  /**
281   * true if the Threads post or reply has replies that you can see.
282   */
283  @java.lang.SuppressWarnings("all")
284  public Boolean getHasReplies() {
285    return this.hasReplies;
286  }
287
288  /**
289   * true if the Threads post or reply has replies that you can see.
290   */
291  @java.lang.SuppressWarnings("all")
292  public void setHasReplies(final Boolean hasReplies) {
293    this.hasReplies = hasReplies;
294  }
295
296  /**
297   * Media ID of the top-level post or original thread in the reply tree. Note: This only appears on replies.
298   */
299  @java.lang.SuppressWarnings("all")
300  public TdReply getRootPost() {
301    return this.rootPost;
302  }
303
304  /**
305   * Media ID of the top-level post or original thread in the reply tree. Note: This only appears on replies.
306   */
307  @java.lang.SuppressWarnings("all")
308  public void setRootPost(final TdReply rootPost) {
309    this.rootPost = rootPost;
310  }
311
312  /**
313   * Media ID of the immediate parent of the reply. Note: This only appears on replies.
314   */
315  @java.lang.SuppressWarnings("all")
316  public TdReply getRepliedTo() {
317    return this.repliedTo;
318  }
319
320  /**
321   * Media ID of the immediate parent of the reply. Note: This only appears on replies.
322   */
323  @java.lang.SuppressWarnings("all")
324  public void setRepliedTo(final TdReply repliedTo) {
325    this.repliedTo = repliedTo;
326  }
327
328  /**
329   * true if the Threads media is a reply. false if the Threads media is a top-level post.
330   */
331  @java.lang.SuppressWarnings("all")
332  public Boolean getIsReply() {
333    return this.isReply;
334  }
335
336  /**
337   * true if the Threads media is a reply. false if the Threads media is a top-level post.
338   */
339  @java.lang.SuppressWarnings("all")
340  public void setIsReply(final Boolean isReply) {
341    this.isReply = isReply;
342  }
343
344  /**
345   * Whether or not the reply is hidden. Values: NOT_HUSHED, UNHUSHED, HIDDEN
346   */
347  @java.lang.SuppressWarnings("all")
348  public TdHideStatus getHideStatus() {
349    return this.hideStatus;
350  }
351
352  /**
353   * Whether or not the reply is hidden. Values: NOT_HUSHED, UNHUSHED, HIDDEN
354   */
355  @java.lang.SuppressWarnings("all")
356  public void setHideStatus(final TdHideStatus hideStatus) {
357    this.hideStatus = hideStatus;
358  }
359}