com.twilio.sdk.resource.instance
Class Media

java.lang.Object
  extended by com.twilio.sdk.resource.Resource
      extended by com.twilio.sdk.resource.InstanceResource
          extended by com.twilio.sdk.resource.instance.Media

public class Media
extends InstanceResource

The Class Media. For more information see https://www.twilio.com/docs/api/rest/media


Constructor Summary
Media(TwilioRestClient client)
          Instantiates a new media instance.
Media(TwilioRestClient client, Map<String,Object> properties)
          Instantiates a new media instance.
Media(TwilioRestClient client, String mediaSid)
          Instantiates a new media instance.
Media(TwilioRestClient client, String messageSid, String mediaSid)
          Instantiates a new media instance.
 
Method Summary
 boolean delete()
          Delete this Media
 String getAccountSid()
          Gets the account sid.
 String getApiVersion()
          Gets the api version.
 String getContentType()
          Gets the content type
 Date getDateCreated()
          Gets the date created.
 Date getDateUpdated()
          Gets the date updated.
 Integer getDuration()
          Gets the duration
 String getParentSid()
          Gets the parent sid.
 String getRequestMessageSid()
          Gets the sid of the requesting message
 String getSid()
          Gets the sid.
 String getUri()
          Gets the uri of this media
 
Methods inherited from class com.twilio.sdk.resource.InstanceResource
getObject, getProperty, update, update
 
Methods inherited from class com.twilio.sdk.resource.Resource
setRequestAccountSid
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Media

public Media(TwilioRestClient client)
Instantiates a new media instance.

Parameters:
client - the client

Media

public Media(TwilioRestClient client,
             String mediaSid)
Instantiates a new media instance.

Parameters:
client - the client
mediaSid - the sid

Media

public Media(TwilioRestClient client,
             String messageSid,
             String mediaSid)
Instantiates a new media instance.

Parameters:
client - the client
messageSid - the sid of the parent message
mediaSid - the sid

Media

public Media(TwilioRestClient client,
             Map<String,Object> properties)
Instantiates a new media instance.

Parameters:
client - the client
properties - the properties
Method Detail

getSid

public String getSid()
Gets the sid.

Returns:
the sid

getRequestMessageSid

public String getRequestMessageSid()
Gets the sid of the requesting message

Returns:
the sid of the requesting message

getDateCreated

public Date getDateCreated()
Gets the date created.

Returns:
the date created

getDateUpdated

public Date getDateUpdated()
Gets the date updated.

Returns:
the date updated

getAccountSid

public String getAccountSid()
Gets the account sid.

Returns:
the account sid

getParentSid

public String getParentSid()
Gets the parent sid.

Returns:
the account sid

getContentType

public String getContentType()
Gets the content type

Returns:
the content type

getDuration

public Integer getDuration()
Gets the duration

Returns:
the duration

getApiVersion

public String getApiVersion()
Gets the api version.

Returns:
the api version

getUri

public String getUri()
Gets the uri of this media

Returns:
the uri

delete

public boolean delete()
               throws TwilioRestException
Delete this Media

Returns:
true, if successful
Throws:
TwilioRestException - the twilio rest exception


Copyright © 2011 Twilio, Inc. All Rights Reserved.