func (c *ApiService) PageEnvironment(ServiceSid string, params *ListEnvironmentParams, pageToken, pageNumber string) (*ListEnvironmentResponse, error) {
	path := "/v1/Services/{ServiceSid}/Environments"
	path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1)
	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 := &ListEnvironmentResponse{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
Retrieve a single page of Environment records from the API. Request is executed immediately.
package openapi
import (
	"encoding/json"
	"fmt"
	"net/url"
	"strings"
	"github.com/twilio/twilio-go/client"
)
type CreateEnvironmentParams struct {
	DomainSuffix *string `json:"DomainSuffix,omitempty"`
	UniqueName *string `json:"UniqueName,omitempty"`
}
func (params *CreateEnvironmentParams) SetDomainSuffix(DomainSuffix string) *CreateEnvironmentParams {
	params.DomainSuffix = &DomainSuffix
	return params
}
func (params *CreateEnvironmentParams) SetUniqueName(UniqueName string) *CreateEnvironmentParams {
	params.UniqueName = &UniqueName
	return params
}
func (c *ApiService) CreateEnvironment(ServiceSid string, params *CreateEnvironmentParams) (*ServerlessV1Environment, error) {
	path := "/v1/Services/{ServiceSid}/Environments"
	path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.DomainSuffix != nil {
		data.Set("DomainSuffix", *params.DomainSuffix)
	}
	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 := &ServerlessV1Environment{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
func (c *ApiService) DeleteEnvironment(ServiceSid string, Sid string) error {
	path := "/v1/Services/{ServiceSid}/Environments/{Sid}"
	path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1)
	path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers)
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	return nil
}
func (c *ApiService) FetchEnvironment(ServiceSid string, Sid string) (*ServerlessV1Environment, error) {
	path := "/v1/Services/{ServiceSid}/Environments/{Sid}"
	path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1)
	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 := &ServerlessV1Environment{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
type ListEnvironmentParams struct {
	PageSize *int `json:"PageSize,omitempty"`
	Limit *int `json:"limit,omitempty"`
}
func (params *ListEnvironmentParams) SetPageSize(PageSize int) *ListEnvironmentParams {
	params.PageSize = &PageSize
	return params
}
func (params *ListEnvironmentParams) SetLimit(Limit int) *ListEnvironmentParams {
	params.Limit = &Limit
	return params
}