Package com.twilio.rest.proxy.v1.service
Class SessionCreator
- java.lang.Object
-
- com.twilio.base.Creator<Session>
-
- com.twilio.rest.proxy.v1.service.SessionCreator
-
-
Constructor Summary
Constructors Constructor Description SessionCreator(String pathServiceSid)
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
setDateExpiry(org.joda.time.DateTime dateExpiry)
The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session should expire.SessionCreator
setMode(Session.Mode mode)
The Mode of the Session.SessionCreator
setParticipants(List<Map<String,Object>> participants)
The Participant objects to include in the new session..SessionCreator
setParticipants(Map<String,Object> participants)
The Participant objects to include in the new session..SessionCreator
setStatus(Session.Status status)
The initial status of the Session.SessionCreator
setTtl(Integer ttl)
The time, in seconds, when the session will expire.SessionCreator
setUniqueName(String uniqueName)
An application-defined string that uniquely identifies the resource.-
Methods inherited from class com.twilio.base.Creator
create, createAsync, createAsync
-
-
-
-
Constructor Detail
-
SessionCreator
public SessionCreator(String pathServiceSid)
Construct a new SessionCreator.- Parameters:
pathServiceSid
- The SID of the parent Service resource
-
-
Method Detail
-
setUniqueName
public SessionCreator setUniqueName(String uniqueName)
An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.**.- Parameters:
uniqueName
- An application-defined string that uniquely identifies the resource- Returns:
- this
-
setDateExpiry
public SessionCreator setDateExpiry(org.joda.time.DateTime dateExpiry)
The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session should expire. If this is value is present, it overrides the `ttl` value..- Parameters:
dateExpiry
- The ISO 8601 date when the Session should expire- Returns:
- this
-
setTtl
public SessionCreator setTtl(Integer ttl)
The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction..- Parameters:
ttl
- When the session will expire- Returns:
- this
-
setMode
public SessionCreator setMode(Session.Mode mode)
The Mode of the Session. Can be: `message-only`, `voice-only`, or `voice-and-message` and the default value is `voice-and-message`..- Parameters:
mode
- The Mode of the Session- Returns:
- this
-
setStatus
public SessionCreator setStatus(Session.Status status)
The initial status of the Session. Can be: `open`, `in-progress`, `closed`, `failed`, or `unknown`. The default is `open` on create..- Parameters:
status
- Session status- Returns:
- this
-
setParticipants
public SessionCreator setParticipants(List<Map<String,Object>> participants)
The Participant objects to include in the new session..- Parameters:
participants
- The Participant objects to include in the new session- Returns:
- this
-
setParticipants
public SessionCreator setParticipants(Map<String,Object> participants)
The Participant objects to include in the new session..- Parameters:
participants
- The Participant objects to include in the new session- Returns:
- this
-
create
public Session create(TwilioRestClient client)
Make the request to the Twilio API to perform the create.
-
-