Package com.nexmo.client.voice.ncco
Class ConversationAction.Builder
- java.lang.Object
-
- com.nexmo.client.voice.ncco.ConversationAction.Builder
-
- Enclosing class:
- ConversationAction
public static class ConversationAction.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConversationAction
build()
ConversationAction.Builder
endOnExit(java.lang.Boolean endOnExit)
ConversationAction.Builder
eventMethod(EventMethod eventMethod)
ConversationAction.Builder
eventUrl(java.lang.String... eventUrl)
ConversationAction.Builder
eventUrl(java.util.Collection<java.lang.String> eventUrl)
ConversationAction.Builder
musicOnHoldUrl(java.lang.String... musicOnHoldUrl)
ConversationAction.Builder
musicOnHoldUrl(java.util.Collection<java.lang.String> musicOnHoldUrl)
ConversationAction.Builder
name(java.lang.String name)
ConversationAction.Builder
record(java.lang.Boolean record)
ConversationAction.Builder
startOnEnter(java.lang.Boolean startOnEnter)
-
-
-
Constructor Detail
-
Builder
public Builder(java.lang.String name)
- Parameters:
name
- The name of the Conversation room.
-
-
Method Detail
-
name
public ConversationAction.Builder name(java.lang.String name)
- Parameters:
name
- The name of the Conversation room.- Returns:
- The
ConversationAction.Builder
to keep building.
-
musicOnHoldUrl
public ConversationAction.Builder musicOnHoldUrl(java.util.Collection<java.lang.String> musicOnHoldUrl)
- Parameters:
musicOnHoldUrl
- A URL to the mp3 file to stream to participants until the conversation starts. By default the conversation starts when the first person calls the virtual number associated with your Voice app. To stream this mp3 before the moderator joins the conversation, set startOnEnter to false for all users other than the moderator.- Returns:
- The
ConversationAction.Builder
to keep building.
-
musicOnHoldUrl
public ConversationAction.Builder musicOnHoldUrl(java.lang.String... musicOnHoldUrl)
- Parameters:
musicOnHoldUrl
- A URL to the mp3 file to stream to participants until the conversation starts. By default the conversation starts when the first person calls the virtual number associated with your Voice app. To stream this mp3 before the moderator joins the conversation, set startOnEnter to false for all users other than the moderator.- Returns:
- The
ConversationAction.Builder
to keep building.
-
startOnEnter
public ConversationAction.Builder startOnEnter(java.lang.Boolean startOnEnter)
- Parameters:
startOnEnter
- The default value of true ensures that the conversation starts when this caller joins conversation name. Set to false for attendees in a moderated conversation.- Returns:
- The
ConversationAction.Builder
to keep building.
-
endOnExit
public ConversationAction.Builder endOnExit(java.lang.Boolean endOnExit)
- Parameters:
endOnExit
- For moderated conversations, set to true in the moderator NCCO so the conversation is ended when the moderator hangs up. The default value of false means the conversation is not terminated when a caller hangs up; the conversation ends when the last caller hangs up.- Returns:
- The
ConversationAction.Builder
to keep building.
-
record
public ConversationAction.Builder record(java.lang.Boolean record)
- Parameters:
record
- Set to true to record this conversation. For standard conversations, recordings start when one or more attendees connects to the conversation. For moderated conversations, recordings start when the moderator joins. That is, when an NCCO is executed for the named conversation where startOnEnter is set to true. When the recording is terminated, the URL you download the recording from is sent to the event URL.By default audio is recorded in MP3 format. See the recording guide for more details
- Returns:
- The
ConversationAction.Builder
to keep building.
-
eventUrl
public ConversationAction.Builder eventUrl(java.util.Collection<java.lang.String> eventUrl)
- Parameters:
eventUrl
- Set the URL to the webhook endpoint Nexmo calls asynchronously on each of the Call States.- Returns:
- The
ConversationAction.Builder
to keep building.
-
eventUrl
public ConversationAction.Builder eventUrl(java.lang.String... eventUrl)
- Parameters:
eventUrl
- Set the URL to the webhook endpoint Nexmo calls asynchronously on each of the Call States.- Returns:
- The
ConversationAction.Builder
to keep building.
-
eventMethod
public ConversationAction.Builder eventMethod(EventMethod eventMethod)
- Parameters:
eventMethod
- Set the HTTP method used to make the request to eventUrl. The default value is POST.- Returns:
- The
ConversationAction.Builder
to keep building.
-
build
public ConversationAction build()
- Returns:
- A new
ConversationAction
object from the stored builder options.
-
-