Package com.twitter.clientlib.model
Class Photo
- java.lang.Object
-
- com.twitter.clientlib.model.Media
-
- com.twitter.clientlib.model.Photo
-
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class Photo extends Media
Photo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Photo.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_ALT_TEXT
static String
SERIALIZED_NAME_URL
-
Fields inherited from class com.twitter.clientlib.model.Media
SERIALIZED_NAME_HEIGHT, SERIALIZED_NAME_MEDIA_KEY, SERIALIZED_NAME_TYPE, SERIALIZED_NAME_WIDTH, type
-
-
Constructor Summary
Constructors Constructor Description Photo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Photo
altText(String altText)
boolean
equals(Object o)
static Photo
fromJson(String jsonString)
Create an instance of Photo given an JSON stringString
getAltText()
Get altTextURL
getUrl()
Get urlint
hashCode()
void
setAltText(String altText)
void
setUrl(URL url)
String
toJson()
Convert an instance of Photo to an JSON stringString
toString()
Photo
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_ALT_TEXT
public static final String SERIALIZED_NAME_ALT_TEXT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_URL
public static final String SERIALIZED_NAME_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
setAltText
public void setAltText(String altText)
-
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 Photo
-
fromJson
public static Photo fromJson(String jsonString) throws IOException
Create an instance of Photo given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of Photo
- Throws:
IOException
- if the JSON string is invalid with respect to Photo
-
-