Package com.twitter.clientlib.model
Class Tweet
- java.lang.Object
-
- com.twitter.clientlib.model.Tweet
-
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class Tweet extends Object
Tweet
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Tweet.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_ATTACHMENTS
static String
SERIALIZED_NAME_AUTHOR_ID
static String
SERIALIZED_NAME_CONTEXT_ANNOTATIONS
static String
SERIALIZED_NAME_CONVERSATION_ID
static String
SERIALIZED_NAME_CREATED_AT
static String
SERIALIZED_NAME_ENTITIES
static String
SERIALIZED_NAME_GEO
static String
SERIALIZED_NAME_ID
static String
SERIALIZED_NAME_IN_REPLY_TO_USER_ID
static String
SERIALIZED_NAME_LANG
static String
SERIALIZED_NAME_NON_PUBLIC_METRICS
static String
SERIALIZED_NAME_ORGANIC_METRICS
static String
SERIALIZED_NAME_POSSIBLY_SENSITIVE
static String
SERIALIZED_NAME_PROMOTED_METRICS
static String
SERIALIZED_NAME_PUBLIC_METRICS
static String
SERIALIZED_NAME_REFERENCED_TWEETS
static String
SERIALIZED_NAME_REPLY_SETTINGS
static String
SERIALIZED_NAME_SOURCE
static String
SERIALIZED_NAME_TEXT
static String
SERIALIZED_NAME_WITHHELD
-
Constructor Summary
Constructors Constructor Description Tweet()
-
Method Summary
-
-
-
Field Detail
-
SERIALIZED_NAME_ATTACHMENTS
public static final String SERIALIZED_NAME_ATTACHMENTS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_AUTHOR_ID
public static final String SERIALIZED_NAME_AUTHOR_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CONTEXT_ANNOTATIONS
public static final String SERIALIZED_NAME_CONTEXT_ANNOTATIONS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CONVERSATION_ID
public static final String SERIALIZED_NAME_CONVERSATION_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CREATED_AT
public static final String SERIALIZED_NAME_CREATED_AT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ENTITIES
public static final String SERIALIZED_NAME_ENTITIES
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_GEO
public static final String SERIALIZED_NAME_GEO
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ID
public static final String SERIALIZED_NAME_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_IN_REPLY_TO_USER_ID
public static final String SERIALIZED_NAME_IN_REPLY_TO_USER_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_LANG
public static final String SERIALIZED_NAME_LANG
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_NON_PUBLIC_METRICS
public static final String SERIALIZED_NAME_NON_PUBLIC_METRICS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ORGANIC_METRICS
public static final String SERIALIZED_NAME_ORGANIC_METRICS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_POSSIBLY_SENSITIVE
public static final String SERIALIZED_NAME_POSSIBLY_SENSITIVE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PROMOTED_METRICS
public static final String SERIALIZED_NAME_PROMOTED_METRICS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PUBLIC_METRICS
public static final String SERIALIZED_NAME_PUBLIC_METRICS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_REFERENCED_TWEETS
public static final String SERIALIZED_NAME_REFERENCED_TWEETS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_REPLY_SETTINGS
public static final String SERIALIZED_NAME_REPLY_SETTINGS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SOURCE
public static final String SERIALIZED_NAME_SOURCE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TEXT
public static final String SERIALIZED_NAME_TEXT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_WITHHELD
public static final String SERIALIZED_NAME_WITHHELD
- See Also:
- Constant Field Values
-
-
Method Detail
-
attachments
public Tweet attachments(TweetAttachments attachments)
-
getAttachments
@Nullable public TweetAttachments getAttachments()
Get attachments- Returns:
- attachments
-
setAttachments
public void setAttachments(TweetAttachments attachments)
-
getAuthorId
@Nullable public String getAuthorId()
Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.- Returns:
- authorId
-
setAuthorId
public void setAuthorId(String authorId)
-
contextAnnotations
public Tweet contextAnnotations(List<ContextAnnotation> contextAnnotations)
-
addContextAnnotationsItem
public Tweet addContextAnnotationsItem(ContextAnnotation contextAnnotationsItem)
-
getContextAnnotations
@Nullable public List<ContextAnnotation> getContextAnnotations()
Get contextAnnotations- Returns:
- contextAnnotations
-
setContextAnnotations
public void setContextAnnotations(List<ContextAnnotation> contextAnnotations)
-
getConversationId
@Nullable public String getConversationId()
Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.- Returns:
- conversationId
-
setConversationId
public void setConversationId(String conversationId)
-
createdAt
public Tweet createdAt(OffsetDateTime createdAt)
-
getCreatedAt
@Nullable public OffsetDateTime getCreatedAt()
Creation time of the Tweet.- Returns:
- createdAt
-
setCreatedAt
public void setCreatedAt(OffsetDateTime createdAt)
-
entities
public Tweet entities(FullTextEntities entities)
-
getEntities
@Nullable public FullTextEntities getEntities()
Get entities- Returns:
- entities
-
setEntities
public void setEntities(FullTextEntities entities)
-
setGeo
public void setGeo(TweetGeo geo)
-
getId
@Nonnull public String getId()
Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.- Returns:
- id
-
setId
public void setId(String id)
-
getInReplyToUserId
@Nullable public String getInReplyToUserId()
Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.- Returns:
- inReplyToUserId
-
setInReplyToUserId
public void setInReplyToUserId(String inReplyToUserId)
-
getLang
@Nullable public String getLang()
Language of the Tweet, if detected by Twitter. Returned as a BCP47 language tag.- Returns:
- lang
-
setLang
public void setLang(String lang)
-
nonPublicMetrics
public Tweet nonPublicMetrics(TweetNonPublicMetrics nonPublicMetrics)
-
getNonPublicMetrics
@Nullable public TweetNonPublicMetrics getNonPublicMetrics()
Get nonPublicMetrics- Returns:
- nonPublicMetrics
-
setNonPublicMetrics
public void setNonPublicMetrics(TweetNonPublicMetrics nonPublicMetrics)
-
organicMetrics
public Tweet organicMetrics(TweetOrganicMetrics organicMetrics)
-
getOrganicMetrics
@Nullable public TweetOrganicMetrics getOrganicMetrics()
Get organicMetrics- Returns:
- organicMetrics
-
setOrganicMetrics
public void setOrganicMetrics(TweetOrganicMetrics organicMetrics)
-
getPossiblySensitive
@Nullable public Boolean getPossiblySensitive()
Indicates if this Tweet contains URLs marked as sensitive, for example content suitable for mature audiences.- Returns:
- possiblySensitive
-
setPossiblySensitive
public void setPossiblySensitive(Boolean possiblySensitive)
-
promotedMetrics
public Tweet promotedMetrics(TweetPromotedMetrics promotedMetrics)
-
getPromotedMetrics
@Nullable public TweetPromotedMetrics getPromotedMetrics()
Get promotedMetrics- Returns:
- promotedMetrics
-
setPromotedMetrics
public void setPromotedMetrics(TweetPromotedMetrics promotedMetrics)
-
publicMetrics
public Tweet publicMetrics(TweetPublicMetrics publicMetrics)
-
getPublicMetrics
@Nullable public TweetPublicMetrics getPublicMetrics()
Get publicMetrics- Returns:
- publicMetrics
-
setPublicMetrics
public void setPublicMetrics(TweetPublicMetrics publicMetrics)
-
referencedTweets
public Tweet referencedTweets(List<TweetReferencedTweets> referencedTweets)
-
addReferencedTweetsItem
public Tweet addReferencedTweetsItem(TweetReferencedTweets referencedTweetsItem)
-
getReferencedTweets
@Nullable public List<TweetReferencedTweets> getReferencedTweets()
A list of Tweets this Tweet refers to. For example, if the parent Tweet is a Retweet, a Quoted Tweet or a Reply, it will include the related Tweet referenced to by its parent.- Returns:
- referencedTweets
-
setReferencedTweets
public void setReferencedTweets(List<TweetReferencedTweets> referencedTweets)
-
replySettings
public Tweet replySettings(ReplySettings replySettings)
-
getReplySettings
@Nullable public ReplySettings getReplySettings()
Get replySettings- Returns:
- replySettings
-
setReplySettings
public void setReplySettings(ReplySettings replySettings)
-
getSource
@Nullable public String getSource()
The name of the app the user Tweeted from.- Returns:
- source
-
setSource
public void setSource(String source)
-
setText
public void setText(String text)
-
withheld
public Tweet withheld(TweetWithheld withheld)
-
getWithheld
@Nullable public TweetWithheld getWithheld()
Get withheld- Returns:
- withheld
-
setWithheld
public void setWithheld(TweetWithheld withheld)
-
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 Tweet
-
fromJson
public static Tweet fromJson(String jsonString) throws IOException
Create an instance of Tweet given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of Tweet
- Throws:
IOException
- if the JSON string is invalid with respect to Tweet
-
toJson
public String toJson()
Convert an instance of Tweet to an JSON string- Returns:
- JSON string
-
-