com.twilio.twiml.VoiceResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of twilio Show documentation
Show all versions of twilio Show documentation
Twilio Java Helper Library
/**
* This code was generated by
* \ / _ _ _| _ _
* | (_)\/(_)(_|\/| |(/_ v1.0.0
* / /
*/
package com.twilio.twiml;
import com.twilio.twiml.voice.Connect;
import com.twilio.twiml.voice.Dial;
import com.twilio.twiml.voice.Echo;
import com.twilio.twiml.voice.Enqueue;
import com.twilio.twiml.voice.Gather;
import com.twilio.twiml.voice.Hangup;
import com.twilio.twiml.voice.Leave;
import com.twilio.twiml.voice.Pause;
import com.twilio.twiml.voice.Play;
import com.twilio.twiml.voice.Queue;
import com.twilio.twiml.voice.Record;
import com.twilio.twiml.voice.Redirect;
import com.twilio.twiml.voice.Reject;
import com.twilio.twiml.voice.Say;
import com.twilio.twiml.voice.Sms;
/**
* TwiML wrapper for {@code }
*/
public class VoiceResponse extends TwiML {
/**
* For XML Serialization/Deserialization
*/
private VoiceResponse() {
this(new Builder());
}
/**
* Create a new {@code } element
*/
private VoiceResponse(Builder b) {
super("Response", b);
}
/**
* Create a new {@code } element
*/
public static class Builder extends TwiML.Builder {
/**
* Add a child {@code } element
*/
public Builder connect(Connect connect) {
this.children.add(connect);
return this;
}
/**
* Add a child {@code } element
*/
public Builder dial(Dial dial) {
this.children.add(dial);
return this;
}
/**
* Add a child {@code } element
*/
public Builder echo(Echo echo) {
this.children.add(echo);
return this;
}
/**
* Add a child {@code } element
*/
public Builder enqueue(Enqueue enqueue) {
this.children.add(enqueue);
return this;
}
/**
* Add a child {@code } element
*/
public Builder gather(Gather gather) {
this.children.add(gather);
return this;
}
/**
* Add a child {@code } element
*/
public Builder hangup(Hangup hangup) {
this.children.add(hangup);
return this;
}
/**
* Add a child {@code } element
*/
public Builder leave(Leave leave) {
this.children.add(leave);
return this;
}
/**
* Add a child {@code } element
*/
public Builder pause(Pause pause) {
this.children.add(pause);
return this;
}
/**
* Add a child {@code } element
*/
public Builder play(Play play) {
this.children.add(play);
return this;
}
/**
* Add a child {@code } element
*/
public Builder queue(Queue queue) {
this.children.add(queue);
return this;
}
/**
* Add a child {@code } element
*/
public Builder record(Record record) {
this.children.add(record);
return this;
}
/**
* Add a child {@code } element
*/
public Builder redirect(Redirect redirect) {
this.children.add(redirect);
return this;
}
/**
* Add a child {@code } element
*/
public Builder reject(Reject reject) {
this.children.add(reject);
return this;
}
/**
* Add a child {@code } element
*/
public Builder say(Say say) {
this.children.add(say);
return this;
}
/**
* Add a child {@code } element
*/
public Builder sms(Sms sms) {
this.children.add(sms);
return this;
}
/**
* Create and return resulting {@code } element
*/
public VoiceResponse build() {
return new VoiceResponse(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy