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 class
UrlFields.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_EXPANDED_URL
static String
SERIALIZED_NAME_IMAGES
static String
SERIALIZED_NAME_MEDIA_KEY
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 UrlFields()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UrlFields
addImagesItem(UrlImage imagesItem)
UrlFields
description(String description)
UrlFields
displayUrl(String displayUrl)
boolean
equals(Object o)
UrlFields
expandedUrl(URL expandedUrl)
static UrlFields
fromJson(String jsonString)
Create an instance of UrlFields given an JSON stringString
getDescription()
Description of the URL landing page.String
getDisplayUrl()
The URL as displayed in the Twitter client.URL
getExpandedUrl()
A validly formatted URL.List<UrlImage>
getImages()
Get imagesString
getMediaKey()
The Media Key identifier for this attachment.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()
UrlFields
images(List<UrlImage> images)
UrlFields
mediaKey(String mediaKey)
void
setDescription(String description)
void
setDisplayUrl(String displayUrl)
void
setExpandedUrl(URL expandedUrl)
void
setImages(List<UrlImage> images)
void
setMediaKey(String mediaKey)
void
setStatus(Integer status)
void
setTitle(String title)
void
setUnwoundUrl(URL unwoundUrl)
void
setUrl(URL url)
UrlFields
status(Integer status)
UrlFields
title(String title)
String
toJson()
Convert an instance of UrlFields to an JSON stringString
toString()
UrlFields
unwoundUrl(URL unwoundUrl)
UrlFields
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_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
-
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 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
-
-