func (c *ApiService) CreateSession(ServiceSid string, params *CreateSessionParams) (*ProxyV1Session, error) {
	path := "/v1/Services/{ServiceSid}/Sessions"
	path = strings.Replace(path, "{"+"ServiceSid"+"}", ServiceSid, -1)
	data := url.Values{}
	headers := make(map[string]interface{})
	if params != nil && params.DateExpiry != nil {
		data.Set("DateExpiry", fmt.Sprint((*params.DateExpiry).Format(time.RFC3339)))
	}
	if params != nil && params.FailOnParticipantConflict != nil {
		data.Set("FailOnParticipantConflict", fmt.Sprint(*params.FailOnParticipantConflict))
	}
	if params != nil && params.Mode != nil {
		data.Set("Mode", *params.Mode)
	}
	if params != nil && params.Participants != nil {
		for _, item := range *params.Participants {
			v, err := json.Marshal(item)
			if err != nil {
				return nil, err
			}
			data.Add("Participants", string(v))
		}
	}
	if params != nil && params.Status != nil {
		data.Set("Status", *params.Status)
	}
	if params != nil && params.Ttl != nil {
		data.Set("Ttl", fmt.Sprint(*params.Ttl))
	}
	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 := &ProxyV1Session{}
	if err := json.NewDecoder(resp.Body).Decode(ps); err != nil {
		return nil, err
	}
	return ps, err
}
Create a new Session
package openapi
import (
	"encoding/json"
	"fmt"
	"net/url"
	"strings"
	"time"
	"github.com/twilio/twilio-go/client"
)
type CreateSessionParams struct {
	DateExpiry *time.Time `json:"DateExpiry,omitempty"`
	FailOnParticipantConflict *bool `json:"FailOnParticipantConflict,omitempty"`
	Mode *string `json:"Mode,omitempty"`
	Participants *[]map[string]interface{} `json:"Participants,omitempty"`
	Status *string `json:"Status,omitempty"`
	Ttl *int `json:"Ttl,omitempty"`
	UniqueName *string `json:"UniqueName,omitempty"`
}
func (params *CreateSessionParams) SetDateExpiry(DateExpiry time.Time) *CreateSessionParams {
	params.DateExpiry = &DateExpiry
	return params
}
func (params *CreateSessionParams) SetFailOnParticipantConflict(FailOnParticipantConflict bool) *CreateSessionParams {
	params.FailOnParticipantConflict = &FailOnParticipantConflict
	return params
}
func (params *CreateSessionParams) SetMode(Mode string) *CreateSessionParams {
	params.Mode = &Mode
	return params
}
func (params *CreateSessionParams) SetParticipants(Participants []map[string]interface{}) *CreateSessionParams {
	params.Participants = &Participants
	return params
}
func (params *CreateSessionParams) SetStatus(Status string) *CreateSessionParams {
	params.Status = &Status
	return params
}
func (params *CreateSessionParams) SetTtl(Ttl int) *CreateSessionParams {
	params.Ttl = &Ttl
	return params
}
func (params *CreateSessionParams) SetUniqueName(UniqueName string) *CreateSessionParams {
	params.UniqueName = &UniqueName
	return params
}