Package com.twitter.clientlib.model
Class URLFields
- java.lang.Object
-
- com.twitter.clientlib.model.URLFields
-
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class URLFields extends Object
Represent the portion of text recognized as a URL.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classURLFields.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_EXPANDED_URLstatic StringSERIALIZED_NAME_IMAGESstatic StringSERIALIZED_NAME_MEDIA_KEYstatic StringSERIALIZED_NAME_STATUSstatic StringSERIALIZED_NAME_TITLEstatic StringSERIALIZED_NAME_UNWOUND_URLstatic StringSERIALIZED_NAME_URL
-
Constructor Summary
Constructors Constructor Description URLFields()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description URLFieldsaddImagesItem(URLImage imagesItem)URLFieldsdescription(String description)URLFieldsdisplayUrl(String displayUrl)booleanequals(Object o)URLFieldsexpandedUrl(URL expandedUrl)static URLFieldsfromJson(String jsonString)Create an instance of URLFields given an JSON stringStringgetDescription()Description of the URL landing page.StringgetDisplayUrl()The URL as displayed in the Twitter client.URLgetExpandedUrl()Get expandedUrlList<URLImage>getImages()Get imagesStringgetMediaKey()The Media Key identifier for this attachment.IntegergetStatus()HTTP Status Code.StringgetTitle()Title of the page the URL points to.URLgetUnwoundUrl()Fully resolved urlURLgetUrl()Get urlinthashCode()URLFieldsimages(List<URLImage> images)URLFieldsmediaKey(String mediaKey)voidsetDescription(String description)voidsetDisplayUrl(String displayUrl)voidsetExpandedUrl(URL expandedUrl)voidsetImages(List<URLImage> images)voidsetMediaKey(String mediaKey)voidsetStatus(Integer status)voidsetTitle(String title)voidsetUnwoundUrl(URL unwoundUrl)voidsetUrl(URL url)URLFieldsstatus(Integer status)URLFieldstitle(String title)StringtoJson()Convert an instance of URLFields to an JSON stringStringtoString()URLFieldsunwoundUrl(URL unwoundUrl)URLFieldsurl(URL url)static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
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
-
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 URLFields
-
fromJson
public static URLFields fromJson(String jsonString) throws IOException
Create an instance of URLFields given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of URLFields
- Throws:
IOException- if the JSON string is invalid with respect to URLFields
-
toJson
public String toJson()
Convert an instance of URLFields to an JSON string- Returns:
- JSON string
-
-