Skip to content

Commit ec9668f

Browse files
author
Doug Black
committed
add CredentiaListMapping
1 parent 7704e09 commit ec9668f

File tree

8 files changed

+553
-116
lines changed

8 files changed

+553
-116
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.twilio.sdk.resource.factory.sip;
2+
3+
import java.util.Map;
4+
5+
import com.twilio.sdk.TwilioRestException;
6+
import com.twilio.sdk.resource.instance.sip.CredentialListMapping;
7+
8+
// TODO: Auto-generated Javadoc
9+
/**
10+
* A factory for creating SipDomain objects.
11+
*
12+
* For more information see <a href=" http://www.twilio.com/docs/api/rest/credential-list-mappings"> http://www.twilio.com/docs/api/rest/credential-list-mappings</a>
13+
*
14+
*/
15+
public interface CredentialListMappingFactory {
16+
17+
18+
/**
19+
* Creates the ip access control list mapping
20+
*
21+
* @param params the params
22+
* @return the ip access control list mapping
23+
* @throws TwilioRestException
24+
*/
25+
public CredentialListMapping create(Map<String, String> params) throws TwilioRestException;
26+
27+
}

src/main/java/com/twilio/sdk/resource/instance/Account.java

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
import com.twilio.sdk.resource.InstanceResource;
1111
import com.twilio.sdk.resource.factory.*;
1212
import com.twilio.sdk.resource.list.*;
13+
import com.twilio.sdk.resource.factory.sip.*;
14+
import com.twilio.sdk.resource.list.sip.*;
15+
import com.twilio.sdk.resource.instance.sip.*;
1316
import com.twilio.sdk.TwilioRestException;
1417
import com.twilio.sdk.TwilioRestResponse;
1518

@@ -841,6 +844,120 @@ public AuthorizedConnectApp getAuthorizedConnectApp(String sid) {
841844
return cn;
842845
}
843846

847+
/**
848+
* Gets the sip domains list.
849+
*
850+
* <a href="http://www.twilio.com/docs/api/rest/sip-domains">http://www.twilio.com/docs/api/rest/sip-domains</a>
851+
*
852+
* @return the sip domain
853+
*/
854+
public DomainList getDomainList() {
855+
return this.getDomainList(new HashMap<String, String>());
856+
}
857+
858+
/**
859+
* Gets the domain list with the given filters
860+
*
861+
* <a href="http://www.twilio.com/docs/api/rest/sip-domains">http://www.twilio.com/docs/api/rest/sip-domains</a>
862+
*
863+
* @param filters
864+
* the filters
865+
* @return the sip domain list
866+
*/
867+
public DomainList getDomainList(Map<String, String> filters) {
868+
DomainList list = new DomainList(this.getClient(),
869+
filters);
870+
list.setRequestAccountSid(this.getRequestAccountSid());
871+
return list;
872+
}
873+
874+
/**
875+
* Get a given sip domain instance by sid
876+
* @param sid The 34 character sid starting with SD
877+
* @return the sip domain
878+
*/
879+
public Domain getDomain(String sid) {
880+
Domain domain = new Domain(this.getClient(), sid);
881+
domain.setRequestAccountSid(this.getRequestAccountSid());
882+
return domain;
883+
}
884+
885+
/**
886+
* Gets the sip IpAccessControlLists list.
887+
*
888+
* <a href="http://www.twilio.com/docs/api/rest/sip-ip-access-control-lists">http://www.twilio.com/docs/api/rest/sip-ip-access-control-lists</a>
889+
*
890+
* @return the sip IpAccessControlList
891+
*/
892+
public IpAccessControlListList getIpAccessControlListList() {
893+
return this.getIpAccessControlListList(new HashMap<String, String>());
894+
}
895+
896+
/**
897+
* Gets the IpAccessControlList list with the given filters
898+
*
899+
* <a href="http://www.twilio.com/docs/api/rest/sip-ip-access-control-lists">http://www.twilio.com/docs/api/rest/sip-ip-access-control-lists</a>
900+
*
901+
* @param filters
902+
* the filters
903+
* @return the sip IpAccessControlList list
904+
*/
905+
public IpAccessControlListList getIpAccessControlListList(Map<String, String> filters) {
906+
IpAccessControlListList list = new IpAccessControlListList(this.getClient(),
907+
filters);
908+
list.setRequestAccountSid(this.getRequestAccountSid());
909+
return list;
910+
}
911+
912+
/**
913+
* Get a given IpAccessControlList instance by sid
914+
* @param sid The 34 character sid starting with AL
915+
* @return the sip IpAccessControlList
916+
*/
917+
public IpAccessControlList getIpAccessControlList(String sid) {
918+
IpAccessControlList ipAccessControlList = new IpAccessControlList(this.getClient(), sid);
919+
ipAccessControlList.setRequestAccountSid(this.getRequestAccountSid());
920+
return ipAccessControlList;
921+
}
922+
923+
/**
924+
* Gets the sip CredentialLists list.
925+
*
926+
* <a href="http://www.twilio.com/docs/api/rest/sip-credential-lists">http://www.twilio.com/docs/api/rest/sip-credential-lists</a>
927+
*
928+
* @return the sip CredentialList
929+
*/
930+
public CredentialListList getCredentialLists() {
931+
return this.getCredentialListList(new HashMap<String, String>());
932+
}
933+
934+
/**
935+
* Gets the CredentialList list with the given filters
936+
*
937+
* <a href="http://www.twilio.com/docs/api/rest/sip-credential-lists">http://www.twilio.com/docs/api/rest/sip-credential-lists</a>
938+
*
939+
* @param filters
940+
* the filters
941+
* @return the sip CredentialList list
942+
*/
943+
public CredentialListList getCredentialListList(Map<String, String> filters) {
944+
CredentialListList list = new CredentialListList(this.getClient(),
945+
filters);
946+
list.setRequestAccountSid(this.getRequestAccountSid());
947+
return list;
948+
}
949+
950+
/**
951+
* Get a given CredentialList instance by sid
952+
* @param sid The 34 character sid starting with AL
953+
* @return the sip CredentialList
954+
*/
955+
public CredentialListInstance getCredentialList(String sid) {
956+
CredentialListInstance credentialList = new CredentialListInstance(this.getClient(), sid);
957+
credentialList.setRequestAccountSid(this.getRequestAccountSid());
958+
return credentialList;
959+
}
960+
844961
/**
845962
* Get the developer sandbox
846963
*

0 commit comments

Comments
 (0)