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 classMentionFields.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_IDstatic StringSERIALIZED_NAME_USERNAME
-
Constructor Summary
Constructors Constructor Description MentionFields()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static MentionFieldsfromJson(String jsonString)Create an instance of MentionFields given an JSON stringStringgetId()Unique identifier of this User.StringgetUsername()The Twitter handle (screen name) of this user.inthashCode()MentionFieldsid(String id)voidsetId(String id)voidsetUsername(String username)StringtoJson()Convert an instance of MentionFields to an JSON stringStringtoString()MentionFieldsusername(String username)static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_USERNAME
public static final String SERIALIZED_NAME_USERNAME
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ID
public static final String SERIALIZED_NAME_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
username
public MentionFields username(String username)
-
getUsername
@Nullable public String getUsername()
The Twitter handle (screen name) of this user.- Returns:
- username
-
setUsername
public void setUsername(String username)
-
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)
-
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 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
-
-