Package com.twitter.clientlib.model
Class MentionFields
- java.lang.Object
-
- com.twitter.clientlib.model.MentionFields
-
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class MentionFields extends Object
Represent the portion of text recognized as a User mention, and its start and end position within the text.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MentionFields.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_ID
static String
SERIALIZED_NAME_USERNAME
-
Constructor Summary
Constructors Constructor Description MentionFields()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static MentionFields
fromJson(String jsonString)
Create an instance of MentionFields given an JSON stringString
getId()
Unique identifier of this User.String
getUsername()
The Twitter handle (screen name) of this user.int
hashCode()
MentionFields
id(String id)
void
setId(String id)
void
setUsername(String username)
String
toJson()
Convert an instance of MentionFields to an JSON stringString
toString()
MentionFields
username(String username)
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_ID
public static final String SERIALIZED_NAME_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_USERNAME
public static final String SERIALIZED_NAME_USERNAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
id
public MentionFields id(String id)
-
getId
@Nullable 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)
-
username
public MentionFields username(String username)
-
getUsername
@Nonnull public String getUsername()
The Twitter handle (screen name) of this user.- Returns:
- username
-
setUsername
public void setUsername(String username)
-
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 MentionFields
-
fromJson
public static MentionFields fromJson(String jsonString) throws IOException
Create an instance of MentionFields given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of MentionFields
- Throws:
IOException
- if the JSON string is invalid with respect to MentionFields
-
toJson
public String toJson()
Convert an instance of MentionFields to an JSON string- Returns:
- JSON string
-
-