Package com.twitter.clientlib.model
Class UrlEntity
- java.lang.Object
-
- com.twitter.clientlib.model.UrlEntity
-
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class UrlEntity extends Object
Represent the portion of text recognized as a URL, and its start and end position within the text.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UrlEntity.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_DESCRIPTION
static String
SERIALIZED_NAME_DISPLAY_URL
static String
SERIALIZED_NAME_END
static String
SERIALIZED_NAME_EXPANDED_URL
static String
SERIALIZED_NAME_IMAGES
static String
SERIALIZED_NAME_MEDIA_KEY
static String
SERIALIZED_NAME_START
static String
SERIALIZED_NAME_STATUS
static String
SERIALIZED_NAME_TITLE
static String
SERIALIZED_NAME_UNWOUND_URL
static String
SERIALIZED_NAME_URL
-
Constructor Summary
Constructors Constructor Description UrlEntity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UrlEntity
addImagesItem(UrlImage imagesItem)
UrlEntity
description(String description)
UrlEntity
displayUrl(String displayUrl)
UrlEntity
end(Integer end)
boolean
equals(Object o)
UrlEntity
expandedUrl(URL expandedUrl)
static UrlEntity
fromJson(String jsonString)
Create an instance of UrlEntity given an JSON stringString
getDescription()
Description of the URL landing page.String
getDisplayUrl()
The URL as displayed in the Twitter client.Integer
getEnd()
Index (zero-based) at which position this entity ends.URL
getExpandedUrl()
A validly formatted URL.List<UrlImage>
getImages()
Get imagesString
getMediaKey()
The Media Key identifier for this attachment.Integer
getStart()
Index (zero-based) at which position this entity starts.Integer
getStatus()
HTTP Status Code.String
getTitle()
Title of the page the URL points to.URL
getUnwoundUrl()
Fully resolved url.URL
getUrl()
A validly formatted URL.int
hashCode()
UrlEntity
images(List<UrlImage> images)
UrlEntity
mediaKey(String mediaKey)
void
setDescription(String description)
void
setDisplayUrl(String displayUrl)
void
setEnd(Integer end)
void
setExpandedUrl(URL expandedUrl)
void
setImages(List<UrlImage> images)
void
setMediaKey(String mediaKey)
void
setStart(Integer start)
void
setStatus(Integer status)
void
setTitle(String title)
void
setUnwoundUrl(URL unwoundUrl)
void
setUrl(URL url)
UrlEntity
start(Integer start)
UrlEntity
status(Integer status)
UrlEntity
title(String title)
String
toJson()
Convert an instance of UrlEntity to an JSON stringString
toString()
UrlEntity
unwoundUrl(URL unwoundUrl)
UrlEntity
url(URL url)
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_DESCRIPTION
public static final String SERIALIZED_NAME_DESCRIPTION
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DISPLAY_URL
public static final String SERIALIZED_NAME_DISPLAY_URL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_EXPANDED_URL
public static final String SERIALIZED_NAME_EXPANDED_URL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_IMAGES
public static final String SERIALIZED_NAME_IMAGES
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MEDIA_KEY
public static final String SERIALIZED_NAME_MEDIA_KEY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_STATUS
public static final String SERIALIZED_NAME_STATUS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TITLE
public static final String SERIALIZED_NAME_TITLE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_UNWOUND_URL
public static final String SERIALIZED_NAME_UNWOUND_URL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_URL
public static final String SERIALIZED_NAME_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
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)
-
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)
-
getDescription
@Nullable public String getDescription()
Description of the URL landing page.- Returns:
- description
-
setDescription
public void setDescription(String description)
-
getDisplayUrl
@Nullable public String getDisplayUrl()
The URL as displayed in the Twitter client.- Returns:
- displayUrl
-
setDisplayUrl
public void setDisplayUrl(String displayUrl)
-
setExpandedUrl
public void setExpandedUrl(URL expandedUrl)
-
getMediaKey
@Nullable public String getMediaKey()
The Media Key identifier for this attachment.- Returns:
- mediaKey
-
setMediaKey
public void setMediaKey(String mediaKey)
-
getStatus
@Nullable public Integer getStatus()
HTTP Status Code. minimum: 100 maximum: 599- Returns:
- status
-
setStatus
public void setStatus(Integer status)
-
setTitle
public void setTitle(String title)
-
setUnwoundUrl
public void setUnwoundUrl(URL unwoundUrl)
-
setUrl
public void setUrl(URL url)
-
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 UrlEntity
-
fromJson
public static UrlEntity fromJson(String jsonString) throws IOException
Create an instance of UrlEntity given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of UrlEntity
- Throws:
IOException
- if the JSON string is invalid with respect to UrlEntity
-
toJson
public String toJson()
Convert an instance of UrlEntity to an JSON string- Returns:
- JSON string
-
-