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 classMentionEntity.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_ENDstatic StringSERIALIZED_NAME_IDstatic StringSERIALIZED_NAME_STARTstatic StringSERIALIZED_NAME_USERNAME
-
Constructor Summary
Constructors Constructor Description MentionEntity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MentionEntityend(Integer end)booleanequals(Object o)static MentionEntityfromJson(String jsonString)Create an instance of MentionEntity given an JSON stringIntegergetEnd()Index (zero-based) at which position this entity ends.StringgetId()Unique identifier of this User.IntegergetStart()Index (zero-based) at which position this entity starts.StringgetUsername()The Twitter handle (screen name) of this user.inthashCode()MentionEntityid(String id)voidsetEnd(Integer end)voidsetId(String id)voidsetStart(Integer start)voidsetUsername(String username)MentionEntitystart(Integer start)StringtoJson()Convert an instance of MentionEntity to an JSON stringStringtoString()MentionEntityusername(String username)static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_START
public static final String SERIALIZED_NAME_START
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_END
public static final String SERIALIZED_NAME_END
- See Also:
- Constant Field Values
-
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
-
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)
-
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)
-
username
public MentionEntity 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 MentionEntity 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 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
-
-