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 classUrlEntity.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_DESCRIPTIONstatic StringSERIALIZED_NAME_DISPLAY_URLstatic StringSERIALIZED_NAME_ENDstatic StringSERIALIZED_NAME_EXPANDED_URLstatic StringSERIALIZED_NAME_IMAGESstatic StringSERIALIZED_NAME_MEDIA_KEYstatic StringSERIALIZED_NAME_STARTstatic StringSERIALIZED_NAME_STATUSstatic StringSERIALIZED_NAME_TITLEstatic StringSERIALIZED_NAME_UNWOUND_URLstatic StringSERIALIZED_NAME_URL
-
Constructor Summary
Constructors Constructor Description UrlEntity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UrlEntityaddImagesItem(URLImage imagesItem)UrlEntitydescription(String description)UrlEntitydisplayUrl(String displayUrl)UrlEntityend(Integer end)booleanequals(Object o)UrlEntityexpandedUrl(URL expandedUrl)static UrlEntityfromJson(String jsonString)Create an instance of UrlEntity given an JSON stringStringgetDescription()Description of the URL landing page.StringgetDisplayUrl()The URL as displayed in the Twitter client.IntegergetEnd()Index (zero-based) at which position this entity ends.URLgetExpandedUrl()Get expandedUrlList<URLImage>getImages()Get imagesStringgetMediaKey()The Media Key identifier for this attachment.IntegergetStart()Index (zero-based) at which position this entity starts.IntegergetStatus()HTTP Status Code.StringgetTitle()Title of the page the URL points to.URLgetUnwoundUrl()Fully resolved urlURLgetUrl()Get urlinthashCode()UrlEntityimages(List<URLImage> images)UrlEntitymediaKey(String mediaKey)voidsetDescription(String description)voidsetDisplayUrl(String displayUrl)voidsetEnd(Integer end)voidsetExpandedUrl(URL expandedUrl)voidsetImages(List<URLImage> images)voidsetMediaKey(String mediaKey)voidsetStart(Integer start)voidsetStatus(Integer status)voidsetTitle(String title)voidsetUnwoundUrl(URL unwoundUrl)voidsetUrl(URL url)UrlEntitystart(Integer start)UrlEntitystatus(Integer status)UrlEntitytitle(String title)StringtoJson()Convert an instance of UrlEntity to an JSON stringStringtoString()UrlEntityunwoundUrl(URL unwoundUrl)UrlEntityurl(URL url)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_URL
public static final String SERIALIZED_NAME_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_DISPLAY_URL
public static final String SERIALIZED_NAME_DISPLAY_URL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_UNWOUND_URL
public static final String SERIALIZED_NAME_UNWOUND_URL
- 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_DESCRIPTION
public static final String SERIALIZED_NAME_DESCRIPTION
- 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
-
-
Method Detail
-
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)
-
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)
-
setUrl
public void setUrl(URL url)
-
setExpandedUrl
public void setExpandedUrl(URL expandedUrl)
-
getDisplayUrl
@Nullable public String getDisplayUrl()
The URL as displayed in the Twitter client.- Returns:
- displayUrl
-
setDisplayUrl
public void setDisplayUrl(String displayUrl)
-
setUnwoundUrl
public void setUnwoundUrl(URL unwoundUrl)
-
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)
-
getDescription
@Nullable public String getDescription()
Description of the URL landing page.- Returns:
- description
-
setDescription
public void setDescription(String description)
-
getMediaKey
@Nullable public String getMediaKey()
The Media Key identifier for this attachment.- Returns:
- mediaKey
-
setMediaKey
public void setMediaKey(String mediaKey)
-
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 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
-
-