/// <summary>
        /// read
        /// </summary>
        ///
        /// <param name="pathDomainSid"> The domain_sid </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="pageSize"> Page size </param>
        /// <param name="limit"> Record limit </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of IpAccessControlListMapping </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <IpAccessControlListMappingResource> > ReadAsync(string pathDomainSid, string pathAccountSid = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null)
        {
            var options = new ReadIpAccessControlListMappingOptions(pathDomainSid)
            {
                PathAccountSid = pathAccountSid, PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
        /// <summary>
        /// read
        /// </summary>
        ///
        /// <param name="options"> Read IpAccessControlListMapping parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of IpAccessControlListMapping </returns>
        public static ResourceSet <IpAccessControlListMappingResource> Read(ReadIpAccessControlListMappingOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildReadRequest(options, client));

            var page = Page <IpAccessControlListMappingResource> .FromJson("ip_access_control_list_mappings", response.Content);

            return(new ResourceSet <IpAccessControlListMappingResource>(page, options, client));
        }
        /// <summary>
        /// read
        /// </summary>
        ///
        /// <param name="pathDomainSid"> The domain_sid </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="pageSize"> Page size </param>
        /// <param name="limit"> Record limit </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of IpAccessControlListMapping </returns>
        public static ResourceSet <IpAccessControlListMappingResource> Read(string pathDomainSid, string pathAccountSid = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null)
        {
            var options = new ReadIpAccessControlListMappingOptions(pathDomainSid)
            {
                PathAccountSid = pathAccountSid, PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
 private static Request BuildReadRequest(ReadIpAccessControlListMappingOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Api,
                "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/SIP/Domains/" + options.PathDomainSid + "/IpAccessControlListMappings.json",
                queryParams: options.GetParams()
                ));
 }