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/threads-media">Threads Media type</a> 033 */ 034public class TdMedia extends FacebookType { 035 private static final long serialVersionUID = -1L; 036 /** 037 * Surface where the media is published. In the case of Threads, the value is THREADS. 038 */ 039 @Facebook("media_product_type") 040 private String mediaProductType; 041 /** 042 * The media type for a Threads post will be one of these values: TEXT_POST, IMAGE, VIDEO, CAROUSEL_ALBUM, or 043 * REPOST_FACADE. 044 */ 045 @Facebook("media_type") 046 private TdMediaType mediaType; 047 /** 048 * The post’s media URL. 049 */ 050 @Facebook("media_url") 051 private String mediaUrl; 052 /** 053 * Permanent link to the post. Will be omitted if the media contains copyrighted material or has been flagged for a 054 * copyright violation. 055 */ 056 @Facebook 057 private String permalink; 058 /** 059 * Instagram user ID who created the post. 060 */ 061 @Facebook 062 private TdProfile owner; 063 /** 064 * Instagram username who created the post. 065 */ 066 @Facebook 067 private String username; 068 /** 069 * Represents text for a Threads post. 070 */ 071 @Facebook 072 private String text; 073 /** 074 * Post time. The publish date in ISO 8601 format. 075 */ 076 @Facebook 077 private Date timestamp; 078 /** 079 * Shortcode of the media. 080 */ 081 @Facebook 082 private String shortcode; 083 /** 084 * URL of thumbnail. This only shows up for Threads media with video. 085 */ 086 @Facebook("thumbnail_url") 087 private String thumbnailUrl; 088 /** 089 * List of child posts. This only shows up for carousel posts. 090 */ 091 @Facebook 092 private List<TdMedia> children = new ArrayList<>(); 093 /** 094 * Indicates if the media is a quoted post made by another user 095 */ 096 @Facebook("is_quote_post") 097 private Boolean isQuotePost; 098 099 /** 100 * Surface where the media is published. In the case of Threads, the value is THREADS. 101 */ 102 @java.lang.SuppressWarnings("all") 103 public String getMediaProductType() { 104 return this.mediaProductType; 105 } 106 107 /** 108 * Surface where the media is published. In the case of Threads, the value is THREADS. 109 */ 110 @java.lang.SuppressWarnings("all") 111 public void setMediaProductType(final String mediaProductType) { 112 this.mediaProductType = mediaProductType; 113 } 114 115 /** 116 * The media type for a Threads post will be one of these values: TEXT_POST, IMAGE, VIDEO, CAROUSEL_ALBUM, or 117 * REPOST_FACADE. 118 */ 119 @java.lang.SuppressWarnings("all") 120 public TdMediaType getMediaType() { 121 return this.mediaType; 122 } 123 124 /** 125 * The media type for a Threads post will be one of these values: TEXT_POST, IMAGE, VIDEO, CAROUSEL_ALBUM, or 126 * REPOST_FACADE. 127 */ 128 @java.lang.SuppressWarnings("all") 129 public void setMediaType(final TdMediaType mediaType) { 130 this.mediaType = mediaType; 131 } 132 133 /** 134 * The post’s media URL. 135 */ 136 @java.lang.SuppressWarnings("all") 137 public String getMediaUrl() { 138 return this.mediaUrl; 139 } 140 141 /** 142 * The post’s media URL. 143 */ 144 @java.lang.SuppressWarnings("all") 145 public void setMediaUrl(final String mediaUrl) { 146 this.mediaUrl = mediaUrl; 147 } 148 149 /** 150 * Permanent link to the post. Will be omitted if the media contains copyrighted material or has been flagged for a 151 * copyright violation. 152 */ 153 @java.lang.SuppressWarnings("all") 154 public String getPermalink() { 155 return this.permalink; 156 } 157 158 /** 159 * Permanent link to the post. Will be omitted if the media contains copyrighted material or has been flagged for a 160 * copyright violation. 161 */ 162 @java.lang.SuppressWarnings("all") 163 public void setPermalink(final String permalink) { 164 this.permalink = permalink; 165 } 166 167 /** 168 * Instagram user ID who created the post. 169 */ 170 @java.lang.SuppressWarnings("all") 171 public TdProfile getOwner() { 172 return this.owner; 173 } 174 175 /** 176 * Instagram user ID who created the post. 177 */ 178 @java.lang.SuppressWarnings("all") 179 public void setOwner(final TdProfile owner) { 180 this.owner = owner; 181 } 182 183 /** 184 * Instagram username who created the post. 185 */ 186 @java.lang.SuppressWarnings("all") 187 public String getUsername() { 188 return this.username; 189 } 190 191 /** 192 * Instagram username who created the post. 193 */ 194 @java.lang.SuppressWarnings("all") 195 public void setUsername(final String username) { 196 this.username = username; 197 } 198 199 /** 200 * Represents text for a Threads post. 201 */ 202 @java.lang.SuppressWarnings("all") 203 public String getText() { 204 return this.text; 205 } 206 207 /** 208 * Represents text for a Threads post. 209 */ 210 @java.lang.SuppressWarnings("all") 211 public void setText(final String text) { 212 this.text = text; 213 } 214 215 /** 216 * Post time. The publish date in ISO 8601 format. 217 */ 218 @java.lang.SuppressWarnings("all") 219 public Date getTimestamp() { 220 return this.timestamp; 221 } 222 223 /** 224 * Post time. The publish date in ISO 8601 format. 225 */ 226 @java.lang.SuppressWarnings("all") 227 public void setTimestamp(final Date timestamp) { 228 this.timestamp = timestamp; 229 } 230 231 /** 232 * Shortcode of the media. 233 */ 234 @java.lang.SuppressWarnings("all") 235 public String getShortcode() { 236 return this.shortcode; 237 } 238 239 /** 240 * Shortcode of the media. 241 */ 242 @java.lang.SuppressWarnings("all") 243 public void setShortcode(final String shortcode) { 244 this.shortcode = shortcode; 245 } 246 247 /** 248 * URL of thumbnail. This only shows up for Threads media with video. 249 */ 250 @java.lang.SuppressWarnings("all") 251 public String getThumbnailUrl() { 252 return this.thumbnailUrl; 253 } 254 255 /** 256 * URL of thumbnail. This only shows up for Threads media with video. 257 */ 258 @java.lang.SuppressWarnings("all") 259 public void setThumbnailUrl(final String thumbnailUrl) { 260 this.thumbnailUrl = thumbnailUrl; 261 } 262 263 /** 264 * List of child posts. This only shows up for carousel posts. 265 */ 266 @java.lang.SuppressWarnings("all") 267 public List<TdMedia> getChildren() { 268 return this.children; 269 } 270 271 /** 272 * List of child posts. This only shows up for carousel posts. 273 */ 274 @java.lang.SuppressWarnings("all") 275 public void setChildren(final List<TdMedia> children) { 276 this.children = children; 277 } 278 279 /** 280 * Indicates if the media is a quoted post made by another user 281 */ 282 @java.lang.SuppressWarnings("all") 283 public Boolean getIsQuotePost() { 284 return this.isQuotePost; 285 } 286 287 /** 288 * Indicates if the media is a quoted post made by another user 289 */ 290 @java.lang.SuppressWarnings("all") 291 public void setIsQuotePost(final Boolean isQuotePost) { 292 this.isQuotePost = isQuotePost; 293 } 294}