Package com.twitter.clientlib.model
Class MentionEntity
- java.lang.Object
-
- com.twitter.clientlib.model.MentionEntity
-
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class MentionEntity extends Object
MentionEntity
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MentionEntity.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_END
static String
SERIALIZED_NAME_ID
static String
SERIALIZED_NAME_START
static String
SERIALIZED_NAME_USERNAME
-
Constructor Summary
Constructors Constructor Description MentionEntity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MentionEntity
end(Integer end)
boolean
equals(Object o)
static MentionEntity
fromJson(String jsonString)
Create an instance of MentionEntity given an JSON stringInteger
getEnd()
Index (zero-based) at which position this entity ends.String
getId()
Unique identifier of this User.Integer
getStart()
Index (zero-based) at which position this entity starts.String
getUsername()
The Twitter handle (screen name) of this user.int
hashCode()
MentionEntity
id(String id)
void
setEnd(Integer end)
void
setId(String id)
void
setStart(Integer start)
void
setUsername(String username)
MentionEntity
start(Integer start)
String
toJson()
Convert an instance of MentionEntity to an JSON stringString
toString()
MentionEntity
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_END
public static final String SERIALIZED_NAME_END
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_START
public static final String SERIALIZED_NAME_START
- See Also:
- Constant Field Values
-
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
-
end
public MentionEntity end(Integer end)
-
getEnd
@Nonnull public Integer getEnd()
Index (zero-based) at which position this entity ends. The index is exclusive. minimum: 0- Returns:
- end
-
setEnd
public void setEnd(Integer end)
-
start
public MentionEntity start(Integer start)
-
getStart
@Nonnull public Integer getStart()
Index (zero-based) at which position this entity starts. The index is inclusive. minimum: 0- Returns:
- start
-
setStart
public void setStart(Integer start)
-
id
public MentionEntity id(String id)
-
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)
-
username
public MentionEntity 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 MentionEntity
-
fromJson
public static MentionEntity fromJson(String jsonString) throws IOException
Create an instance of MentionEntity given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of MentionEntity
- Throws:
IOException
- if the JSON string is invalid with respect to MentionEntity
-
toJson
public String toJson()
Convert an instance of MentionEntity to an JSON string- Returns:
- JSON string
-
-