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 classPhoto.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_ALT_TEXTstatic StringSERIALIZED_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 PhotoaltText(String altText)booleanequals(Object o)static PhotofromJson(String jsonString)Create an instance of Photo given an JSON stringStringgetAltText()Get altTextURLgetUrl()Get urlinthashCode()voidsetAltText(String altText)voidsetUrl(URL url)StringtoJson()Convert an instance of Photo to an JSON stringStringtoString()Photourl(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_ALT_TEXT
public static final String SERIALIZED_NAME_ALT_TEXT
- See Also:
- Constant Field Values
-
-
Method Detail
-
setUrl
public void setUrl(URL url)
-
setAltText
public void setAltText(String altText)
-
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 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
-
-