Package com.twitter.clientlib.model
Class Media
- java.lang.Object
-
- com.twitter.clientlib.model.Media
-
- Direct Known Subclasses:
AnimatedGif,Photo,Video
@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class Media extends Object
Media
-
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_HEIGHTstatic StringSERIALIZED_NAME_MEDIA_KEYstatic StringSERIALIZED_NAME_TYPEstatic StringSERIALIZED_NAME_WIDTHprotected Stringtype
-
Constructor Summary
Constructors Constructor Description Media()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static MediafromJson(String jsonString)Create an instance of Media given an JSON stringIntegergetHeight()The height of the media in pixels minimum: 0StringgetMediaKey()The Media Key identifier for this attachment.StringgetType()Get typeIntegergetWidth()The width of the media in pixels minimum: 0inthashCode()Mediaheight(Integer height)MediamediaKey(String mediaKey)voidsetHeight(Integer height)voidsetMediaKey(String mediaKey)voidsetType(String type)voidsetWidth(Integer width)StringtoJson()Convert an instance of Media to an JSON stringStringtoString()Mediatype(String type)static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues foundMediawidth(Integer width)
-
-
-
Field Detail
-
SERIALIZED_NAME_TYPE
public static final String SERIALIZED_NAME_TYPE
- See Also:
- Constant Field Values
-
type
@SerializedName("type") protected String type
-
SERIALIZED_NAME_MEDIA_KEY
public static final String SERIALIZED_NAME_MEDIA_KEY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_HEIGHT
public static final String SERIALIZED_NAME_HEIGHT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_WIDTH
public static final String SERIALIZED_NAME_WIDTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
setType
public void setType(String type)
-
getMediaKey
@Nullable public String getMediaKey()
The Media Key identifier for this attachment.- Returns:
- mediaKey
-
setMediaKey
public void setMediaKey(String mediaKey)
-
getHeight
@Nullable public Integer getHeight()
The height of the media in pixels minimum: 0- Returns:
- height
-
setHeight
public void setHeight(Integer height)
-
getWidth
@Nullable public Integer getWidth()
The width of the media in pixels minimum: 0- Returns:
- width
-
setWidth
public void setWidth(Integer width)
-
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 Media
-
fromJson
public static Media fromJson(String jsonString) throws IOException
Create an instance of Media given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Media
- Throws:
IOException- if the JSON string is invalid with respect to Media
-
toJson
public String toJson()
Convert an instance of Media to an JSON string- Returns:
- JSON string
-
-