Class Media
- java.lang.Object
-
- com.twilio.base.Resource
-
- com.twilio.rest.api.v2010.account.message.Media
-
- All Implemented Interfaces:
Serializable
public class Media extends Resource
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MediaDeleter
deleter(String pathMessageSid, String pathSid)
Create a MediaDeleter to execute delete.static MediaDeleter
deleter(String pathAccountSid, String pathMessageSid, String pathSid)
Create a MediaDeleter to execute delete.boolean
equals(Object o)
static MediaFetcher
fetcher(String pathMessageSid, String pathSid)
Create a MediaFetcher to execute fetch.static MediaFetcher
fetcher(String pathAccountSid, String pathMessageSid, String pathSid)
Create a MediaFetcher to execute fetch.static Media
fromJson(InputStream json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON InputStream into a Media object using the provided ObjectMapper.static Media
fromJson(String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON String into a Media object using the provided ObjectMapper.String
getAccountSid()
Returns The The SID of the Account that created this resource.String
getContentType()
Returns The The default mime-type of the media.org.joda.time.DateTime
getDateCreated()
Returns The The RFC 2822 date and time in GMT that this resource was created.org.joda.time.DateTime
getDateUpdated()
Returns The The RFC 2822 date and time in GMT that this resource was last updated.String
getParentSid()
Returns The The SID of the resource that created the media.String
getSid()
Returns The The unique string that identifies this resource.String
getUri()
Returns The The URI of this resource, relative to `https://api.twilio.com`.int
hashCode()
static MediaReader
reader(String pathMessageSid)
Create a MediaReader to execute read.static MediaReader
reader(String pathAccountSid, String pathMessageSid)
Create a MediaReader to execute read.String
toString()
-
-
-
Method Detail
-
deleter
public static MediaDeleter deleter(String pathAccountSid, String pathMessageSid, String pathSid)
Create a MediaDeleter to execute delete.- Parameters:
pathAccountSid
- The SID of the Account that created the resource(s) to deletepathMessageSid
- The SID of the Message resource that this Media resource belongs topathSid
- The unique string that identifies this resource- Returns:
- MediaDeleter capable of executing the delete
-
deleter
public static MediaDeleter deleter(String pathMessageSid, String pathSid)
Create a MediaDeleter to execute delete.- Parameters:
pathMessageSid
- The SID of the Message resource that this Media resource belongs topathSid
- The unique string that identifies this resource- Returns:
- MediaDeleter capable of executing the delete
-
fetcher
public static MediaFetcher fetcher(String pathAccountSid, String pathMessageSid, String pathSid)
Create a MediaFetcher to execute fetch.- Parameters:
pathAccountSid
- The SID of the Account that created the resource(s) to fetchpathMessageSid
- The SID of the Message resource that this Media resource belongs topathSid
- The unique string that identifies this resource- Returns:
- MediaFetcher capable of executing the fetch
-
fetcher
public static MediaFetcher fetcher(String pathMessageSid, String pathSid)
Create a MediaFetcher to execute fetch.- Parameters:
pathMessageSid
- The SID of the Message resource that this Media resource belongs topathSid
- The unique string that identifies this resource- Returns:
- MediaFetcher capable of executing the fetch
-
reader
public static MediaReader reader(String pathAccountSid, String pathMessageSid)
Create a MediaReader to execute read.- Parameters:
pathAccountSid
- The SID of the Account that created the resource(s) to readpathMessageSid
- The SID of the Message resource that this Media resource belongs to- Returns:
- MediaReader capable of executing the read
-
reader
public static MediaReader reader(String pathMessageSid)
Create a MediaReader to execute read.- Parameters:
pathMessageSid
- The SID of the Message resource that this Media resource belongs to- Returns:
- MediaReader capable of executing the read
-
fromJson
public static Media fromJson(String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON String into a Media object using the provided ObjectMapper.- Parameters:
json
- Raw JSON StringobjectMapper
- Jackson ObjectMapper- Returns:
- Media object represented by the provided JSON
-
fromJson
public static Media fromJson(InputStream json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON InputStream into a Media object using the provided ObjectMapper.- Parameters:
json
- Raw JSON InputStreamobjectMapper
- Jackson ObjectMapper- Returns:
- Media object represented by the provided JSON
-
getAccountSid
public final String getAccountSid()
Returns The The SID of the Account that created this resource.- Returns:
- The SID of the Account that created this resource
-
getContentType
public final String getContentType()
Returns The The default mime-type of the media.- Returns:
- The default mime-type of the media
-
getDateCreated
public final org.joda.time.DateTime getDateCreated()
Returns The The RFC 2822 date and time in GMT that this resource was created.- Returns:
- The RFC 2822 date and time in GMT that this resource was created
-
getDateUpdated
public final org.joda.time.DateTime getDateUpdated()
Returns The The RFC 2822 date and time in GMT that this resource was last updated.- Returns:
- The RFC 2822 date and time in GMT that this resource was last updated
-
getParentSid
public final String getParentSid()
Returns The The SID of the resource that created the media.- Returns:
- The SID of the resource that created the media
-
getSid
public final String getSid()
Returns The The unique string that identifies this resource.- Returns:
- The unique string that identifies this resource
-
getUri
public final String getUri()
Returns The The URI of this resource, relative to `https://api.twilio.com`.- Returns:
- The URI of this resource, relative to `https://api.twilio.com`
-
-