Package com.nexmo.client.voice.ncco
Class StreamAction.Builder
- java.lang.Object
-
- com.nexmo.client.voice.ncco.StreamAction.Builder
-
- Enclosing class:
- StreamAction
public static class StreamAction.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StreamAction.BuilderbargeIn(java.lang.Boolean bargeIn)StreamActionbuild()StreamAction.Builderlevel(java.lang.Float level)StreamAction.Builderloop(java.lang.Integer loop)StreamAction.BuilderstreamUrl(java.lang.String... streamUrl)StreamAction.BuilderstreamUrl(java.util.Collection<java.lang.String> streamUrl)
-
-
-
Constructor Detail
-
Builder
public Builder(java.util.Collection<java.lang.String> streamUrl)
- Parameters:
streamUrl- An array containing a single URL to an mp3 or wav (16-bit) audio file to stream to the Call or Conversation.
-
Builder
public Builder(java.lang.String... streamUrl)
- Parameters:
streamUrl- An array containing a single URL to an mp3 or wav (16-bit) audio file to stream to the Call or Conversation.
-
-
Method Detail
-
streamUrl
public StreamAction.Builder streamUrl(java.util.Collection<java.lang.String> streamUrl)
- Parameters:
streamUrl- An array containing a single URL to an mp3 or wav (16-bit) audio file to stream to the Call or Conversation.- Returns:
- The
StreamAction.Builderto keep building.
-
streamUrl
public StreamAction.Builder streamUrl(java.lang.String... streamUrl)
- Parameters:
streamUrl- An array containing a single URL to an mp3 or wav (16-bit) audio file to stream to the Call or Conversation.- Returns:
- The
StreamAction.Builderto keep building.
-
level
public StreamAction.Builder level(java.lang.Float level)
- Parameters:
level- Set the audio level of the stream in the range between -1 and 1 inclusively with a precision of 0.1. The default value is 0.- Returns:
- The
StreamAction.Builderto keep building.
-
bargeIn
public StreamAction.Builder bargeIn(java.lang.Boolean bargeIn)
- Parameters:
bargeIn- Set to true so this action is terminated when the user presses a button on the keypad. Use this feature to enable users to choose an option without having to listen to the whole message in your Interactive Voice Response (IVR ). If you set bargeIn to true on one more Stream actions then the next action in the NCCO stack must be an input action.The default value is false.
- Returns:
- The
StreamAction.Builderto keep building.
-
loop
public StreamAction.Builder loop(java.lang.Integer loop)
- Parameters:
loop- The number of times audio is repeated before the Call is closed. The default value is 1. Set to 0 to loop infinitely.- Returns:
- The
StreamAction.Builderto keep building.
-
build
public StreamAction build()
- Returns:
- A new
StreamActionobject from the stored builder options.
-
-