001package com.plivo.api.models.application;
002
003import com.plivo.api.models.base.Updater;
004import retrofit2.Call;
005
006public class ApplicationUpdater extends Updater<ApplicationUpdateResponse> {
007
008  private String answerUrl;
009  private String answerMethod;
010  private String hangupUrl;
011  private String hangupMethod;
012  private String fallbackAnswerUrl;
013  private String fallbackMethod;
014  private String messageUrl;
015  private String messageMethod;
016  private Boolean defaultNumberApp;
017  private Boolean defaultEndpointApp;
018  private String subaccount;
019  private Boolean logIncomingMessages;
020
021  public ApplicationUpdater(String id) {
022    super(id);
023  }
024
025  public String answerUrl() {
026    return this.answerUrl;
027  }
028
029  public String answerMethod() {
030    return this.answerMethod;
031  }
032
033  public String hangupUrl() {
034    return this.hangupUrl;
035  }
036
037  public String hangupMethod() {
038    return this.hangupMethod;
039  }
040
041  public String fallbackAnswerUrl() {
042    return this.fallbackAnswerUrl;
043  }
044
045  public String fallbackMethod() {
046    return this.fallbackMethod;
047  }
048
049  public String messageUrl() {
050    return this.messageUrl;
051  }
052
053  public String messageMethod() {
054    return this.messageMethod;
055  }
056
057  public Boolean defaultNumberApp() {
058    return this.defaultNumberApp;
059  }
060
061  public Boolean defaultEndpointApp() {
062    return this.defaultEndpointApp;
063  }
064
065  public String subaccount() {
066    return this.subaccount;
067  }
068
069  public Boolean logIncomingMessages() {
070    return this.logIncomingMessages;
071  }
072
073  public ApplicationUpdater answerUrl(final String answerUrl) {
074    this.answerUrl = answerUrl;
075    return this;
076  }
077
078  public ApplicationUpdater answerMethod(final String answerMethod) {
079    this.answerMethod = answerMethod;
080    return this;
081  }
082
083  public ApplicationUpdater hangupUrl(final String hangupUrl) {
084    this.hangupUrl = hangupUrl;
085    return this;
086  }
087
088  public ApplicationUpdater hangupMethod(final String hangupMethod) {
089    this.hangupMethod = hangupMethod;
090    return this;
091  }
092
093  public ApplicationUpdater fallbackAnswerUrl(final String fallbackAnswerUrl) {
094    this.fallbackAnswerUrl = fallbackAnswerUrl;
095    return this;
096  }
097
098  public ApplicationUpdater fallbackMethod(final String fallbackMethod) {
099    this.fallbackMethod = fallbackMethod;
100    return this;
101  }
102
103  public ApplicationUpdater messageUrl(final String messageUrl) {
104    this.messageUrl = messageUrl;
105    return this;
106  }
107
108  public ApplicationUpdater messageMethod(final String messageMethod) {
109    this.messageMethod = messageMethod;
110    return this;
111  }
112
113  public ApplicationUpdater defaultNumberApp(final Boolean defaultNumberApp) {
114    this.defaultNumberApp = defaultNumberApp;
115    return this;
116  }
117
118  public ApplicationUpdater defaultEndpointApp(final Boolean defaultEndpointApp) {
119    this.defaultEndpointApp = defaultEndpointApp;
120    return this;
121  }
122
123  public ApplicationUpdater subaccount(final String subaccount) {
124    this.subaccount = subaccount;
125    return this;
126  }
127
128  public ApplicationUpdater logIncomingMessages(final Boolean logIncomingMessages) {
129    this.logIncomingMessages = logIncomingMessages;
130    return this;
131  }
132
133
134  @Override
135  protected Call<ApplicationUpdateResponse> obtainCall() {
136    return client().getApiService().applicationUpdate(client().getAuthId(), id, this);
137  }
138}