Package com.twilio.rest.messaging.v1
Class SessionCreator
- java.lang.Object
-
- com.twilio.base.Creator<Session>
-
- com.twilio.rest.messaging.v1.SessionCreator
-
public class SessionCreator extends Creator<Session>
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
-
-
Constructor Summary
Constructors Constructor Description SessionCreator(String messagingServiceSid)
Construct a new SessionCreator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Session
create(TwilioRestClient client)
Make the request to the Twilio API to perform the create.SessionCreator
setAttributes(String attributes)
An optional string metadata field you can use to store any data you wish.SessionCreator
setCreatedBy(String createdBy)
Identity of the session's creator.SessionCreator
setDateCreated(org.joda.time.DateTime dateCreated)
The date that this resource was created..SessionCreator
setDateUpdated(org.joda.time.DateTime dateUpdated)
The date that this resource was last updated..SessionCreator
setFriendlyName(String friendlyName)
The human-readable name of this session.-
Methods inherited from class com.twilio.base.Creator
create, createAsync, createAsync
-
-
-
-
Constructor Detail
-
SessionCreator
public SessionCreator(String messagingServiceSid)
Construct a new SessionCreator.- Parameters:
messagingServiceSid
- The unique id of the SMS Service this session belongs to.
-
-
Method Detail
-
setFriendlyName
public SessionCreator setFriendlyName(String friendlyName)
The human-readable name of this session. Optional..- Parameters:
friendlyName
- The human-readable name of this session.- Returns:
- this
-
setAttributes
public SessionCreator setAttributes(String attributes)
An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned..- Parameters:
attributes
- An optional string metadata field you can use to store any data you wish.- Returns:
- this
-
setDateCreated
public SessionCreator setDateCreated(org.joda.time.DateTime dateCreated)
The date that this resource was created..- Parameters:
dateCreated
- The date that this resource was created.- Returns:
- this
-
setDateUpdated
public SessionCreator setDateUpdated(org.joda.time.DateTime dateUpdated)
The date that this resource was last updated..- Parameters:
dateUpdated
- The date that this resource was last updated.- Returns:
- this
-
setCreatedBy
public SessionCreator setCreatedBy(String createdBy)
Identity of the session's creator. If the Session was created through the API, the value will be `system`.- Parameters:
createdBy
- Identity of the session's creator.- Returns:
- this
-
create
public Session create(TwilioRestClient client)
Make the request to the Twilio API to perform the create.
-
-