Class User


  • @Generated("org.openapitools.codegen.languages.JavaClientCodegen")
    public class User
    extends Object
    The Twitter User object.
    • Constructor Detail

      • User

        public User()
    • Method Detail

      • setCreatedAt

        public void setCreatedAt​(OffsetDateTime createdAt)
      • description

        public User description​(String description)
      • getDescription

        @Nullable
        public String getDescription()
        The text of this User's profile description (also known as bio), if the User provided one.
        Returns:
        description
      • setDescription

        public void setDescription​(String description)
      • setEntities

        public void setEntities​(UserEntities entities)
      • getId

        @Nonnull
        public String getId()
        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:
        id
      • setId

        public void setId​(String id)
      • location

        public User location​(String location)
      • getLocation

        @Nullable
        public String getLocation()
        The location specified in the User's profile, if the User provided one. As this is a freeform value, it may not indicate a valid location, but it may be fuzzily evaluated when performing searches with location queries.
        Returns:
        location
      • setLocation

        public void setLocation​(String location)
      • getName

        @Nonnull
        public String getName()
        The friendly name of this User, as shown on their profile.
        Returns:
        name
      • setName

        public void setName​(String name)
      • pinnedTweetId

        public User pinnedTweetId​(String pinnedTweetId)
      • getPinnedTweetId

        @Nullable
        public String getPinnedTweetId()
        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:
        pinnedTweetId
      • setPinnedTweetId

        public void setPinnedTweetId​(String pinnedTweetId)
      • profileImageUrl

        public User profileImageUrl​(URL profileImageUrl)
      • getProfileImageUrl

        @Nullable
        public URL getProfileImageUrl()
        The URL to the profile image for this User.
        Returns:
        profileImageUrl
      • setProfileImageUrl

        public void setProfileImageUrl​(URL profileImageUrl)
      • _protected

        public User _protected​(Boolean _protected)
      • getProtected

        @Nullable
        public Boolean getProtected()
        Indicates if this User has chosen to protect their Tweets (in other words, if this User's Tweets are private).
        Returns:
        _protected
      • setProtected

        public void setProtected​(Boolean _protected)
      • setPublicMetrics

        public void setPublicMetrics​(UserPublicMetrics publicMetrics)
      • getUrl

        @Nullable
        public String getUrl()
        The URL specified in the User's profile.
        Returns:
        url
      • setUrl

        public void setUrl​(String url)
      • username

        public User username​(String username)
      • getUsername

        @Nonnull
        public String getUsername()
        The Twitter handle (screen name) of this user.
        Returns:
        username
      • setUsername

        public void setUsername​(String username)
      • verified

        public User verified​(Boolean verified)
      • getVerified

        @Nullable
        public Boolean getVerified()
        Indicate if this User is a verified Twitter User.
        Returns:
        verified
      • setVerified

        public void setVerified​(Boolean verified)
      • setWithheld

        public void setWithheld​(UserWithheld 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 User
      • fromJson

        public static User fromJson​(String jsonString)
                             throws IOException
        Create an instance of User given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of User
        Throws:
        IOException - if the JSON string is invalid with respect to User
      • toJson

        public String toJson()
        Convert an instance of User to an JSON string
        Returns:
        JSON string