All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bandwidth.voice.bxml.verbs.StartRecording Maven / Gradle / Ivy

Go to download

The official client SDK for Bandwidth's Voice, Messaging, MFA, and WebRTC APIs

There is a newer version: 12.0.1
Show newest version

package com.bandwidth.voice.bxml.verbs;

import lombok.Builder;

import java.net.URI;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;

/**
 * The StartRecording verb allows a segment of a call to be recorded while other verbs are executing.
 *
* All audio on both sides of the call will be recorded until the call ends or the verb is used or the verb is used. */ @Builder @XmlType(name = StartRecording.TYPE_NAME) public class StartRecording implements Verb { public static final String TYPE_NAME = "StartRecording"; /** * (optional) A boolean value. If true, the recording will be submitted for transcription upon completion. Defaults to false. */ @XmlAttribute private boolean transcribe; /** * (optional) URL to send the transcriptionAvailable event to. */ @XmlAttribute private URI transcriptionAvailableUrl; /** * (optional) The HTTP method to use for the request to transcriptionAvailableUrl. GET or POST. Default Value is POST. */ @XmlAttribute private Method transcriptionAvailableMethod; /** * (optional) URL to send the Record Complete event to once it has ended. Accepts BXML. */ @XmlAttribute private URI recordingAvailableUrl; /** * (optional) The HTTP method to use for the request to recordingAvailableUrl. GET or POST. Default Value is POST. */ @XmlAttribute private Method recordingAvailableMethod; /** * (optional) A custom string that will be sent with this and all future callbacks unless overwritten by a future tag attribute or cleared. *
* May be cleared by setting tag="" *
* Max length 256 characters. */ @XmlAttribute private String tag; /** * (optional) The username to send in the HTTP request to recordCompleteUrl or recordingAvailableUrl. If specified, the URLs must be TLS-encrypted (i.e., https). */ @XmlAttribute protected String username; /** * (optional) The password to send in the HTTP request to recordCompleteUrl or recordingAvailableUrl. If specified, the URLs must be TLS-encrypted (i.e., https). */ @XmlAttribute protected String password; /** * (optional) A boolean value indicating whether or not the recording file should separate each side of the call into its own audio channel. Default value is false. true results in two channels. */ @XmlAttribute protected boolean multiChannel; /** * (optional) The audio format that the recording will be saved as: mp3 or wav. Default value is wav. */ @XmlAttribute protected String fileFormat; public static class StartRecordingBuilder { /** * (required) URL to send the transcriptionAvailable event to. */ public StartRecordingBuilder transcriptionAvailableUrl(URI uri ){ this.transcriptionAvailableUrl = uri; return this; } /** * (required) URL to send the transcriptionAvailable event to. */ public StartRecordingBuilder transcriptionAvailableUrl(String uri){ return transcriptionAvailableUrl(URI.create(uri)); } /** * (optional) The HTTP method to use for the request to transcriptionAvailableUrl. GET or POST. Default Value is POST. */ public StartRecordingBuilder transcriptionAvailableMethod(Method method){ this.transcriptionAvailableMethod = method; return this; } /** * (optional) The HTTP method to use for the request to transcriptionAvailableUrl. GET or POST. Default Value is POST. Converts String to Method using Method.fromValue(method) */ public StartRecordingBuilder transcriptionAvailableMethod(String method){ return transcriptionAvailableMethod(Method.fromValue(method)); } /** * (required) URL to send the Recording Available event to once it has been processed. Does not accept BXML. */ public StartRecordingBuilder recordingAvailableUrl(URI uri ){ this.recordingAvailableUrl = uri; return this; } /** * (required) URL to send the Recording Available event to once it has been processed. Does not accept BXML. */ public StartRecordingBuilder recordingAvailableUrl(String uri){ return recordingAvailableUrl(URI.create(uri)); } /** * (optional) The HTTP method to use for the request to recordingAvailableUrl. GET or POST. Default Value is POST. */ public StartRecordingBuilder recordingAvailableMethod(Method method){ this.recordingAvailableMethod = method; return this; } /** * (optional) The HTTP method to use for the request to recordingAvailableUrl. GET or POST. Default Value is POST. Converts String to Method using Method.fromValue(method) */ public StartRecordingBuilder recordingAvailableMethod(String method){ return recordingAvailableMethod(Method.fromValue(method)); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy