001package com.plivo.api.xml;
002
003import java.util.ArrayList;
004import java.util.Arrays;
005import java.util.List;
006import javax.xml.bind.annotation.XmlAttribute;
007import javax.xml.bind.annotation.XmlElements;
008import javax.xml.bind.annotation.XmlRootElement;
009
010@XmlRootElement(name = "Dial")
011public class Dial extends PlivoXml implements ResponseNestable {
012
013  @XmlAttribute
014  private String action;
015
016  @XmlAttribute
017  private String method;
018
019  @XmlAttribute
020  private Boolean hangupOnStar;
021
022  @XmlAttribute
023  private Integer timeLimit;
024
025  @XmlAttribute
026  private Integer timeout;
027
028  @XmlAttribute
029  private String callerId;
030
031  @XmlAttribute
032  private String callerName;
033
034  @XmlAttribute
035  private String confirmSound;
036
037  @XmlAttribute
038  private String confirmKey;
039
040  @XmlAttribute
041  private String dialMusic;
042
043  @XmlAttribute
044  private String callbackUrl;
045
046  @XmlAttribute
047  private String callbackMethod;
048
049  @XmlAttribute
050  private Boolean redirect;
051
052  @XmlAttribute
053  private String digitsMatch;
054
055  @XmlAttribute
056  private String digitsMatchBLeg;
057
058  @XmlAttribute
059  private String sipHeaders;
060
061  public String action() {
062    return this.action;
063  }
064
065  public String method() {
066    return this.method;
067  }
068
069  public Boolean hangupOnStar() {
070    return this.hangupOnStar;
071  }
072
073  public Integer timeLimit() {
074    return this.timeLimit;
075  }
076
077  public Integer timeout() {
078    return this.timeout;
079  }
080
081  public String callerId() {
082    return this.callerId;
083  }
084
085  public String callerName() {
086    return this.callerName;
087  }
088
089  public String confirmSound() {
090    return this.confirmSound;
091  }
092
093  public String confirmKey() {
094    return this.confirmKey;
095  }
096
097  public String dialMusic() {
098    return this.dialMusic;
099  }
100
101  public String callbackUrl() {
102    return this.callbackUrl;
103  }
104
105  public String callbackMethod() {
106    return this.callbackMethod;
107  }
108
109  public Boolean redirect() {
110    return this.redirect;
111  }
112
113  public String digitsMatch() {
114    return this.digitsMatch;
115  }
116
117  public String digitsMatchBLeg() {
118    return this.digitsMatchBLeg;
119  }
120
121  public String sipHeaders() {
122    return this.sipHeaders;
123  }
124
125  public List<DialNestable> children() {
126    return this.children;
127  }
128
129  public Dial action(final String action) {
130    this.action = action;
131    return this;
132  }
133
134  public Dial method(final String method) {
135    this.method = method;
136    return this;
137  }
138
139  public Dial hangupOnStar(final Boolean hangupOnStar) {
140    this.hangupOnStar = hangupOnStar;
141    return this;
142  }
143
144  public Dial timeLimit(final Integer timeLimit) {
145    this.timeLimit = timeLimit;
146    return this;
147  }
148
149  public Dial timeout(final Integer timeout) {
150    this.timeout = timeout;
151    return this;
152  }
153
154  public Dial callerId(final String callerId) {
155    this.callerId = callerId;
156    return this;
157  }
158
159  public Dial callerName(final String callerName) {
160    this.callerName = callerName;
161    return this;
162  }
163
164  public Dial confirmSound(final String confirmSound) {
165    this.confirmSound = confirmSound;
166    return this;
167  }
168
169  public Dial confirmKey(final String confirmKey) {
170    this.confirmKey = confirmKey;
171    return this;
172  }
173
174  public Dial dialMusic(final String dialMusic) {
175    this.dialMusic = dialMusic;
176    return this;
177  }
178
179  public Dial callbackUrl(final String callbackUrl) {
180    this.callbackUrl = callbackUrl;
181    return this;
182  }
183
184  public Dial callbackMethod(final String callbackMethod) {
185    this.callbackMethod = callbackMethod;
186    return this;
187  }
188
189  public Dial redirect(final Boolean redirect) {
190    this.redirect = redirect;
191    return this;
192  }
193
194  public Dial digitsMatch(final String digitsMatch) {
195    this.digitsMatch = digitsMatch;
196    return this;
197  }
198
199  public Dial digitsMatchBLeg(final String digitsMatchBLeg) {
200    this.digitsMatchBLeg = digitsMatchBLeg;
201    return this;
202  }
203
204  public Dial sipHeaders(final String sipHeaders) {
205    this.sipHeaders = sipHeaders;
206    return this;
207  }
208
209  public Dial children(final List<DialNestable> children) {
210    this.children = children;
211    return this;
212  }
213
214
215  @XmlElements({
216    @javax.xml.bind.annotation.XmlElement(name = "Number", type = Number.class),
217    @javax.xml.bind.annotation.XmlElement(name = "User", type = User.class)
218  })
219  private List<DialNestable> children = new ArrayList<>();
220
221  public Dial children(DialNestable... nestables) {
222    children.addAll(Arrays.asList(nestables));
223    return this;
224  }
225}