Package com.nexmo.client.voice.ncco
Class RecordAction.Builder
- java.lang.Object
-
- com.nexmo.client.voice.ncco.RecordAction.Builder
-
- Enclosing class:
- RecordAction
public static class RecordAction.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordAction.BuilderbeepStart(java.lang.Boolean beepStart)RecordActionbuild()RecordAction.Builderchannels(java.lang.Integer channels)RecordAction.BuilderendOnKey(java.lang.Character endOnKey)RecordAction.BuilderendOnSilence(java.lang.Integer endOnSilence)RecordAction.BuildereventMethod(EventMethod eventMethod)RecordAction.BuildereventUrl(java.lang.String... eventUrl)RecordAction.BuildereventUrl(java.util.Collection<java.lang.String> eventUrl)RecordAction.Builderformat(RecordingFormat format)RecordAction.Buildersplit(SplitRecording split)RecordAction.BuildertimeOut(java.lang.Integer timeOut)
-
-
-
Constructor Detail
-
Builder
public Builder()
-
-
Method Detail
-
format
public RecordAction.Builder format(RecordingFormat format)
- Parameters:
format- Record the Call in a specificRecordingFormat.The default value is
RecordingFormat.MP3, orRecordingFormat.WAVwhen recording more than 2 channels.- Returns:
- The
RecordAction.Builderto keep building.
-
endOnSilence
public RecordAction.Builder endOnSilence(java.lang.Integer endOnSilence)
- Parameters:
endOnSilence- Stop recording after n seconds of silence. Once the recording is stopped the recording data is sent to event_url. The range of possible values is between 3 and 10 inclusively.- Returns:
- The
RecordAction.Builderto keep building.
-
endOnKey
public RecordAction.Builder endOnKey(java.lang.Character endOnKey)
- Parameters:
endOnKey- Stop recording when a digit is pressed on the handset. Possible values are: *, # or any single digit e.g. 9- Returns:
- The
RecordAction.Builderto keep building.
-
timeOut
public RecordAction.Builder timeOut(java.lang.Integer timeOut)
- Parameters:
timeOut- The maximum length of a recording in seconds. One the recording is stopped the recording data is sent to event_url. The range of possible values is between 3 seconds and 7200 seconds (2 hours)- Returns:
- The
RecordAction.Builderto keep building.
-
beepStart
public RecordAction.Builder beepStart(java.lang.Boolean beepStart)
- Parameters:
beepStart- Set to true to play a beep when a recording starts- Returns:
- The
RecordAction.Builderto keep building.
-
eventUrl
public RecordAction.Builder eventUrl(java.util.Collection<java.lang.String> eventUrl)
- Parameters:
eventUrl- The URL to the webhook endpoint that is called asynchronously when a recording is finished. If the message recording is hosted by Nexmo, this webhook contains the URL you need to download the recording and other meta data.- Returns:
- The
RecordAction.Builderto keep building.
-
eventUrl
public RecordAction.Builder eventUrl(java.lang.String... eventUrl)
- Parameters:
eventUrl- The URL to the webhook endpoint that is called asynchronously when a recording is finished. If the message recording is hosted by Nexmo, this webhook contains the URL you need to download the recording and other meta data.- Returns:
- The
RecordAction.Builderto keep building.
-
eventMethod
public RecordAction.Builder eventMethod(EventMethod eventMethod)
- Parameters:
eventMethod- The HTTP method used to make the request to eventUrl. The default value is POST.- Returns:
- The
RecordAction.Builderto keep building.
-
split
public RecordAction.Builder split(SplitRecording split)
- Parameters:
split- Record the sent and received audio in separate channels of a stereo recording—set toSplitRecording.CONVERSATIONto enable this.- Returns:
- The
RecordAction.Builderto keep building.
-
channels
public RecordAction.Builder channels(java.lang.Integer channels)
- Parameters:
channels- The number of channels to record (maximum 32). If the number of participants exceeds channels any additional participants will be added to the last channel in file.splitwill be set toSplitRecording.CONVERSATIONduring the build process if channels is greater than 1.- Returns:
- The
RecordAction.Builderto keep building.
-
build
public RecordAction build()
- Returns:
- A new
RecordActionobject from the stored builder options.
-
-