func (c *ApiService) ListNetworkAccessProfile(params *ListNetworkAccessProfileParams) ([]SupersimV1NetworkAccessProfile, error) {
	if params == nil {
		params = &ListNetworkAccessProfileParams{}
	}
	params.SetPageSize(client.ReadLimits(params.PageSize, params.Limit))
	response, err := c.PageNetworkAccessProfile(params, "", "")
	if err != nil {
		return nil, err
	}
	curRecord := 0
	var records []SupersimV1NetworkAccessProfile
	for response != nil {
		records = append(records, response.NetworkAccessProfiles...)
		var record interface{}
		if record, err = client.GetNext(c.baseURL, response, &curRecord, params.Limit, c.getNextListNetworkAccessProfileResponse); record == nil || err != nil {
			return records, err
		}
		response = record.(*ListNetworkAccessProfileResponse)
	}
	return records, err
}
Lists NetworkAccessProfile records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.
package openapi
import (
	"encoding/json"
	"fmt"
	"net/url"
	"strings"
	"github.com/twilio/twilio-go/client"
)
type CreateNetworkAccessProfileParams struct {
	Networks *[]string `json:"Networks,omitempty"`
	UniqueName *string `json:"UniqueName,omitempty"`
}
func (params *CreateNetworkAccessProfileParams) SetNetworks(Networks []string) *CreateNetworkAccessProfileParams {
	params.Networks = &Networks
	return params
}
func (params *CreateNetworkAccessProfileParams) SetUniqueName(UniqueName string) *CreateNetworkAccessProfileParams {
	params.UniqueName = &UniqueName
	return params
}
func (c *ApiService) CreateNetworkAccessProfile(params *CreateNetworkAccessProfileParams) (*SupersimV1NetworkAccessProfile, error) {
	path := "/v1/NetworkAccessProfiles"
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.Networks != nil {
		for _, item := range *params.Networks {
			data.Add("Networks", item)
		}
	}
	if params != nil && params.UniqueName != nil {
		data.Set("UniqueName", *params.UniqueName)
	}
	resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &SupersimV1NetworkAccessProfile{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
func (c *ApiService) FetchNetworkAccessProfile(Sid string) (*SupersimV1NetworkAccessProfile, error) {
	path := "/v1/NetworkAccessProfiles/{Sid}"
	path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	resp, err := c.requestHandler.Get(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &SupersimV1NetworkAccessProfile{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
type ListNetworkAccessProfileParams struct {
	PageSize *int `json:"PageSize,omitempty"`
	Limit *int `json:"limit,omitempty"`
}
func (params *ListNetworkAccessProfileParams) SetPageSize(PageSize int) *ListNetworkAccessProfileParams {
	params.PageSize = &PageSize
	return params
}
func (params *ListNetworkAccessProfileParams) SetLimit(Limit int) *ListNetworkAccessProfileParams {
	params.Limit = &Limit
	return params
}
func (c *ApiService) PageNetworkAccessProfile(params *ListNetworkAccessProfileParams, pageToken, pageNumber string) (*ListNetworkAccessProfileResponse, error) {
	path := "/v1/NetworkAccessProfiles"
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.PageSize != nil {
		data.Set("PageSize", fmt.Sprint(*params.PageSize))
	}
	if pageToken != "" {
		data.Set("PageToken", pageToken)
	}
	if pageNumber != "" {
		data.Set("Page", pageNumber)
	}
	resp, err := c.requestHandler.Get(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &ListNetworkAccessProfileResponse{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}