func (c *ApiService) UpdateSink(Sid string, params *UpdateSinkParams) (*EventsV1Sink, error) {
	path := "/v1/Sinks/{Sid}"
	path = strings.Replace(path, "{"+"Sid"+"}", Sid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.Description != nil {
		data.Set("Description", *params.Description)
	}
	resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &EventsV1Sink{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
Update a specific Sink
package openapi
import (
	"encoding/json"
	"fmt"
	"net/url"
	"strings"
	"github.com/twilio/twilio-go/client"
)
type CreateSinkParams struct {
	Description *string `json:"Description,omitempty"`
	SinkConfiguration *map[string]interface{} `json:"SinkConfiguration,omitempty"`
	SinkType *string `json:"SinkType,omitempty"`
}
func (params *CreateSinkParams) SetDescription(Description string) *CreateSinkParams {
	params.Description = &Description
	return params
}
func (params *CreateSinkParams) SetSinkConfiguration(SinkConfiguration map[string]interface{}) *CreateSinkParams {
	params.SinkConfiguration = &SinkConfiguration
	return params
}
func (params *CreateSinkParams) SetSinkType(SinkType string) *CreateSinkParams {
	params.SinkType = &SinkType
	return params
}
func (c *ApiService) CreateSink(params *CreateSinkParams) (*EventsV1Sink, error) {
	path := "/v1/Sinks"
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.Description != nil {
		data.Set("Description", *params.Description)
	}
	if params != nil && params.SinkConfiguration != nil {
		v, err := json.Marshal(params.SinkConfiguration)
		if err != nil {
			return nil, err
		}
		data.Set("SinkConfiguration", string(v))
	}
	if params != nil && params.SinkType != nil {
		data.Set("SinkType", *params.SinkType)
	}
	resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &EventsV1Sink{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
func (c *ApiService) DeleteSink(Sid string) error {
	path := "/v1/Sinks/{Sid}"
	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) FetchSink(Sid string) (*EventsV1Sink, error) {
	path := "/v1/Sinks/{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 := &EventsV1Sink{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
type ListSinkParams struct {
	InUse *bool `json:"InUse,omitempty"`
	Status *string `json:"Status,omitempty"`
	PageSize *int `json:"PageSize,omitempty"`
	Limit *int `json:"limit,omitempty"`
}
func (params *ListSinkParams) SetInUse(InUse bool) *ListSinkParams {
	params.InUse = &InUse
	return params
}
func (params *ListSinkParams) SetStatus(Status string) *ListSinkParams {
	params.Status = &Status
	return params
}
func (params *ListSinkParams) SetPageSize(PageSize int) *ListSinkParams {
	params.PageSize = &PageSize
	return params
}
func (params *ListSinkParams) SetLimit(Limit int) *ListSinkParams {
	params.Limit = &Limit
	return params
}
func (c *ApiService) PageSink(params *ListSinkParams, pageToken, pageNumber string) (*ListSinkResponse, error) {
	path := "/v1/Sinks"
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.InUse != nil {
		data.Set("InUse", fmt.Sprint(*params.InUse))
	}
	if params != nil && params.Status != nil {
		data.Set("Status", *params.Status)
	}
	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 := &ListSinkResponse{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
func (c *ApiService) ListSink(params *ListSinkParams) ([]EventsV1Sink, error) {
	if params == nil {
		params = &ListSinkParams{}
	}
	params.SetPageSize(client.ReadLimits(params.PageSize, params.Limit))
	response, err := c.PageSink(params, "", "")
	if err != nil {
		return nil, err
	}
	curRecord := 0
	var records []EventsV1Sink
	for response != nil {
		records = append(records, response.Sinks...)
		var record interface{}
		if record, err = client.GetNext(c.baseURL, response, &curRecord, params.Limit, c.getNextListSinkResponse); record == nil || err != nil {
			return records, err
		}
		response = record.(*ListSinkResponse)
	}
	return records, err
}
func (c *ApiService) StreamSink(params *ListSinkParams) (chan EventsV1Sink, error) {
	if params == nil {
		params = &ListSinkParams{}
	}
	params.SetPageSize(client.ReadLimits(params.PageSize, params.Limit))
	response, err := c.PageSink(params, "", "")
	if err != nil {
		return nil, err
	}
	curRecord := 0
	channel := make(chan EventsV1Sink, 1)
	go func() {
		for response != nil {
			for item := range response.Sinks {
				channel <- response.Sinks[item]
			}
			var record interface{}
			if record, err = client.GetNext(c.baseURL, response, &curRecord, params.Limit, c.getNextListSinkResponse); record == nil || err != nil {
				close(channel)
				return
			}
			response = record.(*ListSinkResponse)
		}
		close(channel)
	}()
	return channel, err
}
func (c *ApiService) getNextListSinkResponse(nextPageUrl string) (interface{}, error) {
	if nextPageUrl == "" {
		return nil, nil
	}
	resp, err := c.requestHandler.Get(nextPageUrl, nil, nil)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &ListSinkResponse{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, nil
}
type UpdateSinkParams struct {
	Description *string `json:"Description,omitempty"`
}
func (params *UpdateSinkParams) SetDescription(Description string) *UpdateSinkParams {
	params.Description = &Description
	return params
}