func (c *ApiService) ListExecution(FlowSid string, params *ListExecutionParams) ([]StudioV2Execution, error) {
	if params == nil {
		params = &ListExecutionParams{}
	}
	params.SetPageSize(client.ReadLimits(params.PageSize, params.Limit))
	response, err := c.PageExecution(FlowSid, params, "", "")
	if err != nil {
		return nil, err
	}
	curRecord := 0
	var records []StudioV2Execution
	for response != nil {
		records = append(records, response.Executions...)
		var record interface{}
		if record, err = client.GetNext(c.baseURL, response, &curRecord, params.Limit, c.getNextListExecutionResponse); record == nil || err != nil {
			return records, err
		}
		response = record.(*ListExecutionResponse)
	}
	return records, err
}
Lists Execution 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"
	"time"
	"github.com/twilio/twilio-go/client"
)
type CreateExecutionParams struct {
	From *string `json:"From,omitempty"`
	Parameters *map[string]interface{} `json:"Parameters,omitempty"`
	To *string `json:"To,omitempty"`
}
func (params *CreateExecutionParams) SetFrom(From string) *CreateExecutionParams {
	params.From = &From
	return params
}
func (params *CreateExecutionParams) SetParameters(Parameters map[string]interface{}) *CreateExecutionParams {
	params.Parameters = &Parameters
	return params
}
func (params *CreateExecutionParams) SetTo(To string) *CreateExecutionParams {
	params.To = &To
	return params
}
func (c *ApiService) CreateExecution(FlowSid string, params *CreateExecutionParams) (*StudioV2Execution, error) {
	path := "/v2/Flows/{FlowSid}/Executions"
	path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.From != nil {
		data.Set("From", *params.From)
	}
	if params != nil && params.Parameters != nil {
		v, err := json.Marshal(params.Parameters)
		if err != nil {
			return nil, err
		}
		data.Set("Parameters", string(v))
	}
	if params != nil && params.To != nil {
		data.Set("To", *params.To)
	}
	resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	ps := &StudioV2Execution{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
func (c *ApiService) DeleteExecution(FlowSid string, Sid string) error {
	path := "/v2/Flows/{FlowSid}/Executions/{Sid}"
	path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -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) FetchExecution(FlowSid string, Sid string) (*StudioV2Execution, error) {
	path := "/v2/Flows/{FlowSid}/Executions/{Sid}"
	path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -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 := &StudioV2Execution{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
type ListExecutionParams struct {
	DateCreatedFrom *time.Time `json:"DateCreatedFrom,omitempty"`
	DateCreatedTo *time.Time `json:"DateCreatedTo,omitempty"`
	PageSize *int `json:"PageSize,omitempty"`
	Limit *int `json:"limit,omitempty"`
}
func (params *ListExecutionParams) SetDateCreatedFrom(DateCreatedFrom time.Time) *ListExecutionParams {
	params.DateCreatedFrom = &DateCreatedFrom
	return params
}
func (params *ListExecutionParams) SetDateCreatedTo(DateCreatedTo time.Time) *ListExecutionParams {
	params.DateCreatedTo = &DateCreatedTo
	return params
}
func (params *ListExecutionParams) SetPageSize(PageSize int) *ListExecutionParams {
	params.PageSize = &PageSize
	return params
}
func (params *ListExecutionParams) SetLimit(Limit int) *ListExecutionParams {
	params.Limit = &Limit
	return params
}
func (c *ApiService) PageExecution(FlowSid string, params *ListExecutionParams, pageToken, pageNumber string) (*ListExecutionResponse, error) {
	path := "/v2/Flows/{FlowSid}/Executions"
	path = strings.Replace(path, "{"+"FlowSid"+"}", FlowSid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.DateCreatedFrom != nil {
		data.Set("DateCreatedFrom", fmt.Sprint((*params.DateCreatedFrom).Format(time.RFC3339)))
	}
	if params != nil && params.DateCreatedTo != nil {
		data.Set("DateCreatedTo", fmt.Sprint((*params.DateCreatedTo).Format(time.RFC3339)))
	}
	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 := &ListExecutionResponse{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}