001// Generated by delombok at Tue Jul 15 20:51:47 UTC 2025 002/* 003 * Copyright (c) 2010-2025 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 java.util.ArrayList; 026import java.util.Date; 027import java.util.List; 028import com.restfb.Facebook; 029import com.restfb.types.FacebookType; 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 * Indicates if the media is a quoted reply made by another user. 089 */ 090 @Facebook("is_quote_post") 091 private Boolean isQuotePost; 092 /** 093 * true if the Threads post or reply has replies that you can see. 094 */ 095 @Facebook("has_replies") 096 private Boolean hasReplies; 097 /** 098 * Media ID of the top-level post or original thread in the reply tree. Note: This only appears on replies. 099 */ 100 @Facebook("root_post") 101 private TdReply rootPost; 102 /** 103 * Media ID of the immediate parent of the reply. Note: This only appears on replies. 104 */ 105 @Facebook("replied_to") 106 private TdReply repliedTo; 107 /** 108 * true if the Threads media is a reply. false if the Threads media is a top-level post. 109 */ 110 @Facebook("is_reply") 111 private Boolean isReply; 112 /** 113 * {@code true} if your user is the owner of the Threads reply. <br> 114 * {@code false} if another user is the owner of the Threads reply. 115 */ 116 @Facebook("is_reply_owned_by_me") 117 private Boolean isReplyOwnedByMe; 118 /** 119 * Whether or not the reply is hidden. Values: NOT_HUSHED, UNHUSHED, HIDDEN, COVERED, BLOCKED, RESTRICTED 120 */ 121 @Facebook("hide_status") 122 private TdHideStatus hideStatus; 123 /** 124 * Who can reply to your post. 125 */ 126 @Facebook("reply_audience") 127 private TdReplyAudience replyAudience; 128 129 130 public enum TdHideStatus { 131 NOT_HUSHED, UNHUSHED, HIDDEN, COVERED, BLOCKED, RESTRICTED; 132 } 133 134 135 public enum TdReplyAudience { 136 EVERYONE, // 137 ACCOUNTS_YOU_FOLLOW, // 138 MENTIONED_ONLY, // 139 PARENT_POST_AUTHOR_ONLY, // 140 FOLLOWERS_ONLY; 141 } 142 143 /** 144 * Represents text for a Threads reply. This is optional on image, video, and carousel replies. 145 */ 146 @java.lang.SuppressWarnings("all") 147 public String getText() { 148 return this.text; 149 } 150 151 /** 152 * Represents text for a Threads reply. This is optional on image, video, and carousel replies. 153 */ 154 @java.lang.SuppressWarnings("all") 155 public void setText(final String text) { 156 this.text = text; 157 } 158 159 /** 160 * Instagram username who created the post. Note: This only works for public users or your own user. 161 */ 162 @java.lang.SuppressWarnings("all") 163 public String getUsername() { 164 return this.username; 165 } 166 167 /** 168 * Instagram username who created the post. Note: This only works for public users or your own user. 169 */ 170 @java.lang.SuppressWarnings("all") 171 public void setUsername(final String username) { 172 this.username = username; 173 } 174 175 /** 176 * Permanent link to the post. Will be omitted if the media contains copyrighted material or has been flagged for a 177 * copyright violation. Note: This only works for public users or your own user. 178 */ 179 @java.lang.SuppressWarnings("all") 180 public String getPermalink() { 181 return this.permalink; 182 } 183 184 /** 185 * Permanent link to the post. Will be omitted if the media contains copyrighted material or has been flagged for a 186 * copyright violation. Note: This only works for public users or your own user. 187 */ 188 @java.lang.SuppressWarnings("all") 189 public void setPermalink(final String permalink) { 190 this.permalink = permalink; 191 } 192 193 /** 194 * The publish date and time of the post in ISO 8601 format. 195 */ 196 @java.lang.SuppressWarnings("all") 197 public Date getTimestamp() { 198 return this.timestamp; 199 } 200 201 /** 202 * The publish date and time of the post in ISO 8601 format. 203 */ 204 @java.lang.SuppressWarnings("all") 205 public void setTimestamp(final Date timestamp) { 206 this.timestamp = timestamp; 207 } 208 209 /** 210 * Surface where the media is published. In the case of Threads, the value is THREADS. 211 */ 212 @java.lang.SuppressWarnings("all") 213 public String getMediaProductType() { 214 return this.mediaProductType; 215 } 216 217 /** 218 * Surface where the media is published. In the case of Threads, the value is THREADS. 219 */ 220 @java.lang.SuppressWarnings("all") 221 public void setMediaProductType(final String mediaProductType) { 222 this.mediaProductType = mediaProductType; 223 } 224 225 /** 226 * The media type for a Threads reply. Values: TEXT_POST, IMAGE, VIDEO, CAROUSEL_ALBUM 227 */ 228 @java.lang.SuppressWarnings("all") 229 public TdMediaType getMediaType() { 230 return this.mediaType; 231 } 232 233 /** 234 * The media type for a Threads reply. Values: TEXT_POST, IMAGE, VIDEO, CAROUSEL_ALBUM 235 */ 236 @java.lang.SuppressWarnings("all") 237 public void setMediaType(final TdMediaType mediaType) { 238 this.mediaType = mediaType; 239 } 240 241 /** 242 * The post’s media URL. This only shows for image, video, and carousel replies. 243 */ 244 @java.lang.SuppressWarnings("all") 245 public String getMediaUrl() { 246 return this.mediaUrl; 247 } 248 249 /** 250 * The post’s media URL. This only shows for image, video, and carousel replies. 251 */ 252 @java.lang.SuppressWarnings("all") 253 public void setMediaUrl(final String mediaUrl) { 254 this.mediaUrl = mediaUrl; 255 } 256 257 /** 258 * Shortcode of the media. 259 */ 260 @java.lang.SuppressWarnings("all") 261 public String getShortcode() { 262 return this.shortcode; 263 } 264 265 /** 266 * Shortcode of the media. 267 */ 268 @java.lang.SuppressWarnings("all") 269 public void setShortcode(final String shortcode) { 270 this.shortcode = shortcode; 271 } 272 273 /** 274 * URL of thumbnail. This only shows for Threads replies with video. 275 */ 276 @java.lang.SuppressWarnings("all") 277 public String getThumbnailUrl() { 278 return this.thumbnailUrl; 279 } 280 281 /** 282 * URL of thumbnail. This only shows for Threads replies with video. 283 */ 284 @java.lang.SuppressWarnings("all") 285 public void setThumbnailUrl(final String thumbnailUrl) { 286 this.thumbnailUrl = thumbnailUrl; 287 } 288 289 /** 290 * List of child posts. This only shows for carousel replies. 291 */ 292 @java.lang.SuppressWarnings("all") 293 public List<TdReply> getChildren() { 294 return this.children; 295 } 296 297 /** 298 * List of child posts. This only shows for carousel replies. 299 */ 300 @java.lang.SuppressWarnings("all") 301 public void setChildren(final List<TdReply> children) { 302 this.children = children; 303 } 304 305 /** 306 * Indicates if the media is a quoted reply made by another user. 307 */ 308 @java.lang.SuppressWarnings("all") 309 public Boolean getIsQuotePost() { 310 return this.isQuotePost; 311 } 312 313 /** 314 * Indicates if the media is a quoted reply made by another user. 315 */ 316 @java.lang.SuppressWarnings("all") 317 public void setIsQuotePost(final Boolean isQuotePost) { 318 this.isQuotePost = isQuotePost; 319 } 320 321 /** 322 * true if the Threads post or reply has replies that you can see. 323 */ 324 @java.lang.SuppressWarnings("all") 325 public Boolean getHasReplies() { 326 return this.hasReplies; 327 } 328 329 /** 330 * true if the Threads post or reply has replies that you can see. 331 */ 332 @java.lang.SuppressWarnings("all") 333 public void setHasReplies(final Boolean hasReplies) { 334 this.hasReplies = hasReplies; 335 } 336 337 /** 338 * Media ID of the top-level post or original thread in the reply tree. Note: This only appears on replies. 339 */ 340 @java.lang.SuppressWarnings("all") 341 public TdReply getRootPost() { 342 return this.rootPost; 343 } 344 345 /** 346 * Media ID of the top-level post or original thread in the reply tree. Note: This only appears on replies. 347 */ 348 @java.lang.SuppressWarnings("all") 349 public void setRootPost(final TdReply rootPost) { 350 this.rootPost = rootPost; 351 } 352 353 /** 354 * Media ID of the immediate parent of the reply. Note: This only appears on replies. 355 */ 356 @java.lang.SuppressWarnings("all") 357 public TdReply getRepliedTo() { 358 return this.repliedTo; 359 } 360 361 /** 362 * Media ID of the immediate parent of the reply. Note: This only appears on replies. 363 */ 364 @java.lang.SuppressWarnings("all") 365 public void setRepliedTo(final TdReply repliedTo) { 366 this.repliedTo = repliedTo; 367 } 368 369 /** 370 * true if the Threads media is a reply. false if the Threads media is a top-level post. 371 */ 372 @java.lang.SuppressWarnings("all") 373 public Boolean getIsReply() { 374 return this.isReply; 375 } 376 377 /** 378 * true if the Threads media is a reply. false if the Threads media is a top-level post. 379 */ 380 @java.lang.SuppressWarnings("all") 381 public void setIsReply(final Boolean isReply) { 382 this.isReply = isReply; 383 } 384 385 /** 386 * {@code true} if your user is the owner of the Threads reply. <br> 387 * {@code false} if another user is the owner of the Threads reply. 388 */ 389 @java.lang.SuppressWarnings("all") 390 public Boolean getIsReplyOwnedByMe() { 391 return this.isReplyOwnedByMe; 392 } 393 394 /** 395 * {@code true} if your user is the owner of the Threads reply. <br> 396 * {@code false} if another user is the owner of the Threads reply. 397 */ 398 @java.lang.SuppressWarnings("all") 399 public void setIsReplyOwnedByMe(final Boolean isReplyOwnedByMe) { 400 this.isReplyOwnedByMe = isReplyOwnedByMe; 401 } 402 403 /** 404 * Whether or not the reply is hidden. Values: NOT_HUSHED, UNHUSHED, HIDDEN, COVERED, BLOCKED, RESTRICTED 405 */ 406 @java.lang.SuppressWarnings("all") 407 public TdHideStatus getHideStatus() { 408 return this.hideStatus; 409 } 410 411 /** 412 * Whether or not the reply is hidden. Values: NOT_HUSHED, UNHUSHED, HIDDEN, COVERED, BLOCKED, RESTRICTED 413 */ 414 @java.lang.SuppressWarnings("all") 415 public void setHideStatus(final TdHideStatus hideStatus) { 416 this.hideStatus = hideStatus; 417 } 418 419 /** 420 * Who can reply to your post. 421 */ 422 @java.lang.SuppressWarnings("all") 423 public TdReplyAudience getReplyAudience() { 424 return this.replyAudience; 425 } 426 427 /** 428 * Who can reply to your post. 429 */ 430 @java.lang.SuppressWarnings("all") 431 public void setReplyAudience(final TdReplyAudience replyAudience) { 432 this.replyAudience = replyAudience; 433 } 434}