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