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>
openapiFields
static HashSet<String>
openapiRequiredFields
static String
SERIALIZED_NAME_HEIGHT
static String
SERIALIZED_NAME_MEDIA_KEY
static String
SERIALIZED_NAME_TYPE
static String
SERIALIZED_NAME_WIDTH
protected String
type
-
Constructor Summary
Constructors Constructor Description Media()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static Media
fromJson(String jsonString)
Create an instance of Media given an JSON stringInteger
getHeight()
The height of the media in pixels.String
getMediaKey()
The Media Key identifier for this attachment.String
getType()
Get typeInteger
getWidth()
The width of the media in pixels.int
hashCode()
Media
height(Integer height)
Media
mediaKey(String mediaKey)
void
setHeight(Integer height)
void
setMediaKey(String mediaKey)
void
setType(String type)
void
setWidth(Integer width)
String
toJson()
Convert an instance of Media to an JSON stringString
toString()
Media
type(String type)
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
Validates the JSON Object and throws an exception if issues foundMedia
width(Integer width)
-
-
-
Field Detail
-
SERIALIZED_NAME_HEIGHT
public static final String SERIALIZED_NAME_HEIGHT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MEDIA_KEY
public static final String SERIALIZED_NAME_MEDIA_KEY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TYPE
public static final String SERIALIZED_NAME_TYPE
- See Also:
- Constant Field Values
-
type
@SerializedName("type") protected String type
-
SERIALIZED_NAME_WIDTH
public static final String SERIALIZED_NAME_WIDTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getHeight
@Nullable public Integer getHeight()
The height of the media in pixels. minimum: 0- Returns:
- height
-
setHeight
public void setHeight(Integer height)
-
getMediaKey
@Nullable public String getMediaKey()
The Media Key identifier for this attachment.- Returns:
- mediaKey
-
setMediaKey
public void setMediaKey(String mediaKey)
-
setType
public void setType(String type)
-
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 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 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
-
-