001package com.plivo.api.models.endpoint;
002
003import com.plivo.api.models.base.VoiceCreator;
004import retrofit2.Call;
005
006public class EndpointCreator extends VoiceCreator<EndpointCreateResponse> {
007
008  private final String username;
009  private final String password;
010  private final String alias;
011  private String appId;
012
013  public EndpointCreator(String username, String password, String alias) {
014    this.username = username;
015    this.password = password;
016    this.alias = alias;
017  }
018
019  public String appId() {
020    return this.appId;
021  }
022
023  public EndpointCreator appId(final String appId) {
024    this.appId = appId;
025    return this;
026  }
027
028  @Override
029  protected Call<EndpointCreateResponse> obtainCall() {
030    return client().getVoiceApiService().endpointCreate(client().getAuthId(), this);
031  }
032
033  @Override
034  protected Call<EndpointCreateResponse> obtainFallback1Call() {
035    return client().getVoiceFallback1Service().endpointCreate(client().getAuthId(), this);
036  }
037
038  @Override
039  protected Call<EndpointCreateResponse> obtainFallback2Call() {
040    return client().getVoiceFallback2Service().endpointCreate(client().getAuthId(), this);
041  }
042}