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 class
User.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_CREATED_AT
static String
SERIALIZED_NAME_DESCRIPTION
static String
SERIALIZED_NAME_ENTITIES
static String
SERIALIZED_NAME_ID
static String
SERIALIZED_NAME_LOCATION
static String
SERIALIZED_NAME_NAME
static String
SERIALIZED_NAME_PINNED_TWEET_ID
static String
SERIALIZED_NAME_PROFILE_IMAGE_URL
static String
SERIALIZED_NAME_PROTECTED
static String
SERIALIZED_NAME_PUBLIC_METRICS
static String
SERIALIZED_NAME_URL
static String
SERIALIZED_NAME_USERNAME
static String
SERIALIZED_NAME_VERIFIED
static String
SERIALIZED_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)
User
createdAt(OffsetDateTime createdAt)
User
description(String description)
User
entities(UserEntities entities)
boolean
equals(Object o)
static User
fromJson(String jsonString)
Create an instance of User given an JSON stringOffsetDateTime
getCreatedAt()
Creation time of this User.String
getDescription()
The text of this User's profile description (also known as bio), if the User provided one.UserEntities
getEntities()
Get entitiesString
getId()
Unique identifier of this User.String
getLocation()
The location specified in the User's profile, if the User provided one.String
getName()
The friendly name of this User, as shown on their profile.String
getPinnedTweetId()
Unique identifier of this Tweet.URL
getProfileImageUrl()
The URL to the profile image for this User.Boolean
getProtected()
Indicates if this User has chosen to protect their Tweets (in other words, if this User's Tweets are private).UserPublicMetrics
getPublicMetrics()
Get publicMetricsString
getUrl()
The URL specified in the User's profile.String
getUsername()
The Twitter handle (screen name) of this user.Boolean
getVerified()
Indicate if this User is a verified Twitter User.UserWithheld
getWithheld()
Get withheldint
hashCode()
User
id(String id)
User
location(String location)
User
name(String name)
User
pinnedTweetId(String pinnedTweetId)
User
profileImageUrl(URL profileImageUrl)
User
publicMetrics(UserPublicMetrics publicMetrics)
void
setCreatedAt(OffsetDateTime createdAt)
void
setDescription(String description)
void
setEntities(UserEntities entities)
void
setId(String id)
void
setLocation(String location)
void
setName(String name)
void
setPinnedTweetId(String pinnedTweetId)
void
setProfileImageUrl(URL profileImageUrl)
void
setProtected(Boolean _protected)
void
setPublicMetrics(UserPublicMetrics publicMetrics)
void
setUrl(String url)
void
setUsername(String username)
void
setVerified(Boolean verified)
void
setWithheld(UserWithheld withheld)
String
toJson()
Convert an instance of User to an JSON stringString
toString()
User
url(String url)
User
username(String username)
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
Validates the JSON Object and throws an exception if issues foundUser
verified(Boolean verified)
User
withheld(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 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
-
-