Class Tweet


  • @Generated("org.openapitools.codegen.languages.JavaClientCodegen")
    public class Tweet
    extends Object
    Tweet
    • Constructor Detail

      • Tweet

        public Tweet()
    • Method Detail

      • authorId

        public Tweet authorId​(String authorId)
      • 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)
      • addContextAnnotationsItem

        public Tweet addContextAnnotationsItem​(ContextAnnotation contextAnnotationsItem)
      • setContextAnnotations

        public void setContextAnnotations​(List<ContextAnnotation> contextAnnotations)
      • conversationId

        public Tweet conversationId​(String conversationId)
      • 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)
      • setCreatedAt

        public void setCreatedAt​(OffsetDateTime createdAt)
      • 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)
      • inReplyToUserId

        public Tweet inReplyToUserId​(String inReplyToUserId)
      • 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)
      • possiblySensitive

        public Tweet possiblySensitive​(Boolean possiblySensitive)
      • 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)
      • 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
      • 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)
      • getText

        @Nonnull
        public String getText()
        The content of the Tweet.
        Returns:
        text
      • setText

        public void setText​(String text)
      • setWithheld

        public void setWithheld​(TweetWithheld withheld)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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