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 class
TweetAttachments.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_MEDIA_KEYS
static String
SERIALIZED_NAME_POLL_IDS
-
Constructor Summary
Constructors Constructor Description TweetAttachments()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TweetAttachments
addMediaKeysItem(String mediaKeysItem)
TweetAttachments
addPollIdsItem(String pollIdsItem)
boolean
equals(Object o)
static TweetAttachments
fromJson(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).int
hashCode()
TweetAttachments
mediaKeys(List<String> mediaKeys)
TweetAttachments
pollIds(List<String> pollIds)
void
setMediaKeys(List<String> mediaKeys)
void
setPollIds(List<String> pollIds)
String
toJson()
Convert an instance of TweetAttachments to an JSON stringString
toString()
static void
validateJsonObject(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 IOException
Validates 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
-
-