001package com.plivo.api.models.powerpack; 002 003import com.plivo.api.models.base.Creator; 004import com.plivo.api.util.Utils; 005import retrofit2.Call; 006 007public class PowerpackCreator extends Creator<PowerpackResponse> { 008 private String name; 009 private String application_type = null; 010 private String application_id = null; 011 private Boolean sticky_sender = Boolean.TRUE; 012 private Boolean local_connect = Boolean.TRUE; 013 private NumberPriority[] number_priority; 014 015 PowerpackCreator(String name) { 016 if (!Utils.allNotNull(name)) { 017 throw new IllegalStateException("powerpack name is required"); 018 } 019 this.name = name; 020 } 021 022 public String name() { 023 return this.name; 024 } 025 026 public String application_type() { 027 return this.application_type; 028 } 029 030 public String application_id() { 031 return this.application_id; 032 } 033 034 public Boolean sticky_sender() { 035 return this.sticky_sender; 036 } 037 038 public Boolean local_connect() { 039 return this.local_connect; 040 } 041 042 public NumberPriority[] number_priority() { 043 return number_priority; 044 } 045 046 public PowerpackCreator number_priority(final NumberPriority[] numberPriorities) { 047 this.number_priority = numberPriorities; 048 return this; 049 } 050 051 @Override 052 protected Call<PowerpackResponse> obtainCall() { 053 return client().getApiService().createPowerpack(client().getAuthId(), this); 054 } 055}