Package com.twitter.clientlib.model
Class User
- java.lang.Object
-
- com.twitter.clientlib.model.User
-
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class User extends Object
The Twitter User object.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUser.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_CREATED_ATstatic StringSERIALIZED_NAME_DESCRIPTIONstatic StringSERIALIZED_NAME_ENTITIESstatic StringSERIALIZED_NAME_IDstatic StringSERIALIZED_NAME_LOCATIONstatic StringSERIALIZED_NAME_NAMEstatic StringSERIALIZED_NAME_PINNED_TWEET_IDstatic StringSERIALIZED_NAME_PROFILE_IMAGE_URLstatic StringSERIALIZED_NAME_PROTECTEDstatic StringSERIALIZED_NAME_PUBLIC_METRICSstatic StringSERIALIZED_NAME_URLstatic StringSERIALIZED_NAME_USERNAMEstatic StringSERIALIZED_NAME_VERIFIEDstatic StringSERIALIZED_NAME_WITHHELD
-
Constructor Summary
Constructors Constructor Description User()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description User_protected(Boolean _protected)UsercreatedAt(OffsetDateTime createdAt)Userdescription(String description)Userentities(UserEntities entities)booleanequals(Object o)static UserfromJson(String jsonString)Create an instance of User given an JSON stringOffsetDateTimegetCreatedAt()Creation time of this User.StringgetDescription()The text of this User's profile description (also known as bio), if the User provided one.UserEntitiesgetEntities()Get entitiesStringgetId()Unique identifier of this User.StringgetLocation()The location specified in the User's profile, if the User provided one.StringgetName()The friendly name of this User, as shown on their profile.StringgetPinnedTweetId()Unique identifier of this Tweet.URLgetProfileImageUrl()The URL to the profile image for this User.BooleangetProtected()Indicates if this User has chosen to protect their Tweets (in other words, if this User's Tweets are private).UserPublicMetricsgetPublicMetrics()Get publicMetricsStringgetUrl()The URL specified in the User's profile.StringgetUsername()The Twitter handle (screen name) of this user.BooleangetVerified()Indicate if this User is a verified Twitter User.UserWithheldgetWithheld()Get withheldinthashCode()Userid(String id)Userlocation(String location)Username(String name)UserpinnedTweetId(String pinnedTweetId)UserprofileImageUrl(URL profileImageUrl)UserpublicMetrics(UserPublicMetrics publicMetrics)voidsetCreatedAt(OffsetDateTime createdAt)voidsetDescription(String description)voidsetEntities(UserEntities entities)voidsetId(String id)voidsetLocation(String location)voidsetName(String name)voidsetPinnedTweetId(String pinnedTweetId)voidsetProfileImageUrl(URL profileImageUrl)voidsetProtected(Boolean _protected)voidsetPublicMetrics(UserPublicMetrics publicMetrics)voidsetUrl(String url)voidsetUsername(String username)voidsetVerified(Boolean verified)voidsetWithheld(UserWithheld withheld)StringtoJson()Convert an instance of User to an JSON stringStringtoString()Userurl(String url)Userusername(String username)static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues foundUserverified(Boolean verified)Userwithheld(UserWithheld withheld)
-
-
-
Field Detail
-
SERIALIZED_NAME_CREATED_AT
public static final String SERIALIZED_NAME_CREATED_AT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DESCRIPTION
public static final String SERIALIZED_NAME_DESCRIPTION
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ENTITIES
public static final String SERIALIZED_NAME_ENTITIES
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ID
public static final String SERIALIZED_NAME_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_LOCATION
public static final String SERIALIZED_NAME_LOCATION
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_NAME
public static final String SERIALIZED_NAME_NAME
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PINNED_TWEET_ID
public static final String SERIALIZED_NAME_PINNED_TWEET_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PROFILE_IMAGE_URL
public static final String SERIALIZED_NAME_PROFILE_IMAGE_URL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PROTECTED
public static final String SERIALIZED_NAME_PROTECTED
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PUBLIC_METRICS
public static final String SERIALIZED_NAME_PUBLIC_METRICS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_URL
public static final String SERIALIZED_NAME_URL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_USERNAME
public static final String SERIALIZED_NAME_USERNAME
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_VERIFIED
public static final String SERIALIZED_NAME_VERIFIED
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_WITHHELD
public static final String SERIALIZED_NAME_WITHHELD
- See Also:
- Constant Field Values
-
-
Method Detail
-
createdAt
public User createdAt(OffsetDateTime createdAt)
-
getCreatedAt
@Nullable public OffsetDateTime getCreatedAt()
Creation time of this User.- Returns:
- createdAt
-
setCreatedAt
public void setCreatedAt(OffsetDateTime createdAt)
-
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)
-
entities
public User entities(UserEntities entities)
-
getEntities
@Nullable public UserEntities getEntities()
Get entities- Returns:
- entities
-
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)
-
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)
-
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)
-
getProfileImageUrl
@Nullable public URL getProfileImageUrl()
The URL to the profile image for this User.- Returns:
- profileImageUrl
-
setProfileImageUrl
public void setProfileImageUrl(URL profileImageUrl)
-
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)
-
publicMetrics
public User publicMetrics(UserPublicMetrics publicMetrics)
-
getPublicMetrics
@Nullable public UserPublicMetrics getPublicMetrics()
Get publicMetrics- Returns:
- publicMetrics
-
setPublicMetrics
public void setPublicMetrics(UserPublicMetrics publicMetrics)
-
setUrl
public void setUrl(String url)
-
getUsername
@Nonnull public String getUsername()
The Twitter handle (screen name) of this user.- Returns:
- username
-
setUsername
public void setUsername(String username)
-
getVerified
@Nullable public Boolean getVerified()
Indicate if this User is a verified Twitter User.- Returns:
- verified
-
setVerified
public void setVerified(Boolean verified)
-
withheld
public User withheld(UserWithheld withheld)
-
getWithheld
@Nullable public UserWithheld getWithheld()
Get withheld- Returns:
- withheld
-
setWithheld
public void setWithheld(UserWithheld withheld)
-
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 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
-
-