Constructor and Description |
---|
SessionCreator(String pathServiceSid)
Construct a new SessionCreator.
|
Modifier and Type | Method and Description |
---|---|
Session |
create(TwilioRestClient client)
Make the request to the Twilio API to perform the create.
|
SessionCreator |
setDateExpiry(ZonedDateTime dateExpiry)
The ISO 8601 date when
the Session should expire.
|
SessionCreator |
setFailOnParticipantConflict(Boolean failOnParticipantConflict)
[Experimental] For accounts with the ProxyAllowParticipantConflict account
flag, setting to true enables per-request opt-in to allowing Proxy to reject
a Session create (with Participants) request that could cause the same
Identifier/ProxyIdentifier pair to be active in multiple Sessions.
|
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.
|
create, createAsync, createAsync
public SessionCreator(String pathServiceSid)
pathServiceSid
- The SID of the parent Service resourcepublic SessionCreator setUniqueName(String uniqueName)
uniqueName
- An application-defined string that uniquely identifies the
resourcepublic SessionCreator setDateExpiry(ZonedDateTime dateExpiry)
dateExpiry
- The ISO 8601 date when the Session should expirepublic SessionCreator setTtl(Integer ttl)
ttl
- When the session will expirepublic SessionCreator setMode(Session.Mode mode)
mode
- The Mode of the Sessionpublic SessionCreator setStatus(Session.Status status)
status
- Session statuspublic SessionCreator setParticipants(List<Map<String,Object>> participants)
participants
- The Participant objects to include in the new sessionpublic SessionCreator setParticipants(Map<String,Object> participants)
participants
- The Participant objects to include in the new sessionpublic SessionCreator setFailOnParticipantConflict(Boolean failOnParticipantConflict)
failOnParticipantConflict
- An experimental parameter to override the
ProxyAllowParticipantConflict account flag
on a per-request basis.public Session create(TwilioRestClient client)
Copyright © 2019 Twilio, Inc. All Rights Reserved.