Package com.twitter.clientlib.model
Class TweetAttachments
- java.lang.Object
-
- com.twitter.clientlib.model.TweetAttachments
-
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class TweetAttachments extends Object
Specifies the type of attachments (if any) present in this Tweet.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTweetAttachments.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_MEDIA_KEYSstatic StringSERIALIZED_NAME_POLL_IDS
-
Constructor Summary
Constructors Constructor Description TweetAttachments()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TweetAttachmentsaddMediaKeysItem(String mediaKeysItem)TweetAttachmentsaddPollIdsItem(String pollIdsItem)booleanequals(Object o)static TweetAttachmentsfromJson(String jsonString)Create an instance of TweetAttachments given an JSON stringList<String>getMediaKeys()A list of Media Keys for each one of the media attachments (if media are attached).List<String>getPollIds()A list of poll IDs (if polls are attached).inthashCode()TweetAttachmentsmediaKeys(List<String> mediaKeys)TweetAttachmentspollIds(List<String> pollIds)voidsetMediaKeys(List<String> mediaKeys)voidsetPollIds(List<String> pollIds)StringtoJson()Convert an instance of TweetAttachments to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_MEDIA_KEYS
public static final String SERIALIZED_NAME_MEDIA_KEYS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_POLL_IDS
public static final String SERIALIZED_NAME_POLL_IDS
- See Also:
- Constant Field Values
-
-
Method Detail
-
mediaKeys
public TweetAttachments mediaKeys(List<String> mediaKeys)
-
addMediaKeysItem
public TweetAttachments addMediaKeysItem(String mediaKeysItem)
-
getMediaKeys
@Nullable public List<String> getMediaKeys()
A list of Media Keys for each one of the media attachments (if media are attached).- Returns:
- mediaKeys
-
pollIds
public TweetAttachments pollIds(List<String> pollIds)
-
addPollIdsItem
public TweetAttachments addPollIdsItem(String pollIdsItem)
-
getPollIds
@Nullable public List<String> getPollIds()
A list of poll IDs (if polls are attached).- Returns:
- pollIds
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON Object- Throws:
IOException- if the JSON Object is invalid with respect to TweetAttachments
-
fromJson
public static TweetAttachments fromJson(String jsonString) throws IOException
Create an instance of TweetAttachments given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of TweetAttachments
- Throws:
IOException- if the JSON string is invalid with respect to TweetAttachments
-
toJson
public String toJson()
Convert an instance of TweetAttachments to an JSON string- Returns:
- JSON string
-
-