// Code generated by Fern. DO NOT EDIT.

package management

import (
	json "encoding/json"
	fmt "fmt"
	internal "github.com/auth0/go-auth0/v2/management/internal"
	big "math/big"
	time "time"
)

var (
	createFlowResponseContentFieldID         = big.NewInt(1 << 0)
	createFlowResponseContentFieldName       = big.NewInt(1 << 1)
	createFlowResponseContentFieldActions    = big.NewInt(1 << 2)
	createFlowResponseContentFieldCreatedAt  = big.NewInt(1 << 3)
	createFlowResponseContentFieldUpdatedAt  = big.NewInt(1 << 4)
	createFlowResponseContentFieldExecutedAt = big.NewInt(1 << 5)
)

type CreateFlowResponseContent struct {
	ID         string        `json:"id" url:"id"`
	Name       string        `json:"name" url:"name"`
	Actions    []*FlowAction `json:"actions,omitempty" url:"actions,omitempty"`
	CreatedAt  time.Time     `json:"created_at" url:"created_at"`
	UpdatedAt  time.Time     `json:"updated_at" url:"updated_at"`
	ExecutedAt *string       `json:"executed_at,omitempty" url:"executed_at,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (c *CreateFlowResponseContent) GetID() string {
	if c == nil {
		return ""
	}
	return c.ID
}

func (c *CreateFlowResponseContent) GetName() string {
	if c == nil {
		return ""
	}
	return c.Name
}

func (c *CreateFlowResponseContent) GetActions() []*FlowAction {
	if c == nil || c.Actions == nil {
		return nil
	}
	return c.Actions
}

func (c *CreateFlowResponseContent) GetCreatedAt() time.Time {
	if c == nil {
		return time.Time{}
	}
	return c.CreatedAt
}

func (c *CreateFlowResponseContent) GetUpdatedAt() time.Time {
	if c == nil {
		return time.Time{}
	}
	return c.UpdatedAt
}

func (c *CreateFlowResponseContent) GetExecutedAt() string {
	if c == nil || c.ExecutedAt == nil {
		return ""
	}
	return *c.ExecutedAt
}

func (c *CreateFlowResponseContent) GetExtraProperties() map[string]interface{} {
	return c.extraProperties
}

func (c *CreateFlowResponseContent) require(field *big.Int) {
	if c.explicitFields == nil {
		c.explicitFields = big.NewInt(0)
	}
	c.explicitFields.Or(c.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateFlowResponseContent) SetID(id string) {
	c.ID = id
	c.require(createFlowResponseContentFieldID)
}

// SetName sets the Name field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateFlowResponseContent) SetName(name string) {
	c.Name = name
	c.require(createFlowResponseContentFieldName)
}

// SetActions sets the Actions field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateFlowResponseContent) SetActions(actions []*FlowAction) {
	c.Actions = actions
	c.require(createFlowResponseContentFieldActions)
}

// SetCreatedAt sets the CreatedAt field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateFlowResponseContent) SetCreatedAt(createdAt time.Time) {
	c.CreatedAt = createdAt
	c.require(createFlowResponseContentFieldCreatedAt)
}

// SetUpdatedAt sets the UpdatedAt field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateFlowResponseContent) SetUpdatedAt(updatedAt time.Time) {
	c.UpdatedAt = updatedAt
	c.require(createFlowResponseContentFieldUpdatedAt)
}

// SetExecutedAt sets the ExecutedAt field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateFlowResponseContent) SetExecutedAt(executedAt *string) {
	c.ExecutedAt = executedAt
	c.require(createFlowResponseContentFieldExecutedAt)
}

func (c *CreateFlowResponseContent) UnmarshalJSON(data []byte) error {
	type embed CreateFlowResponseContent
	var unmarshaler = struct {
		embed
		CreatedAt *internal.DateTime `json:"created_at"`
		UpdatedAt *internal.DateTime `json:"updated_at"`
	}{
		embed: embed(*c),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*c = CreateFlowResponseContent(unmarshaler.embed)
	c.CreatedAt = unmarshaler.CreatedAt.Time()
	c.UpdatedAt = unmarshaler.UpdatedAt.Time()
	extraProperties, err := internal.ExtractExtraProperties(data, *c)
	if err != nil {
		return err
	}
	c.extraProperties = extraProperties
	c.rawJSON = json.RawMessage(data)
	return nil
}

func (c *CreateFlowResponseContent) MarshalJSON() ([]byte, error) {
	type embed CreateFlowResponseContent
	var marshaler = struct {
		embed
		CreatedAt *internal.DateTime `json:"created_at"`
		UpdatedAt *internal.DateTime `json:"updated_at"`
	}{
		embed:     embed(*c),
		CreatedAt: internal.NewDateTime(c.CreatedAt),
		UpdatedAt: internal.NewDateTime(c.UpdatedAt),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (c *CreateFlowResponseContent) String() string {
	if len(c.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(c.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(c); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", c)
}

type FlowAction struct {
	FlowActionActivecampaign *FlowActionActivecampaign
	FlowActionAirtable       *FlowActionAirtable
	FlowActionAuth0          *FlowActionAuth0
	FlowActionBigquery       FlowActionBigquery
	FlowActionClearbit       *FlowActionClearbit
	FlowActionEmail          FlowActionEmail
	FlowActionFlow           *FlowActionFlow
	FlowActionGoogleSheets   FlowActionGoogleSheets
	FlowActionHTTP           FlowActionHTTP
	FlowActionHubspot        *FlowActionHubspot
	FlowActionJSON           *FlowActionJSON
	FlowActionJwt            *FlowActionJwt
	FlowActionMailchimp      FlowActionMailchimp
	FlowActionMailjet        FlowActionMailjet
	FlowActionOtp            *FlowActionOtp
	FlowActionPipedrive      *FlowActionPipedrive
	FlowActionSalesforce     *FlowActionSalesforce
	FlowActionSendgrid       FlowActionSendgrid
	FlowActionSlack          FlowActionSlack
	FlowActionStripe         *FlowActionStripe
	FlowActionTelegram       FlowActionTelegram
	FlowActionTwilio         *FlowActionTwilio
	FlowActionWhatsapp       FlowActionWhatsapp
	FlowActionXML            *FlowActionXML
	FlowActionZapier         FlowActionZapier

	typ string
}

func (f *FlowAction) GetFlowActionActivecampaign() *FlowActionActivecampaign {
	if f == nil {
		return nil
	}
	return f.FlowActionActivecampaign
}

func (f *FlowAction) GetFlowActionAirtable() *FlowActionAirtable {
	if f == nil {
		return nil
	}
	return f.FlowActionAirtable
}

func (f *FlowAction) GetFlowActionAuth0() *FlowActionAuth0 {
	if f == nil {
		return nil
	}
	return f.FlowActionAuth0
}

func (f *FlowAction) GetFlowActionBigquery() FlowActionBigquery {
	if f == nil {
		return nil
	}
	return f.FlowActionBigquery
}

func (f *FlowAction) GetFlowActionClearbit() *FlowActionClearbit {
	if f == nil {
		return nil
	}
	return f.FlowActionClearbit
}

func (f *FlowAction) GetFlowActionEmail() FlowActionEmail {
	if f == nil {
		return nil
	}
	return f.FlowActionEmail
}

func (f *FlowAction) GetFlowActionFlow() *FlowActionFlow {
	if f == nil {
		return nil
	}
	return f.FlowActionFlow
}

func (f *FlowAction) GetFlowActionGoogleSheets() FlowActionGoogleSheets {
	if f == nil {
		return nil
	}
	return f.FlowActionGoogleSheets
}

func (f *FlowAction) GetFlowActionHTTP() FlowActionHTTP {
	if f == nil {
		return nil
	}
	return f.FlowActionHTTP
}

func (f *FlowAction) GetFlowActionHubspot() *FlowActionHubspot {
	if f == nil {
		return nil
	}
	return f.FlowActionHubspot
}

func (f *FlowAction) GetFlowActionJSON() *FlowActionJSON {
	if f == nil {
		return nil
	}
	return f.FlowActionJSON
}

func (f *FlowAction) GetFlowActionJwt() *FlowActionJwt {
	if f == nil {
		return nil
	}
	return f.FlowActionJwt
}

func (f *FlowAction) GetFlowActionMailchimp() FlowActionMailchimp {
	if f == nil {
		return nil
	}
	return f.FlowActionMailchimp
}

func (f *FlowAction) GetFlowActionMailjet() FlowActionMailjet {
	if f == nil {
		return nil
	}
	return f.FlowActionMailjet
}

func (f *FlowAction) GetFlowActionOtp() *FlowActionOtp {
	if f == nil {
		return nil
	}
	return f.FlowActionOtp
}

func (f *FlowAction) GetFlowActionPipedrive() *FlowActionPipedrive {
	if f == nil {
		return nil
	}
	return f.FlowActionPipedrive
}

func (f *FlowAction) GetFlowActionSalesforce() *FlowActionSalesforce {
	if f == nil {
		return nil
	}
	return f.FlowActionSalesforce
}

func (f *FlowAction) GetFlowActionSendgrid() FlowActionSendgrid {
	if f == nil {
		return nil
	}
	return f.FlowActionSendgrid
}

func (f *FlowAction) GetFlowActionSlack() FlowActionSlack {
	if f == nil {
		return nil
	}
	return f.FlowActionSlack
}

func (f *FlowAction) GetFlowActionStripe() *FlowActionStripe {
	if f == nil {
		return nil
	}
	return f.FlowActionStripe
}

func (f *FlowAction) GetFlowActionTelegram() FlowActionTelegram {
	if f == nil {
		return nil
	}
	return f.FlowActionTelegram
}

func (f *FlowAction) GetFlowActionTwilio() *FlowActionTwilio {
	if f == nil {
		return nil
	}
	return f.FlowActionTwilio
}

func (f *FlowAction) GetFlowActionWhatsapp() FlowActionWhatsapp {
	if f == nil {
		return nil
	}
	return f.FlowActionWhatsapp
}

func (f *FlowAction) GetFlowActionXML() *FlowActionXML {
	if f == nil {
		return nil
	}
	return f.FlowActionXML
}

func (f *FlowAction) GetFlowActionZapier() FlowActionZapier {
	if f == nil {
		return nil
	}
	return f.FlowActionZapier
}

func (f *FlowAction) UnmarshalJSON(data []byte) error {
	valueFlowActionActivecampaign := new(FlowActionActivecampaign)
	if err := json.Unmarshal(data, &valueFlowActionActivecampaign); err == nil {
		f.typ = "FlowActionActivecampaign"
		f.FlowActionActivecampaign = valueFlowActionActivecampaign
		return nil
	}
	valueFlowActionAirtable := new(FlowActionAirtable)
	if err := json.Unmarshal(data, &valueFlowActionAirtable); err == nil {
		f.typ = "FlowActionAirtable"
		f.FlowActionAirtable = valueFlowActionAirtable
		return nil
	}
	valueFlowActionAuth0 := new(FlowActionAuth0)
	if err := json.Unmarshal(data, &valueFlowActionAuth0); err == nil {
		f.typ = "FlowActionAuth0"
		f.FlowActionAuth0 = valueFlowActionAuth0
		return nil
	}
	var valueFlowActionBigquery FlowActionBigquery
	if err := json.Unmarshal(data, &valueFlowActionBigquery); err == nil {
		f.typ = "FlowActionBigquery"
		f.FlowActionBigquery = valueFlowActionBigquery
		return nil
	}
	valueFlowActionClearbit := new(FlowActionClearbit)
	if err := json.Unmarshal(data, &valueFlowActionClearbit); err == nil {
		f.typ = "FlowActionClearbit"
		f.FlowActionClearbit = valueFlowActionClearbit
		return nil
	}
	var valueFlowActionEmail FlowActionEmail
	if err := json.Unmarshal(data, &valueFlowActionEmail); err == nil {
		f.typ = "FlowActionEmail"
		f.FlowActionEmail = valueFlowActionEmail
		return nil
	}
	valueFlowActionFlow := new(FlowActionFlow)
	if err := json.Unmarshal(data, &valueFlowActionFlow); err == nil {
		f.typ = "FlowActionFlow"
		f.FlowActionFlow = valueFlowActionFlow
		return nil
	}
	var valueFlowActionGoogleSheets FlowActionGoogleSheets
	if err := json.Unmarshal(data, &valueFlowActionGoogleSheets); err == nil {
		f.typ = "FlowActionGoogleSheets"
		f.FlowActionGoogleSheets = valueFlowActionGoogleSheets
		return nil
	}
	var valueFlowActionHTTP FlowActionHTTP
	if err := json.Unmarshal(data, &valueFlowActionHTTP); err == nil {
		f.typ = "FlowActionHTTP"
		f.FlowActionHTTP = valueFlowActionHTTP
		return nil
	}
	valueFlowActionHubspot := new(FlowActionHubspot)
	if err := json.Unmarshal(data, &valueFlowActionHubspot); err == nil {
		f.typ = "FlowActionHubspot"
		f.FlowActionHubspot = valueFlowActionHubspot
		return nil
	}
	valueFlowActionJSON := new(FlowActionJSON)
	if err := json.Unmarshal(data, &valueFlowActionJSON); err == nil {
		f.typ = "FlowActionJSON"
		f.FlowActionJSON = valueFlowActionJSON
		return nil
	}
	valueFlowActionJwt := new(FlowActionJwt)
	if err := json.Unmarshal(data, &valueFlowActionJwt); err == nil {
		f.typ = "FlowActionJwt"
		f.FlowActionJwt = valueFlowActionJwt
		return nil
	}
	var valueFlowActionMailchimp FlowActionMailchimp
	if err := json.Unmarshal(data, &valueFlowActionMailchimp); err == nil {
		f.typ = "FlowActionMailchimp"
		f.FlowActionMailchimp = valueFlowActionMailchimp
		return nil
	}
	var valueFlowActionMailjet FlowActionMailjet
	if err := json.Unmarshal(data, &valueFlowActionMailjet); err == nil {
		f.typ = "FlowActionMailjet"
		f.FlowActionMailjet = valueFlowActionMailjet
		return nil
	}
	valueFlowActionOtp := new(FlowActionOtp)
	if err := json.Unmarshal(data, &valueFlowActionOtp); err == nil {
		f.typ = "FlowActionOtp"
		f.FlowActionOtp = valueFlowActionOtp
		return nil
	}
	valueFlowActionPipedrive := new(FlowActionPipedrive)
	if err := json.Unmarshal(data, &valueFlowActionPipedrive); err == nil {
		f.typ = "FlowActionPipedrive"
		f.FlowActionPipedrive = valueFlowActionPipedrive
		return nil
	}
	valueFlowActionSalesforce := new(FlowActionSalesforce)
	if err := json.Unmarshal(data, &valueFlowActionSalesforce); err == nil {
		f.typ = "FlowActionSalesforce"
		f.FlowActionSalesforce = valueFlowActionSalesforce
		return nil
	}
	var valueFlowActionSendgrid FlowActionSendgrid
	if err := json.Unmarshal(data, &valueFlowActionSendgrid); err == nil {
		f.typ = "FlowActionSendgrid"
		f.FlowActionSendgrid = valueFlowActionSendgrid
		return nil
	}
	var valueFlowActionSlack FlowActionSlack
	if err := json.Unmarshal(data, &valueFlowActionSlack); err == nil {
		f.typ = "FlowActionSlack"
		f.FlowActionSlack = valueFlowActionSlack
		return nil
	}
	valueFlowActionStripe := new(FlowActionStripe)
	if err := json.Unmarshal(data, &valueFlowActionStripe); err == nil {
		f.typ = "FlowActionStripe"
		f.FlowActionStripe = valueFlowActionStripe
		return nil
	}
	var valueFlowActionTelegram FlowActionTelegram
	if err := json.Unmarshal(data, &valueFlowActionTelegram); err == nil {
		f.typ = "FlowActionTelegram"
		f.FlowActionTelegram = valueFlowActionTelegram
		return nil
	}
	valueFlowActionTwilio := new(FlowActionTwilio)
	if err := json.Unmarshal(data, &valueFlowActionTwilio); err == nil {
		f.typ = "FlowActionTwilio"
		f.FlowActionTwilio = valueFlowActionTwilio
		return nil
	}
	var valueFlowActionWhatsapp FlowActionWhatsapp
	if err := json.Unmarshal(data, &valueFlowActionWhatsapp); err == nil {
		f.typ = "FlowActionWhatsapp"
		f.FlowActionWhatsapp = valueFlowActionWhatsapp
		return nil
	}
	valueFlowActionXML := new(FlowActionXML)
	if err := json.Unmarshal(data, &valueFlowActionXML); err == nil {
		f.typ = "FlowActionXML"
		f.FlowActionXML = valueFlowActionXML
		return nil
	}
	var valueFlowActionZapier FlowActionZapier
	if err := json.Unmarshal(data, &valueFlowActionZapier); err == nil {
		f.typ = "FlowActionZapier"
		f.FlowActionZapier = valueFlowActionZapier
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowAction) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionActivecampaign" || f.FlowActionActivecampaign != nil {
		return json.Marshal(f.FlowActionActivecampaign)
	}
	if f.typ == "FlowActionAirtable" || f.FlowActionAirtable != nil {
		return json.Marshal(f.FlowActionAirtable)
	}
	if f.typ == "FlowActionAuth0" || f.FlowActionAuth0 != nil {
		return json.Marshal(f.FlowActionAuth0)
	}
	if f.typ == "FlowActionBigquery" || f.FlowActionBigquery != nil {
		return json.Marshal(f.FlowActionBigquery)
	}
	if f.typ == "FlowActionClearbit" || f.FlowActionClearbit != nil {
		return json.Marshal(f.FlowActionClearbit)
	}
	if f.typ == "FlowActionEmail" || f.FlowActionEmail != nil {
		return json.Marshal(f.FlowActionEmail)
	}
	if f.typ == "FlowActionFlow" || f.FlowActionFlow != nil {
		return json.Marshal(f.FlowActionFlow)
	}
	if f.typ == "FlowActionGoogleSheets" || f.FlowActionGoogleSheets != nil {
		return json.Marshal(f.FlowActionGoogleSheets)
	}
	if f.typ == "FlowActionHTTP" || f.FlowActionHTTP != nil {
		return json.Marshal(f.FlowActionHTTP)
	}
	if f.typ == "FlowActionHubspot" || f.FlowActionHubspot != nil {
		return json.Marshal(f.FlowActionHubspot)
	}
	if f.typ == "FlowActionJSON" || f.FlowActionJSON != nil {
		return json.Marshal(f.FlowActionJSON)
	}
	if f.typ == "FlowActionJwt" || f.FlowActionJwt != nil {
		return json.Marshal(f.FlowActionJwt)
	}
	if f.typ == "FlowActionMailchimp" || f.FlowActionMailchimp != nil {
		return json.Marshal(f.FlowActionMailchimp)
	}
	if f.typ == "FlowActionMailjet" || f.FlowActionMailjet != nil {
		return json.Marshal(f.FlowActionMailjet)
	}
	if f.typ == "FlowActionOtp" || f.FlowActionOtp != nil {
		return json.Marshal(f.FlowActionOtp)
	}
	if f.typ == "FlowActionPipedrive" || f.FlowActionPipedrive != nil {
		return json.Marshal(f.FlowActionPipedrive)
	}
	if f.typ == "FlowActionSalesforce" || f.FlowActionSalesforce != nil {
		return json.Marshal(f.FlowActionSalesforce)
	}
	if f.typ == "FlowActionSendgrid" || f.FlowActionSendgrid != nil {
		return json.Marshal(f.FlowActionSendgrid)
	}
	if f.typ == "FlowActionSlack" || f.FlowActionSlack != nil {
		return json.Marshal(f.FlowActionSlack)
	}
	if f.typ == "FlowActionStripe" || f.FlowActionStripe != nil {
		return json.Marshal(f.FlowActionStripe)
	}
	if f.typ == "FlowActionTelegram" || f.FlowActionTelegram != nil {
		return json.Marshal(f.FlowActionTelegram)
	}
	if f.typ == "FlowActionTwilio" || f.FlowActionTwilio != nil {
		return json.Marshal(f.FlowActionTwilio)
	}
	if f.typ == "FlowActionWhatsapp" || f.FlowActionWhatsapp != nil {
		return json.Marshal(f.FlowActionWhatsapp)
	}
	if f.typ == "FlowActionXML" || f.FlowActionXML != nil {
		return json.Marshal(f.FlowActionXML)
	}
	if f.typ == "FlowActionZapier" || f.FlowActionZapier != nil {
		return json.Marshal(f.FlowActionZapier)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionVisitor interface {
	VisitFlowActionActivecampaign(*FlowActionActivecampaign) error
	VisitFlowActionAirtable(*FlowActionAirtable) error
	VisitFlowActionAuth0(*FlowActionAuth0) error
	VisitFlowActionBigquery(FlowActionBigquery) error
	VisitFlowActionClearbit(*FlowActionClearbit) error
	VisitFlowActionEmail(FlowActionEmail) error
	VisitFlowActionFlow(*FlowActionFlow) error
	VisitFlowActionGoogleSheets(FlowActionGoogleSheets) error
	VisitFlowActionHTTP(FlowActionHTTP) error
	VisitFlowActionHubspot(*FlowActionHubspot) error
	VisitFlowActionJSON(*FlowActionJSON) error
	VisitFlowActionJwt(*FlowActionJwt) error
	VisitFlowActionMailchimp(FlowActionMailchimp) error
	VisitFlowActionMailjet(FlowActionMailjet) error
	VisitFlowActionOtp(*FlowActionOtp) error
	VisitFlowActionPipedrive(*FlowActionPipedrive) error
	VisitFlowActionSalesforce(*FlowActionSalesforce) error
	VisitFlowActionSendgrid(FlowActionSendgrid) error
	VisitFlowActionSlack(FlowActionSlack) error
	VisitFlowActionStripe(*FlowActionStripe) error
	VisitFlowActionTelegram(FlowActionTelegram) error
	VisitFlowActionTwilio(*FlowActionTwilio) error
	VisitFlowActionWhatsapp(FlowActionWhatsapp) error
	VisitFlowActionXML(*FlowActionXML) error
	VisitFlowActionZapier(FlowActionZapier) error
}

func (f *FlowAction) Accept(visitor FlowActionVisitor) error {
	if f.typ == "FlowActionActivecampaign" || f.FlowActionActivecampaign != nil {
		return visitor.VisitFlowActionActivecampaign(f.FlowActionActivecampaign)
	}
	if f.typ == "FlowActionAirtable" || f.FlowActionAirtable != nil {
		return visitor.VisitFlowActionAirtable(f.FlowActionAirtable)
	}
	if f.typ == "FlowActionAuth0" || f.FlowActionAuth0 != nil {
		return visitor.VisitFlowActionAuth0(f.FlowActionAuth0)
	}
	if f.typ == "FlowActionBigquery" || f.FlowActionBigquery != nil {
		return visitor.VisitFlowActionBigquery(f.FlowActionBigquery)
	}
	if f.typ == "FlowActionClearbit" || f.FlowActionClearbit != nil {
		return visitor.VisitFlowActionClearbit(f.FlowActionClearbit)
	}
	if f.typ == "FlowActionEmail" || f.FlowActionEmail != nil {
		return visitor.VisitFlowActionEmail(f.FlowActionEmail)
	}
	if f.typ == "FlowActionFlow" || f.FlowActionFlow != nil {
		return visitor.VisitFlowActionFlow(f.FlowActionFlow)
	}
	if f.typ == "FlowActionGoogleSheets" || f.FlowActionGoogleSheets != nil {
		return visitor.VisitFlowActionGoogleSheets(f.FlowActionGoogleSheets)
	}
	if f.typ == "FlowActionHTTP" || f.FlowActionHTTP != nil {
		return visitor.VisitFlowActionHTTP(f.FlowActionHTTP)
	}
	if f.typ == "FlowActionHubspot" || f.FlowActionHubspot != nil {
		return visitor.VisitFlowActionHubspot(f.FlowActionHubspot)
	}
	if f.typ == "FlowActionJSON" || f.FlowActionJSON != nil {
		return visitor.VisitFlowActionJSON(f.FlowActionJSON)
	}
	if f.typ == "FlowActionJwt" || f.FlowActionJwt != nil {
		return visitor.VisitFlowActionJwt(f.FlowActionJwt)
	}
	if f.typ == "FlowActionMailchimp" || f.FlowActionMailchimp != nil {
		return visitor.VisitFlowActionMailchimp(f.FlowActionMailchimp)
	}
	if f.typ == "FlowActionMailjet" || f.FlowActionMailjet != nil {
		return visitor.VisitFlowActionMailjet(f.FlowActionMailjet)
	}
	if f.typ == "FlowActionOtp" || f.FlowActionOtp != nil {
		return visitor.VisitFlowActionOtp(f.FlowActionOtp)
	}
	if f.typ == "FlowActionPipedrive" || f.FlowActionPipedrive != nil {
		return visitor.VisitFlowActionPipedrive(f.FlowActionPipedrive)
	}
	if f.typ == "FlowActionSalesforce" || f.FlowActionSalesforce != nil {
		return visitor.VisitFlowActionSalesforce(f.FlowActionSalesforce)
	}
	if f.typ == "FlowActionSendgrid" || f.FlowActionSendgrid != nil {
		return visitor.VisitFlowActionSendgrid(f.FlowActionSendgrid)
	}
	if f.typ == "FlowActionSlack" || f.FlowActionSlack != nil {
		return visitor.VisitFlowActionSlack(f.FlowActionSlack)
	}
	if f.typ == "FlowActionStripe" || f.FlowActionStripe != nil {
		return visitor.VisitFlowActionStripe(f.FlowActionStripe)
	}
	if f.typ == "FlowActionTelegram" || f.FlowActionTelegram != nil {
		return visitor.VisitFlowActionTelegram(f.FlowActionTelegram)
	}
	if f.typ == "FlowActionTwilio" || f.FlowActionTwilio != nil {
		return visitor.VisitFlowActionTwilio(f.FlowActionTwilio)
	}
	if f.typ == "FlowActionWhatsapp" || f.FlowActionWhatsapp != nil {
		return visitor.VisitFlowActionWhatsapp(f.FlowActionWhatsapp)
	}
	if f.typ == "FlowActionXML" || f.FlowActionXML != nil {
		return visitor.VisitFlowActionXML(f.FlowActionXML)
	}
	if f.typ == "FlowActionZapier" || f.FlowActionZapier != nil {
		return visitor.VisitFlowActionZapier(f.FlowActionZapier)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionActivecampaign struct {
	FlowActionActivecampaignListContacts  *FlowActionActivecampaignListContacts
	FlowActionActivecampaignUpsertContact *FlowActionActivecampaignUpsertContact

	typ string
}

func (f *FlowActionActivecampaign) GetFlowActionActivecampaignListContacts() *FlowActionActivecampaignListContacts {
	if f == nil {
		return nil
	}
	return f.FlowActionActivecampaignListContacts
}

func (f *FlowActionActivecampaign) GetFlowActionActivecampaignUpsertContact() *FlowActionActivecampaignUpsertContact {
	if f == nil {
		return nil
	}
	return f.FlowActionActivecampaignUpsertContact
}

func (f *FlowActionActivecampaign) UnmarshalJSON(data []byte) error {
	valueFlowActionActivecampaignListContacts := new(FlowActionActivecampaignListContacts)
	if err := json.Unmarshal(data, &valueFlowActionActivecampaignListContacts); err == nil {
		f.typ = "FlowActionActivecampaignListContacts"
		f.FlowActionActivecampaignListContacts = valueFlowActionActivecampaignListContacts
		return nil
	}
	valueFlowActionActivecampaignUpsertContact := new(FlowActionActivecampaignUpsertContact)
	if err := json.Unmarshal(data, &valueFlowActionActivecampaignUpsertContact); err == nil {
		f.typ = "FlowActionActivecampaignUpsertContact"
		f.FlowActionActivecampaignUpsertContact = valueFlowActionActivecampaignUpsertContact
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionActivecampaign) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionActivecampaignListContacts" || f.FlowActionActivecampaignListContacts != nil {
		return json.Marshal(f.FlowActionActivecampaignListContacts)
	}
	if f.typ == "FlowActionActivecampaignUpsertContact" || f.FlowActionActivecampaignUpsertContact != nil {
		return json.Marshal(f.FlowActionActivecampaignUpsertContact)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionActivecampaignVisitor interface {
	VisitFlowActionActivecampaignListContacts(*FlowActionActivecampaignListContacts) error
	VisitFlowActionActivecampaignUpsertContact(*FlowActionActivecampaignUpsertContact) error
}

func (f *FlowActionActivecampaign) Accept(visitor FlowActionActivecampaignVisitor) error {
	if f.typ == "FlowActionActivecampaignListContacts" || f.FlowActionActivecampaignListContacts != nil {
		return visitor.VisitFlowActionActivecampaignListContacts(f.FlowActionActivecampaignListContacts)
	}
	if f.typ == "FlowActionActivecampaignUpsertContact" || f.FlowActionActivecampaignUpsertContact != nil {
		return visitor.VisitFlowActionActivecampaignUpsertContact(f.FlowActionActivecampaignUpsertContact)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionActivecampaignListContactsFieldID           = big.NewInt(1 << 0)
	flowActionActivecampaignListContactsFieldAlias        = big.NewInt(1 << 1)
	flowActionActivecampaignListContactsFieldAllowFailure = big.NewInt(1 << 2)
	flowActionActivecampaignListContactsFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionActivecampaignListContactsFieldParams       = big.NewInt(1 << 4)
)

type FlowActionActivecampaignListContacts struct {
	ID           string                                      `json:"id" url:"id"`
	Alias        *string                                     `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                       `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                       `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionActivecampaignListContactsParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionActivecampaignListContacts) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionActivecampaignListContacts) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionActivecampaignListContacts) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionActivecampaignListContacts) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionActivecampaignListContacts) GetParams() *FlowActionActivecampaignListContactsParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionActivecampaignListContacts) Type() string {
	return f.type_
}

func (f *FlowActionActivecampaignListContacts) Action() string {
	return f.action
}

func (f *FlowActionActivecampaignListContacts) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionActivecampaignListContacts) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignListContacts) SetID(id string) {
	f.ID = id
	f.require(flowActionActivecampaignListContactsFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignListContacts) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionActivecampaignListContactsFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignListContacts) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionActivecampaignListContactsFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignListContacts) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionActivecampaignListContactsFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignListContacts) SetParams(params *FlowActionActivecampaignListContactsParams) {
	f.Params = params
	f.require(flowActionActivecampaignListContactsFieldParams)
}

func (f *FlowActionActivecampaignListContacts) UnmarshalJSON(data []byte) error {
	type embed FlowActionActivecampaignListContacts
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionActivecampaignListContacts(unmarshaler.embed)
	if unmarshaler.Type != "ACTIVECAMPAIGN" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "ACTIVECAMPAIGN", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "LIST_CONTACTS" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "LIST_CONTACTS", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionActivecampaignListContacts) MarshalJSON() ([]byte, error) {
	type embed FlowActionActivecampaignListContacts
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "ACTIVECAMPAIGN",
		Action: "LIST_CONTACTS",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionActivecampaignListContacts) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionActivecampaignListContactsParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionActivecampaignListContactsParamsFieldEmail        = big.NewInt(1 << 1)
)

type FlowActionActivecampaignListContactsParams struct {
	ConnectionID string `json:"connection_id" url:"connection_id"`
	Email        string `json:"email" url:"email"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionActivecampaignListContactsParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionActivecampaignListContactsParams) GetEmail() string {
	if f == nil {
		return ""
	}
	return f.Email
}

func (f *FlowActionActivecampaignListContactsParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionActivecampaignListContactsParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignListContactsParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionActivecampaignListContactsParamsFieldConnectionID)
}

// SetEmail sets the Email field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignListContactsParams) SetEmail(email string) {
	f.Email = email
	f.require(flowActionActivecampaignListContactsParamsFieldEmail)
}

func (f *FlowActionActivecampaignListContactsParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionActivecampaignListContactsParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionActivecampaignListContactsParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionActivecampaignListContactsParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionActivecampaignListContactsParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionActivecampaignListContactsParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionActivecampaignUpsertContactFieldID           = big.NewInt(1 << 0)
	flowActionActivecampaignUpsertContactFieldAlias        = big.NewInt(1 << 1)
	flowActionActivecampaignUpsertContactFieldAllowFailure = big.NewInt(1 << 2)
	flowActionActivecampaignUpsertContactFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionActivecampaignUpsertContactFieldParams       = big.NewInt(1 << 4)
)

type FlowActionActivecampaignUpsertContact struct {
	ID           string                                       `json:"id" url:"id"`
	Alias        *string                                      `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                        `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                        `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionActivecampaignUpsertContactParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionActivecampaignUpsertContact) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionActivecampaignUpsertContact) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionActivecampaignUpsertContact) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionActivecampaignUpsertContact) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionActivecampaignUpsertContact) GetParams() *FlowActionActivecampaignUpsertContactParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionActivecampaignUpsertContact) Type() string {
	return f.type_
}

func (f *FlowActionActivecampaignUpsertContact) Action() string {
	return f.action
}

func (f *FlowActionActivecampaignUpsertContact) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionActivecampaignUpsertContact) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignUpsertContact) SetID(id string) {
	f.ID = id
	f.require(flowActionActivecampaignUpsertContactFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignUpsertContact) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionActivecampaignUpsertContactFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignUpsertContact) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionActivecampaignUpsertContactFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignUpsertContact) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionActivecampaignUpsertContactFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignUpsertContact) SetParams(params *FlowActionActivecampaignUpsertContactParams) {
	f.Params = params
	f.require(flowActionActivecampaignUpsertContactFieldParams)
}

func (f *FlowActionActivecampaignUpsertContact) UnmarshalJSON(data []byte) error {
	type embed FlowActionActivecampaignUpsertContact
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionActivecampaignUpsertContact(unmarshaler.embed)
	if unmarshaler.Type != "ACTIVECAMPAIGN" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "ACTIVECAMPAIGN", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "UPSERT_CONTACT" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "UPSERT_CONTACT", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionActivecampaignUpsertContact) MarshalJSON() ([]byte, error) {
	type embed FlowActionActivecampaignUpsertContact
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "ACTIVECAMPAIGN",
		Action: "UPSERT_CONTACT",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionActivecampaignUpsertContact) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionActivecampaignUpsertContactParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionActivecampaignUpsertContactParamsFieldEmail        = big.NewInt(1 << 1)
	flowActionActivecampaignUpsertContactParamsFieldFirstName    = big.NewInt(1 << 2)
	flowActionActivecampaignUpsertContactParamsFieldLastName     = big.NewInt(1 << 3)
	flowActionActivecampaignUpsertContactParamsFieldPhone        = big.NewInt(1 << 4)
	flowActionActivecampaignUpsertContactParamsFieldCustomFields = big.NewInt(1 << 5)
)

type FlowActionActivecampaignUpsertContactParams struct {
	ConnectionID string                                                   `json:"connection_id" url:"connection_id"`
	Email        string                                                   `json:"email" url:"email"`
	FirstName    *string                                                  `json:"first_name,omitempty" url:"first_name,omitempty"`
	LastName     *string                                                  `json:"last_name,omitempty" url:"last_name,omitempty"`
	Phone        *string                                                  `json:"phone,omitempty" url:"phone,omitempty"`
	CustomFields *FlowActionActivecampaignUpsertContactParamsCustomFields `json:"custom_fields,omitempty" url:"custom_fields,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionActivecampaignUpsertContactParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionActivecampaignUpsertContactParams) GetEmail() string {
	if f == nil {
		return ""
	}
	return f.Email
}

func (f *FlowActionActivecampaignUpsertContactParams) GetFirstName() string {
	if f == nil || f.FirstName == nil {
		return ""
	}
	return *f.FirstName
}

func (f *FlowActionActivecampaignUpsertContactParams) GetLastName() string {
	if f == nil || f.LastName == nil {
		return ""
	}
	return *f.LastName
}

func (f *FlowActionActivecampaignUpsertContactParams) GetPhone() string {
	if f == nil || f.Phone == nil {
		return ""
	}
	return *f.Phone
}

func (f *FlowActionActivecampaignUpsertContactParams) GetCustomFields() FlowActionActivecampaignUpsertContactParamsCustomFields {
	if f == nil || f.CustomFields == nil {
		return nil
	}
	return *f.CustomFields
}

func (f *FlowActionActivecampaignUpsertContactParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionActivecampaignUpsertContactParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignUpsertContactParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionActivecampaignUpsertContactParamsFieldConnectionID)
}

// SetEmail sets the Email field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignUpsertContactParams) SetEmail(email string) {
	f.Email = email
	f.require(flowActionActivecampaignUpsertContactParamsFieldEmail)
}

// SetFirstName sets the FirstName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignUpsertContactParams) SetFirstName(firstName *string) {
	f.FirstName = firstName
	f.require(flowActionActivecampaignUpsertContactParamsFieldFirstName)
}

// SetLastName sets the LastName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignUpsertContactParams) SetLastName(lastName *string) {
	f.LastName = lastName
	f.require(flowActionActivecampaignUpsertContactParamsFieldLastName)
}

// SetPhone sets the Phone field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignUpsertContactParams) SetPhone(phone *string) {
	f.Phone = phone
	f.require(flowActionActivecampaignUpsertContactParamsFieldPhone)
}

// SetCustomFields sets the CustomFields field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionActivecampaignUpsertContactParams) SetCustomFields(customFields *FlowActionActivecampaignUpsertContactParamsCustomFields) {
	f.CustomFields = customFields
	f.require(flowActionActivecampaignUpsertContactParamsFieldCustomFields)
}

func (f *FlowActionActivecampaignUpsertContactParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionActivecampaignUpsertContactParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionActivecampaignUpsertContactParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionActivecampaignUpsertContactParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionActivecampaignUpsertContactParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionActivecampaignUpsertContactParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionActivecampaignUpsertContactParamsCustomFields = map[string]interface{}

type FlowActionAirtable struct {
	FlowActionAirtableCreateRecord *FlowActionAirtableCreateRecord
	FlowActionAirtableListRecords  *FlowActionAirtableListRecords
	FlowActionAirtableUpdateRecord *FlowActionAirtableUpdateRecord

	typ string
}

func (f *FlowActionAirtable) GetFlowActionAirtableCreateRecord() *FlowActionAirtableCreateRecord {
	if f == nil {
		return nil
	}
	return f.FlowActionAirtableCreateRecord
}

func (f *FlowActionAirtable) GetFlowActionAirtableListRecords() *FlowActionAirtableListRecords {
	if f == nil {
		return nil
	}
	return f.FlowActionAirtableListRecords
}

func (f *FlowActionAirtable) GetFlowActionAirtableUpdateRecord() *FlowActionAirtableUpdateRecord {
	if f == nil {
		return nil
	}
	return f.FlowActionAirtableUpdateRecord
}

func (f *FlowActionAirtable) UnmarshalJSON(data []byte) error {
	valueFlowActionAirtableCreateRecord := new(FlowActionAirtableCreateRecord)
	if err := json.Unmarshal(data, &valueFlowActionAirtableCreateRecord); err == nil {
		f.typ = "FlowActionAirtableCreateRecord"
		f.FlowActionAirtableCreateRecord = valueFlowActionAirtableCreateRecord
		return nil
	}
	valueFlowActionAirtableListRecords := new(FlowActionAirtableListRecords)
	if err := json.Unmarshal(data, &valueFlowActionAirtableListRecords); err == nil {
		f.typ = "FlowActionAirtableListRecords"
		f.FlowActionAirtableListRecords = valueFlowActionAirtableListRecords
		return nil
	}
	valueFlowActionAirtableUpdateRecord := new(FlowActionAirtableUpdateRecord)
	if err := json.Unmarshal(data, &valueFlowActionAirtableUpdateRecord); err == nil {
		f.typ = "FlowActionAirtableUpdateRecord"
		f.FlowActionAirtableUpdateRecord = valueFlowActionAirtableUpdateRecord
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionAirtable) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionAirtableCreateRecord" || f.FlowActionAirtableCreateRecord != nil {
		return json.Marshal(f.FlowActionAirtableCreateRecord)
	}
	if f.typ == "FlowActionAirtableListRecords" || f.FlowActionAirtableListRecords != nil {
		return json.Marshal(f.FlowActionAirtableListRecords)
	}
	if f.typ == "FlowActionAirtableUpdateRecord" || f.FlowActionAirtableUpdateRecord != nil {
		return json.Marshal(f.FlowActionAirtableUpdateRecord)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionAirtableVisitor interface {
	VisitFlowActionAirtableCreateRecord(*FlowActionAirtableCreateRecord) error
	VisitFlowActionAirtableListRecords(*FlowActionAirtableListRecords) error
	VisitFlowActionAirtableUpdateRecord(*FlowActionAirtableUpdateRecord) error
}

func (f *FlowActionAirtable) Accept(visitor FlowActionAirtableVisitor) error {
	if f.typ == "FlowActionAirtableCreateRecord" || f.FlowActionAirtableCreateRecord != nil {
		return visitor.VisitFlowActionAirtableCreateRecord(f.FlowActionAirtableCreateRecord)
	}
	if f.typ == "FlowActionAirtableListRecords" || f.FlowActionAirtableListRecords != nil {
		return visitor.VisitFlowActionAirtableListRecords(f.FlowActionAirtableListRecords)
	}
	if f.typ == "FlowActionAirtableUpdateRecord" || f.FlowActionAirtableUpdateRecord != nil {
		return visitor.VisitFlowActionAirtableUpdateRecord(f.FlowActionAirtableUpdateRecord)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionAirtableCreateRecordFieldID           = big.NewInt(1 << 0)
	flowActionAirtableCreateRecordFieldAlias        = big.NewInt(1 << 1)
	flowActionAirtableCreateRecordFieldAllowFailure = big.NewInt(1 << 2)
	flowActionAirtableCreateRecordFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionAirtableCreateRecordFieldParams       = big.NewInt(1 << 4)
)

type FlowActionAirtableCreateRecord struct {
	ID           string                                `json:"id" url:"id"`
	Alias        *string                               `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                 `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                 `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionAirtableCreateRecordParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionAirtableCreateRecord) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionAirtableCreateRecord) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionAirtableCreateRecord) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionAirtableCreateRecord) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionAirtableCreateRecord) GetParams() *FlowActionAirtableCreateRecordParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionAirtableCreateRecord) Type() string {
	return f.type_
}

func (f *FlowActionAirtableCreateRecord) Action() string {
	return f.action
}

func (f *FlowActionAirtableCreateRecord) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionAirtableCreateRecord) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableCreateRecord) SetID(id string) {
	f.ID = id
	f.require(flowActionAirtableCreateRecordFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableCreateRecord) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionAirtableCreateRecordFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableCreateRecord) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionAirtableCreateRecordFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableCreateRecord) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionAirtableCreateRecordFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableCreateRecord) SetParams(params *FlowActionAirtableCreateRecordParams) {
	f.Params = params
	f.require(flowActionAirtableCreateRecordFieldParams)
}

func (f *FlowActionAirtableCreateRecord) UnmarshalJSON(data []byte) error {
	type embed FlowActionAirtableCreateRecord
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionAirtableCreateRecord(unmarshaler.embed)
	if unmarshaler.Type != "AIRTABLE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "AIRTABLE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "CREATE_RECORD" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "CREATE_RECORD", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionAirtableCreateRecord) MarshalJSON() ([]byte, error) {
	type embed FlowActionAirtableCreateRecord
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "AIRTABLE",
		Action: "CREATE_RECORD",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionAirtableCreateRecord) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionAirtableCreateRecordParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionAirtableCreateRecordParamsFieldBaseID       = big.NewInt(1 << 1)
	flowActionAirtableCreateRecordParamsFieldTableName    = big.NewInt(1 << 2)
	flowActionAirtableCreateRecordParamsFieldFields       = big.NewInt(1 << 3)
)

type FlowActionAirtableCreateRecordParams struct {
	ConnectionID string                                      `json:"connection_id" url:"connection_id"`
	BaseID       string                                      `json:"base_id" url:"base_id"`
	TableName    string                                      `json:"table_name" url:"table_name"`
	Fields       *FlowActionAirtableCreateRecordParamsFields `json:"fields,omitempty" url:"fields,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionAirtableCreateRecordParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionAirtableCreateRecordParams) GetBaseID() string {
	if f == nil {
		return ""
	}
	return f.BaseID
}

func (f *FlowActionAirtableCreateRecordParams) GetTableName() string {
	if f == nil {
		return ""
	}
	return f.TableName
}

func (f *FlowActionAirtableCreateRecordParams) GetFields() FlowActionAirtableCreateRecordParamsFields {
	if f == nil || f.Fields == nil {
		return nil
	}
	return *f.Fields
}

func (f *FlowActionAirtableCreateRecordParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionAirtableCreateRecordParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableCreateRecordParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionAirtableCreateRecordParamsFieldConnectionID)
}

// SetBaseID sets the BaseID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableCreateRecordParams) SetBaseID(baseID string) {
	f.BaseID = baseID
	f.require(flowActionAirtableCreateRecordParamsFieldBaseID)
}

// SetTableName sets the TableName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableCreateRecordParams) SetTableName(tableName string) {
	f.TableName = tableName
	f.require(flowActionAirtableCreateRecordParamsFieldTableName)
}

// SetFields sets the Fields field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableCreateRecordParams) SetFields(fields *FlowActionAirtableCreateRecordParamsFields) {
	f.Fields = fields
	f.require(flowActionAirtableCreateRecordParamsFieldFields)
}

func (f *FlowActionAirtableCreateRecordParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionAirtableCreateRecordParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionAirtableCreateRecordParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionAirtableCreateRecordParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionAirtableCreateRecordParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionAirtableCreateRecordParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionAirtableCreateRecordParamsFields = map[string]interface{}

var (
	flowActionAirtableListRecordsFieldID           = big.NewInt(1 << 0)
	flowActionAirtableListRecordsFieldAlias        = big.NewInt(1 << 1)
	flowActionAirtableListRecordsFieldAllowFailure = big.NewInt(1 << 2)
	flowActionAirtableListRecordsFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionAirtableListRecordsFieldParams       = big.NewInt(1 << 4)
)

type FlowActionAirtableListRecords struct {
	ID           string                               `json:"id" url:"id"`
	Alias        *string                              `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionAirtableListRecordsParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionAirtableListRecords) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionAirtableListRecords) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionAirtableListRecords) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionAirtableListRecords) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionAirtableListRecords) GetParams() *FlowActionAirtableListRecordsParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionAirtableListRecords) Type() string {
	return f.type_
}

func (f *FlowActionAirtableListRecords) Action() string {
	return f.action
}

func (f *FlowActionAirtableListRecords) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionAirtableListRecords) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableListRecords) SetID(id string) {
	f.ID = id
	f.require(flowActionAirtableListRecordsFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableListRecords) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionAirtableListRecordsFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableListRecords) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionAirtableListRecordsFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableListRecords) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionAirtableListRecordsFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableListRecords) SetParams(params *FlowActionAirtableListRecordsParams) {
	f.Params = params
	f.require(flowActionAirtableListRecordsFieldParams)
}

func (f *FlowActionAirtableListRecords) UnmarshalJSON(data []byte) error {
	type embed FlowActionAirtableListRecords
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionAirtableListRecords(unmarshaler.embed)
	if unmarshaler.Type != "AIRTABLE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "AIRTABLE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "LIST_RECORDS" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "LIST_RECORDS", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionAirtableListRecords) MarshalJSON() ([]byte, error) {
	type embed FlowActionAirtableListRecords
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "AIRTABLE",
		Action: "LIST_RECORDS",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionAirtableListRecords) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionAirtableListRecordsParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionAirtableListRecordsParamsFieldBaseID       = big.NewInt(1 << 1)
	flowActionAirtableListRecordsParamsFieldTableName    = big.NewInt(1 << 2)
	flowActionAirtableListRecordsParamsFieldQuery        = big.NewInt(1 << 3)
	flowActionAirtableListRecordsParamsFieldView         = big.NewInt(1 << 4)
)

type FlowActionAirtableListRecordsParams struct {
	ConnectionID string  `json:"connection_id" url:"connection_id"`
	BaseID       string  `json:"base_id" url:"base_id"`
	TableName    string  `json:"table_name" url:"table_name"`
	Query        *string `json:"query,omitempty" url:"query,omitempty"`
	View         *string `json:"view,omitempty" url:"view,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionAirtableListRecordsParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionAirtableListRecordsParams) GetBaseID() string {
	if f == nil {
		return ""
	}
	return f.BaseID
}

func (f *FlowActionAirtableListRecordsParams) GetTableName() string {
	if f == nil {
		return ""
	}
	return f.TableName
}

func (f *FlowActionAirtableListRecordsParams) GetQuery() string {
	if f == nil || f.Query == nil {
		return ""
	}
	return *f.Query
}

func (f *FlowActionAirtableListRecordsParams) GetView() string {
	if f == nil || f.View == nil {
		return ""
	}
	return *f.View
}

func (f *FlowActionAirtableListRecordsParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionAirtableListRecordsParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableListRecordsParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionAirtableListRecordsParamsFieldConnectionID)
}

// SetBaseID sets the BaseID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableListRecordsParams) SetBaseID(baseID string) {
	f.BaseID = baseID
	f.require(flowActionAirtableListRecordsParamsFieldBaseID)
}

// SetTableName sets the TableName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableListRecordsParams) SetTableName(tableName string) {
	f.TableName = tableName
	f.require(flowActionAirtableListRecordsParamsFieldTableName)
}

// SetQuery sets the Query field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableListRecordsParams) SetQuery(query *string) {
	f.Query = query
	f.require(flowActionAirtableListRecordsParamsFieldQuery)
}

// SetView sets the View field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableListRecordsParams) SetView(view *string) {
	f.View = view
	f.require(flowActionAirtableListRecordsParamsFieldView)
}

func (f *FlowActionAirtableListRecordsParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionAirtableListRecordsParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionAirtableListRecordsParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionAirtableListRecordsParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionAirtableListRecordsParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionAirtableListRecordsParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionAirtableUpdateRecordFieldID           = big.NewInt(1 << 0)
	flowActionAirtableUpdateRecordFieldAlias        = big.NewInt(1 << 1)
	flowActionAirtableUpdateRecordFieldAllowFailure = big.NewInt(1 << 2)
	flowActionAirtableUpdateRecordFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionAirtableUpdateRecordFieldParams       = big.NewInt(1 << 4)
)

type FlowActionAirtableUpdateRecord struct {
	ID           string                                `json:"id" url:"id"`
	Alias        *string                               `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                 `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                 `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionAirtableUpdateRecordParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionAirtableUpdateRecord) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionAirtableUpdateRecord) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionAirtableUpdateRecord) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionAirtableUpdateRecord) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionAirtableUpdateRecord) GetParams() *FlowActionAirtableUpdateRecordParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionAirtableUpdateRecord) Type() string {
	return f.type_
}

func (f *FlowActionAirtableUpdateRecord) Action() string {
	return f.action
}

func (f *FlowActionAirtableUpdateRecord) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionAirtableUpdateRecord) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableUpdateRecord) SetID(id string) {
	f.ID = id
	f.require(flowActionAirtableUpdateRecordFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableUpdateRecord) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionAirtableUpdateRecordFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableUpdateRecord) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionAirtableUpdateRecordFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableUpdateRecord) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionAirtableUpdateRecordFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableUpdateRecord) SetParams(params *FlowActionAirtableUpdateRecordParams) {
	f.Params = params
	f.require(flowActionAirtableUpdateRecordFieldParams)
}

func (f *FlowActionAirtableUpdateRecord) UnmarshalJSON(data []byte) error {
	type embed FlowActionAirtableUpdateRecord
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionAirtableUpdateRecord(unmarshaler.embed)
	if unmarshaler.Type != "AIRTABLE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "AIRTABLE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "UPDATE_RECORD" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "UPDATE_RECORD", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionAirtableUpdateRecord) MarshalJSON() ([]byte, error) {
	type embed FlowActionAirtableUpdateRecord
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "AIRTABLE",
		Action: "UPDATE_RECORD",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionAirtableUpdateRecord) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionAirtableUpdateRecordParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionAirtableUpdateRecordParamsFieldBaseID       = big.NewInt(1 << 1)
	flowActionAirtableUpdateRecordParamsFieldTableName    = big.NewInt(1 << 2)
	flowActionAirtableUpdateRecordParamsFieldRecordID     = big.NewInt(1 << 3)
	flowActionAirtableUpdateRecordParamsFieldFields       = big.NewInt(1 << 4)
)

type FlowActionAirtableUpdateRecordParams struct {
	ConnectionID string                                      `json:"connection_id" url:"connection_id"`
	BaseID       string                                      `json:"base_id" url:"base_id"`
	TableName    string                                      `json:"table_name" url:"table_name"`
	RecordID     string                                      `json:"record_id" url:"record_id"`
	Fields       *FlowActionAirtableUpdateRecordParamsFields `json:"fields,omitempty" url:"fields,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionAirtableUpdateRecordParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionAirtableUpdateRecordParams) GetBaseID() string {
	if f == nil {
		return ""
	}
	return f.BaseID
}

func (f *FlowActionAirtableUpdateRecordParams) GetTableName() string {
	if f == nil {
		return ""
	}
	return f.TableName
}

func (f *FlowActionAirtableUpdateRecordParams) GetRecordID() string {
	if f == nil {
		return ""
	}
	return f.RecordID
}

func (f *FlowActionAirtableUpdateRecordParams) GetFields() FlowActionAirtableUpdateRecordParamsFields {
	if f == nil || f.Fields == nil {
		return nil
	}
	return *f.Fields
}

func (f *FlowActionAirtableUpdateRecordParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionAirtableUpdateRecordParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableUpdateRecordParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionAirtableUpdateRecordParamsFieldConnectionID)
}

// SetBaseID sets the BaseID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableUpdateRecordParams) SetBaseID(baseID string) {
	f.BaseID = baseID
	f.require(flowActionAirtableUpdateRecordParamsFieldBaseID)
}

// SetTableName sets the TableName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableUpdateRecordParams) SetTableName(tableName string) {
	f.TableName = tableName
	f.require(flowActionAirtableUpdateRecordParamsFieldTableName)
}

// SetRecordID sets the RecordID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableUpdateRecordParams) SetRecordID(recordID string) {
	f.RecordID = recordID
	f.require(flowActionAirtableUpdateRecordParamsFieldRecordID)
}

// SetFields sets the Fields field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAirtableUpdateRecordParams) SetFields(fields *FlowActionAirtableUpdateRecordParamsFields) {
	f.Fields = fields
	f.require(flowActionAirtableUpdateRecordParamsFieldFields)
}

func (f *FlowActionAirtableUpdateRecordParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionAirtableUpdateRecordParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionAirtableUpdateRecordParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionAirtableUpdateRecordParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionAirtableUpdateRecordParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionAirtableUpdateRecordParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionAirtableUpdateRecordParamsFields = map[string]interface{}

type FlowActionAuth0 struct {
	FlowActionAuth0CreateUser  *FlowActionAuth0CreateUser
	FlowActionAuth0GetUser     *FlowActionAuth0GetUser
	FlowActionAuth0UpdateUser  *FlowActionAuth0UpdateUser
	FlowActionAuth0SendRequest *FlowActionAuth0SendRequest

	typ string
}

func (f *FlowActionAuth0) GetFlowActionAuth0CreateUser() *FlowActionAuth0CreateUser {
	if f == nil {
		return nil
	}
	return f.FlowActionAuth0CreateUser
}

func (f *FlowActionAuth0) GetFlowActionAuth0GetUser() *FlowActionAuth0GetUser {
	if f == nil {
		return nil
	}
	return f.FlowActionAuth0GetUser
}

func (f *FlowActionAuth0) GetFlowActionAuth0UpdateUser() *FlowActionAuth0UpdateUser {
	if f == nil {
		return nil
	}
	return f.FlowActionAuth0UpdateUser
}

func (f *FlowActionAuth0) GetFlowActionAuth0SendRequest() *FlowActionAuth0SendRequest {
	if f == nil {
		return nil
	}
	return f.FlowActionAuth0SendRequest
}

func (f *FlowActionAuth0) UnmarshalJSON(data []byte) error {
	valueFlowActionAuth0CreateUser := new(FlowActionAuth0CreateUser)
	if err := json.Unmarshal(data, &valueFlowActionAuth0CreateUser); err == nil {
		f.typ = "FlowActionAuth0CreateUser"
		f.FlowActionAuth0CreateUser = valueFlowActionAuth0CreateUser
		return nil
	}
	valueFlowActionAuth0GetUser := new(FlowActionAuth0GetUser)
	if err := json.Unmarshal(data, &valueFlowActionAuth0GetUser); err == nil {
		f.typ = "FlowActionAuth0GetUser"
		f.FlowActionAuth0GetUser = valueFlowActionAuth0GetUser
		return nil
	}
	valueFlowActionAuth0UpdateUser := new(FlowActionAuth0UpdateUser)
	if err := json.Unmarshal(data, &valueFlowActionAuth0UpdateUser); err == nil {
		f.typ = "FlowActionAuth0UpdateUser"
		f.FlowActionAuth0UpdateUser = valueFlowActionAuth0UpdateUser
		return nil
	}
	valueFlowActionAuth0SendRequest := new(FlowActionAuth0SendRequest)
	if err := json.Unmarshal(data, &valueFlowActionAuth0SendRequest); err == nil {
		f.typ = "FlowActionAuth0SendRequest"
		f.FlowActionAuth0SendRequest = valueFlowActionAuth0SendRequest
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionAuth0) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionAuth0CreateUser" || f.FlowActionAuth0CreateUser != nil {
		return json.Marshal(f.FlowActionAuth0CreateUser)
	}
	if f.typ == "FlowActionAuth0GetUser" || f.FlowActionAuth0GetUser != nil {
		return json.Marshal(f.FlowActionAuth0GetUser)
	}
	if f.typ == "FlowActionAuth0UpdateUser" || f.FlowActionAuth0UpdateUser != nil {
		return json.Marshal(f.FlowActionAuth0UpdateUser)
	}
	if f.typ == "FlowActionAuth0SendRequest" || f.FlowActionAuth0SendRequest != nil {
		return json.Marshal(f.FlowActionAuth0SendRequest)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionAuth0Visitor interface {
	VisitFlowActionAuth0CreateUser(*FlowActionAuth0CreateUser) error
	VisitFlowActionAuth0GetUser(*FlowActionAuth0GetUser) error
	VisitFlowActionAuth0UpdateUser(*FlowActionAuth0UpdateUser) error
	VisitFlowActionAuth0SendRequest(*FlowActionAuth0SendRequest) error
}

func (f *FlowActionAuth0) Accept(visitor FlowActionAuth0Visitor) error {
	if f.typ == "FlowActionAuth0CreateUser" || f.FlowActionAuth0CreateUser != nil {
		return visitor.VisitFlowActionAuth0CreateUser(f.FlowActionAuth0CreateUser)
	}
	if f.typ == "FlowActionAuth0GetUser" || f.FlowActionAuth0GetUser != nil {
		return visitor.VisitFlowActionAuth0GetUser(f.FlowActionAuth0GetUser)
	}
	if f.typ == "FlowActionAuth0UpdateUser" || f.FlowActionAuth0UpdateUser != nil {
		return visitor.VisitFlowActionAuth0UpdateUser(f.FlowActionAuth0UpdateUser)
	}
	if f.typ == "FlowActionAuth0SendRequest" || f.FlowActionAuth0SendRequest != nil {
		return visitor.VisitFlowActionAuth0SendRequest(f.FlowActionAuth0SendRequest)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionAuth0CreateUserFieldID           = big.NewInt(1 << 0)
	flowActionAuth0CreateUserFieldAlias        = big.NewInt(1 << 1)
	flowActionAuth0CreateUserFieldAllowFailure = big.NewInt(1 << 2)
	flowActionAuth0CreateUserFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionAuth0CreateUserFieldParams       = big.NewInt(1 << 4)
)

type FlowActionAuth0CreateUser struct {
	ID           string                           `json:"id" url:"id"`
	Alias        *string                          `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                            `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                            `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionAuth0CreateUserParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionAuth0CreateUser) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionAuth0CreateUser) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionAuth0CreateUser) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionAuth0CreateUser) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionAuth0CreateUser) GetParams() *FlowActionAuth0CreateUserParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionAuth0CreateUser) Type() string {
	return f.type_
}

func (f *FlowActionAuth0CreateUser) Action() string {
	return f.action
}

func (f *FlowActionAuth0CreateUser) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionAuth0CreateUser) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0CreateUser) SetID(id string) {
	f.ID = id
	f.require(flowActionAuth0CreateUserFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0CreateUser) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionAuth0CreateUserFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0CreateUser) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionAuth0CreateUserFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0CreateUser) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionAuth0CreateUserFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0CreateUser) SetParams(params *FlowActionAuth0CreateUserParams) {
	f.Params = params
	f.require(flowActionAuth0CreateUserFieldParams)
}

func (f *FlowActionAuth0CreateUser) UnmarshalJSON(data []byte) error {
	type embed FlowActionAuth0CreateUser
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionAuth0CreateUser(unmarshaler.embed)
	if unmarshaler.Type != "AUTH0" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "AUTH0", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "CREATE_USER" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "CREATE_USER", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionAuth0CreateUser) MarshalJSON() ([]byte, error) {
	type embed FlowActionAuth0CreateUser
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "AUTH0",
		Action: "CREATE_USER",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionAuth0CreateUser) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionAuth0CreateUserParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionAuth0CreateUserParamsFieldPayload      = big.NewInt(1 << 1)
)

type FlowActionAuth0CreateUserParams struct {
	ConnectionID string                                 `json:"connection_id" url:"connection_id"`
	Payload      FlowActionAuth0CreateUserParamsPayload `json:"payload" url:"payload"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionAuth0CreateUserParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionAuth0CreateUserParams) GetPayload() FlowActionAuth0CreateUserParamsPayload {
	if f == nil {
		return nil
	}
	return f.Payload
}

func (f *FlowActionAuth0CreateUserParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionAuth0CreateUserParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0CreateUserParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionAuth0CreateUserParamsFieldConnectionID)
}

// SetPayload sets the Payload field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0CreateUserParams) SetPayload(payload FlowActionAuth0CreateUserParamsPayload) {
	f.Payload = payload
	f.require(flowActionAuth0CreateUserParamsFieldPayload)
}

func (f *FlowActionAuth0CreateUserParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionAuth0CreateUserParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionAuth0CreateUserParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionAuth0CreateUserParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionAuth0CreateUserParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionAuth0CreateUserParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionAuth0CreateUserParamsPayload = map[string]interface{}

var (
	flowActionAuth0GetUserFieldID           = big.NewInt(1 << 0)
	flowActionAuth0GetUserFieldAlias        = big.NewInt(1 << 1)
	flowActionAuth0GetUserFieldAllowFailure = big.NewInt(1 << 2)
	flowActionAuth0GetUserFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionAuth0GetUserFieldParams       = big.NewInt(1 << 4)
)

type FlowActionAuth0GetUser struct {
	ID           string                        `json:"id" url:"id"`
	Alias        *string                       `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                         `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                         `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionAuth0GetUserParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionAuth0GetUser) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionAuth0GetUser) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionAuth0GetUser) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionAuth0GetUser) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionAuth0GetUser) GetParams() *FlowActionAuth0GetUserParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionAuth0GetUser) Type() string {
	return f.type_
}

func (f *FlowActionAuth0GetUser) Action() string {
	return f.action
}

func (f *FlowActionAuth0GetUser) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionAuth0GetUser) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0GetUser) SetID(id string) {
	f.ID = id
	f.require(flowActionAuth0GetUserFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0GetUser) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionAuth0GetUserFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0GetUser) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionAuth0GetUserFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0GetUser) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionAuth0GetUserFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0GetUser) SetParams(params *FlowActionAuth0GetUserParams) {
	f.Params = params
	f.require(flowActionAuth0GetUserFieldParams)
}

func (f *FlowActionAuth0GetUser) UnmarshalJSON(data []byte) error {
	type embed FlowActionAuth0GetUser
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionAuth0GetUser(unmarshaler.embed)
	if unmarshaler.Type != "AUTH0" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "AUTH0", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "GET_USER" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "GET_USER", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionAuth0GetUser) MarshalJSON() ([]byte, error) {
	type embed FlowActionAuth0GetUser
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "AUTH0",
		Action: "GET_USER",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionAuth0GetUser) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionAuth0GetUserParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionAuth0GetUserParamsFieldUserID       = big.NewInt(1 << 1)
)

type FlowActionAuth0GetUserParams struct {
	ConnectionID string `json:"connection_id" url:"connection_id"`
	UserID       string `json:"user_id" url:"user_id"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionAuth0GetUserParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionAuth0GetUserParams) GetUserID() string {
	if f == nil {
		return ""
	}
	return f.UserID
}

func (f *FlowActionAuth0GetUserParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionAuth0GetUserParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0GetUserParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionAuth0GetUserParamsFieldConnectionID)
}

// SetUserID sets the UserID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0GetUserParams) SetUserID(userID string) {
	f.UserID = userID
	f.require(flowActionAuth0GetUserParamsFieldUserID)
}

func (f *FlowActionAuth0GetUserParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionAuth0GetUserParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionAuth0GetUserParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionAuth0GetUserParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionAuth0GetUserParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionAuth0GetUserParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionAuth0SendRequestFieldID           = big.NewInt(1 << 0)
	flowActionAuth0SendRequestFieldAlias        = big.NewInt(1 << 1)
	flowActionAuth0SendRequestFieldAllowFailure = big.NewInt(1 << 2)
	flowActionAuth0SendRequestFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionAuth0SendRequestFieldParams       = big.NewInt(1 << 4)
)

type FlowActionAuth0SendRequest struct {
	ID           string                            `json:"id" url:"id"`
	Alias        *string                           `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                             `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                             `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionAuth0SendRequestParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionAuth0SendRequest) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionAuth0SendRequest) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionAuth0SendRequest) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionAuth0SendRequest) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionAuth0SendRequest) GetParams() *FlowActionAuth0SendRequestParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionAuth0SendRequest) Type() string {
	return f.type_
}

func (f *FlowActionAuth0SendRequest) Action() string {
	return f.action
}

func (f *FlowActionAuth0SendRequest) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionAuth0SendRequest) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0SendRequest) SetID(id string) {
	f.ID = id
	f.require(flowActionAuth0SendRequestFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0SendRequest) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionAuth0SendRequestFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0SendRequest) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionAuth0SendRequestFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0SendRequest) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionAuth0SendRequestFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0SendRequest) SetParams(params *FlowActionAuth0SendRequestParams) {
	f.Params = params
	f.require(flowActionAuth0SendRequestFieldParams)
}

func (f *FlowActionAuth0SendRequest) UnmarshalJSON(data []byte) error {
	type embed FlowActionAuth0SendRequest
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionAuth0SendRequest(unmarshaler.embed)
	if unmarshaler.Type != "AUTH0" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "AUTH0", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "SEND_REQUEST" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SEND_REQUEST", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionAuth0SendRequest) MarshalJSON() ([]byte, error) {
	type embed FlowActionAuth0SendRequest
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "AUTH0",
		Action: "SEND_REQUEST",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionAuth0SendRequest) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionAuth0SendRequestParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionAuth0SendRequestParamsFieldPathname     = big.NewInt(1 << 1)
	flowActionAuth0SendRequestParamsFieldMethod       = big.NewInt(1 << 2)
	flowActionAuth0SendRequestParamsFieldHeaders      = big.NewInt(1 << 3)
	flowActionAuth0SendRequestParamsFieldParams       = big.NewInt(1 << 4)
	flowActionAuth0SendRequestParamsFieldPayload      = big.NewInt(1 << 5)
)

type FlowActionAuth0SendRequestParams struct {
	ConnectionID string                                       `json:"connection_id" url:"connection_id"`
	Pathname     string                                       `json:"pathname" url:"pathname"`
	Method       *FlowActionAuth0SendRequestParamsMethod      `json:"method,omitempty" url:"method,omitempty"`
	Headers      *FlowActionAuth0SendRequestParamsHeaders     `json:"headers,omitempty" url:"headers,omitempty"`
	Params       *FlowActionAuth0SendRequestParamsQueryParams `json:"params,omitempty" url:"params,omitempty"`
	Payload      *FlowActionAuth0SendRequestParamsPayload     `json:"payload,omitempty" url:"payload,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionAuth0SendRequestParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionAuth0SendRequestParams) GetPathname() string {
	if f == nil {
		return ""
	}
	return f.Pathname
}

func (f *FlowActionAuth0SendRequestParams) GetMethod() FlowActionAuth0SendRequestParamsMethod {
	if f == nil || f.Method == nil {
		return ""
	}
	return *f.Method
}

func (f *FlowActionAuth0SendRequestParams) GetHeaders() FlowActionAuth0SendRequestParamsHeaders {
	if f == nil || f.Headers == nil {
		return nil
	}
	return *f.Headers
}

func (f *FlowActionAuth0SendRequestParams) GetParams() FlowActionAuth0SendRequestParamsQueryParams {
	if f == nil || f.Params == nil {
		return nil
	}
	return *f.Params
}

func (f *FlowActionAuth0SendRequestParams) GetPayload() FlowActionAuth0SendRequestParamsPayload {
	if f == nil || f.Payload == nil {
		return FlowActionAuth0SendRequestParamsPayload{}
	}
	return *f.Payload
}

func (f *FlowActionAuth0SendRequestParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionAuth0SendRequestParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0SendRequestParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionAuth0SendRequestParamsFieldConnectionID)
}

// SetPathname sets the Pathname field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0SendRequestParams) SetPathname(pathname string) {
	f.Pathname = pathname
	f.require(flowActionAuth0SendRequestParamsFieldPathname)
}

// SetMethod sets the Method field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0SendRequestParams) SetMethod(method *FlowActionAuth0SendRequestParamsMethod) {
	f.Method = method
	f.require(flowActionAuth0SendRequestParamsFieldMethod)
}

// SetHeaders sets the Headers field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0SendRequestParams) SetHeaders(headers *FlowActionAuth0SendRequestParamsHeaders) {
	f.Headers = headers
	f.require(flowActionAuth0SendRequestParamsFieldHeaders)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0SendRequestParams) SetParams(params *FlowActionAuth0SendRequestParamsQueryParams) {
	f.Params = params
	f.require(flowActionAuth0SendRequestParamsFieldParams)
}

// SetPayload sets the Payload field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0SendRequestParams) SetPayload(payload *FlowActionAuth0SendRequestParamsPayload) {
	f.Payload = payload
	f.require(flowActionAuth0SendRequestParamsFieldPayload)
}

func (f *FlowActionAuth0SendRequestParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionAuth0SendRequestParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionAuth0SendRequestParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionAuth0SendRequestParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionAuth0SendRequestParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionAuth0SendRequestParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionAuth0SendRequestParamsHeaders = map[string]interface{}

type FlowActionAuth0SendRequestParamsMethod string

const (
	FlowActionAuth0SendRequestParamsMethodGet    FlowActionAuth0SendRequestParamsMethod = "GET"
	FlowActionAuth0SendRequestParamsMethodPost   FlowActionAuth0SendRequestParamsMethod = "POST"
	FlowActionAuth0SendRequestParamsMethodPut    FlowActionAuth0SendRequestParamsMethod = "PUT"
	FlowActionAuth0SendRequestParamsMethodPatch  FlowActionAuth0SendRequestParamsMethod = "PATCH"
	FlowActionAuth0SendRequestParamsMethodDelete FlowActionAuth0SendRequestParamsMethod = "DELETE"
)

func NewFlowActionAuth0SendRequestParamsMethodFromString(s string) (FlowActionAuth0SendRequestParamsMethod, error) {
	switch s {
	case "GET":
		return FlowActionAuth0SendRequestParamsMethodGet, nil
	case "POST":
		return FlowActionAuth0SendRequestParamsMethodPost, nil
	case "PUT":
		return FlowActionAuth0SendRequestParamsMethodPut, nil
	case "PATCH":
		return FlowActionAuth0SendRequestParamsMethodPatch, nil
	case "DELETE":
		return FlowActionAuth0SendRequestParamsMethodDelete, nil
	}
	var t FlowActionAuth0SendRequestParamsMethod
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (f FlowActionAuth0SendRequestParamsMethod) Ptr() *FlowActionAuth0SendRequestParamsMethod {
	return &f
}

type FlowActionAuth0SendRequestParamsPayload struct {
	String                                        string
	UnknownList                                   []interface{}
	FlowActionAuth0SendRequestParamsPayloadObject FlowActionAuth0SendRequestParamsPayloadObject

	typ string
}

func (f *FlowActionAuth0SendRequestParamsPayload) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionAuth0SendRequestParamsPayload) GetUnknownList() []interface{} {
	if f == nil {
		return nil
	}
	return f.UnknownList
}

func (f *FlowActionAuth0SendRequestParamsPayload) GetFlowActionAuth0SendRequestParamsPayloadObject() FlowActionAuth0SendRequestParamsPayloadObject {
	if f == nil {
		return nil
	}
	return f.FlowActionAuth0SendRequestParamsPayloadObject
}

func (f *FlowActionAuth0SendRequestParamsPayload) UnmarshalJSON(data []byte) error {
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	var valueUnknownList []interface{}
	if err := json.Unmarshal(data, &valueUnknownList); err == nil {
		f.typ = "UnknownList"
		f.UnknownList = valueUnknownList
		return nil
	}
	var valueFlowActionAuth0SendRequestParamsPayloadObject FlowActionAuth0SendRequestParamsPayloadObject
	if err := json.Unmarshal(data, &valueFlowActionAuth0SendRequestParamsPayloadObject); err == nil {
		f.typ = "FlowActionAuth0SendRequestParamsPayloadObject"
		f.FlowActionAuth0SendRequestParamsPayloadObject = valueFlowActionAuth0SendRequestParamsPayloadObject
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionAuth0SendRequestParamsPayload) MarshalJSON() ([]byte, error) {
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	if f.typ == "UnknownList" || f.UnknownList != nil {
		return json.Marshal(f.UnknownList)
	}
	if f.typ == "FlowActionAuth0SendRequestParamsPayloadObject" || f.FlowActionAuth0SendRequestParamsPayloadObject != nil {
		return json.Marshal(f.FlowActionAuth0SendRequestParamsPayloadObject)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionAuth0SendRequestParamsPayloadVisitor interface {
	VisitString(string) error
	VisitUnknownList([]interface{}) error
	VisitFlowActionAuth0SendRequestParamsPayloadObject(FlowActionAuth0SendRequestParamsPayloadObject) error
}

func (f *FlowActionAuth0SendRequestParamsPayload) Accept(visitor FlowActionAuth0SendRequestParamsPayloadVisitor) error {
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	if f.typ == "UnknownList" || f.UnknownList != nil {
		return visitor.VisitUnknownList(f.UnknownList)
	}
	if f.typ == "FlowActionAuth0SendRequestParamsPayloadObject" || f.FlowActionAuth0SendRequestParamsPayloadObject != nil {
		return visitor.VisitFlowActionAuth0SendRequestParamsPayloadObject(f.FlowActionAuth0SendRequestParamsPayloadObject)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionAuth0SendRequestParamsPayloadObject = map[string]interface{}

type FlowActionAuth0SendRequestParamsQueryParams = map[string]*FlowActionAuth0SendRequestParamsQueryParamsValue

type FlowActionAuth0SendRequestParamsQueryParamsValue struct {
	Double float64
	String string

	typ string
}

func (f *FlowActionAuth0SendRequestParamsQueryParamsValue) GetDouble() float64 {
	if f == nil {
		return 0
	}
	return f.Double
}

func (f *FlowActionAuth0SendRequestParamsQueryParamsValue) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionAuth0SendRequestParamsQueryParamsValue) UnmarshalJSON(data []byte) error {
	var valueDouble float64
	if err := json.Unmarshal(data, &valueDouble); err == nil {
		f.typ = "Double"
		f.Double = valueDouble
		return nil
	}
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionAuth0SendRequestParamsQueryParamsValue) MarshalJSON() ([]byte, error) {
	if f.typ == "Double" || f.Double != 0 {
		return json.Marshal(f.Double)
	}
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionAuth0SendRequestParamsQueryParamsValueVisitor interface {
	VisitDouble(float64) error
	VisitString(string) error
}

func (f *FlowActionAuth0SendRequestParamsQueryParamsValue) Accept(visitor FlowActionAuth0SendRequestParamsQueryParamsValueVisitor) error {
	if f.typ == "Double" || f.Double != 0 {
		return visitor.VisitDouble(f.Double)
	}
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionAuth0UpdateUserFieldID           = big.NewInt(1 << 0)
	flowActionAuth0UpdateUserFieldAlias        = big.NewInt(1 << 1)
	flowActionAuth0UpdateUserFieldAllowFailure = big.NewInt(1 << 2)
	flowActionAuth0UpdateUserFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionAuth0UpdateUserFieldParams       = big.NewInt(1 << 4)
)

type FlowActionAuth0UpdateUser struct {
	ID           string                           `json:"id" url:"id"`
	Alias        *string                          `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                            `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                            `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionAuth0UpdateUserParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionAuth0UpdateUser) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionAuth0UpdateUser) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionAuth0UpdateUser) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionAuth0UpdateUser) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionAuth0UpdateUser) GetParams() *FlowActionAuth0UpdateUserParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionAuth0UpdateUser) Type() string {
	return f.type_
}

func (f *FlowActionAuth0UpdateUser) Action() string {
	return f.action
}

func (f *FlowActionAuth0UpdateUser) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionAuth0UpdateUser) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0UpdateUser) SetID(id string) {
	f.ID = id
	f.require(flowActionAuth0UpdateUserFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0UpdateUser) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionAuth0UpdateUserFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0UpdateUser) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionAuth0UpdateUserFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0UpdateUser) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionAuth0UpdateUserFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0UpdateUser) SetParams(params *FlowActionAuth0UpdateUserParams) {
	f.Params = params
	f.require(flowActionAuth0UpdateUserFieldParams)
}

func (f *FlowActionAuth0UpdateUser) UnmarshalJSON(data []byte) error {
	type embed FlowActionAuth0UpdateUser
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionAuth0UpdateUser(unmarshaler.embed)
	if unmarshaler.Type != "AUTH0" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "AUTH0", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "UPDATE_USER" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "UPDATE_USER", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionAuth0UpdateUser) MarshalJSON() ([]byte, error) {
	type embed FlowActionAuth0UpdateUser
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "AUTH0",
		Action: "UPDATE_USER",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionAuth0UpdateUser) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionAuth0UpdateUserParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionAuth0UpdateUserParamsFieldUserID       = big.NewInt(1 << 1)
	flowActionAuth0UpdateUserParamsFieldChanges      = big.NewInt(1 << 2)
)

type FlowActionAuth0UpdateUserParams struct {
	ConnectionID string                                 `json:"connection_id" url:"connection_id"`
	UserID       string                                 `json:"user_id" url:"user_id"`
	Changes      FlowActionAuth0UpdateUserParamsChanges `json:"changes" url:"changes"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionAuth0UpdateUserParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionAuth0UpdateUserParams) GetUserID() string {
	if f == nil {
		return ""
	}
	return f.UserID
}

func (f *FlowActionAuth0UpdateUserParams) GetChanges() FlowActionAuth0UpdateUserParamsChanges {
	if f == nil {
		return nil
	}
	return f.Changes
}

func (f *FlowActionAuth0UpdateUserParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionAuth0UpdateUserParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0UpdateUserParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionAuth0UpdateUserParamsFieldConnectionID)
}

// SetUserID sets the UserID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0UpdateUserParams) SetUserID(userID string) {
	f.UserID = userID
	f.require(flowActionAuth0UpdateUserParamsFieldUserID)
}

// SetChanges sets the Changes field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionAuth0UpdateUserParams) SetChanges(changes FlowActionAuth0UpdateUserParamsChanges) {
	f.Changes = changes
	f.require(flowActionAuth0UpdateUserParamsFieldChanges)
}

func (f *FlowActionAuth0UpdateUserParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionAuth0UpdateUserParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionAuth0UpdateUserParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionAuth0UpdateUserParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionAuth0UpdateUserParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionAuth0UpdateUserParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionAuth0UpdateUserParamsChanges = map[string]interface{}

type FlowActionBigquery = *FlowActionBigqueryInsertRows

var (
	flowActionBigqueryInsertRowsFieldID           = big.NewInt(1 << 0)
	flowActionBigqueryInsertRowsFieldAlias        = big.NewInt(1 << 1)
	flowActionBigqueryInsertRowsFieldAllowFailure = big.NewInt(1 << 2)
	flowActionBigqueryInsertRowsFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionBigqueryInsertRowsFieldParams       = big.NewInt(1 << 4)
)

type FlowActionBigqueryInsertRows struct {
	ID           string                              `json:"id" url:"id"`
	Alias        *string                             `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                               `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                               `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionBigqueryInsertRowsParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionBigqueryInsertRows) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionBigqueryInsertRows) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionBigqueryInsertRows) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionBigqueryInsertRows) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionBigqueryInsertRows) GetParams() *FlowActionBigqueryInsertRowsParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionBigqueryInsertRows) Type() string {
	return f.type_
}

func (f *FlowActionBigqueryInsertRows) Action() string {
	return f.action
}

func (f *FlowActionBigqueryInsertRows) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionBigqueryInsertRows) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionBigqueryInsertRows) SetID(id string) {
	f.ID = id
	f.require(flowActionBigqueryInsertRowsFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionBigqueryInsertRows) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionBigqueryInsertRowsFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionBigqueryInsertRows) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionBigqueryInsertRowsFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionBigqueryInsertRows) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionBigqueryInsertRowsFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionBigqueryInsertRows) SetParams(params *FlowActionBigqueryInsertRowsParams) {
	f.Params = params
	f.require(flowActionBigqueryInsertRowsFieldParams)
}

func (f *FlowActionBigqueryInsertRows) UnmarshalJSON(data []byte) error {
	type embed FlowActionBigqueryInsertRows
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionBigqueryInsertRows(unmarshaler.embed)
	if unmarshaler.Type != "BIGQUERY" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "BIGQUERY", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "INSERT_ROWS" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "INSERT_ROWS", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionBigqueryInsertRows) MarshalJSON() ([]byte, error) {
	type embed FlowActionBigqueryInsertRows
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "BIGQUERY",
		Action: "INSERT_ROWS",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionBigqueryInsertRows) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionBigqueryInsertRowsParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionBigqueryInsertRowsParamsFieldDatasetID    = big.NewInt(1 << 1)
	flowActionBigqueryInsertRowsParamsFieldTableID      = big.NewInt(1 << 2)
	flowActionBigqueryInsertRowsParamsFieldData         = big.NewInt(1 << 3)
)

type FlowActionBigqueryInsertRowsParams struct {
	ConnectionID string                                  `json:"connection_id" url:"connection_id"`
	DatasetID    string                                  `json:"dataset_id" url:"dataset_id"`
	TableID      string                                  `json:"table_id" url:"table_id"`
	Data         *FlowActionBigqueryInsertRowsParamsData `json:"data,omitempty" url:"data,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionBigqueryInsertRowsParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionBigqueryInsertRowsParams) GetDatasetID() string {
	if f == nil {
		return ""
	}
	return f.DatasetID
}

func (f *FlowActionBigqueryInsertRowsParams) GetTableID() string {
	if f == nil {
		return ""
	}
	return f.TableID
}

func (f *FlowActionBigqueryInsertRowsParams) GetData() FlowActionBigqueryInsertRowsParamsData {
	if f == nil || f.Data == nil {
		return nil
	}
	return *f.Data
}

func (f *FlowActionBigqueryInsertRowsParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionBigqueryInsertRowsParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionBigqueryInsertRowsParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionBigqueryInsertRowsParamsFieldConnectionID)
}

// SetDatasetID sets the DatasetID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionBigqueryInsertRowsParams) SetDatasetID(datasetID string) {
	f.DatasetID = datasetID
	f.require(flowActionBigqueryInsertRowsParamsFieldDatasetID)
}

// SetTableID sets the TableID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionBigqueryInsertRowsParams) SetTableID(tableID string) {
	f.TableID = tableID
	f.require(flowActionBigqueryInsertRowsParamsFieldTableID)
}

// SetData sets the Data field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionBigqueryInsertRowsParams) SetData(data *FlowActionBigqueryInsertRowsParamsData) {
	f.Data = data
	f.require(flowActionBigqueryInsertRowsParamsFieldData)
}

func (f *FlowActionBigqueryInsertRowsParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionBigqueryInsertRowsParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionBigqueryInsertRowsParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionBigqueryInsertRowsParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionBigqueryInsertRowsParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionBigqueryInsertRowsParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionBigqueryInsertRowsParamsData = map[string]interface{}

type FlowActionClearbit struct {
	FlowActionClearbitFindPerson  *FlowActionClearbitFindPerson
	FlowActionClearbitFindCompany *FlowActionClearbitFindCompany

	typ string
}

func (f *FlowActionClearbit) GetFlowActionClearbitFindPerson() *FlowActionClearbitFindPerson {
	if f == nil {
		return nil
	}
	return f.FlowActionClearbitFindPerson
}

func (f *FlowActionClearbit) GetFlowActionClearbitFindCompany() *FlowActionClearbitFindCompany {
	if f == nil {
		return nil
	}
	return f.FlowActionClearbitFindCompany
}

func (f *FlowActionClearbit) UnmarshalJSON(data []byte) error {
	valueFlowActionClearbitFindPerson := new(FlowActionClearbitFindPerson)
	if err := json.Unmarshal(data, &valueFlowActionClearbitFindPerson); err == nil {
		f.typ = "FlowActionClearbitFindPerson"
		f.FlowActionClearbitFindPerson = valueFlowActionClearbitFindPerson
		return nil
	}
	valueFlowActionClearbitFindCompany := new(FlowActionClearbitFindCompany)
	if err := json.Unmarshal(data, &valueFlowActionClearbitFindCompany); err == nil {
		f.typ = "FlowActionClearbitFindCompany"
		f.FlowActionClearbitFindCompany = valueFlowActionClearbitFindCompany
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionClearbit) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionClearbitFindPerson" || f.FlowActionClearbitFindPerson != nil {
		return json.Marshal(f.FlowActionClearbitFindPerson)
	}
	if f.typ == "FlowActionClearbitFindCompany" || f.FlowActionClearbitFindCompany != nil {
		return json.Marshal(f.FlowActionClearbitFindCompany)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionClearbitVisitor interface {
	VisitFlowActionClearbitFindPerson(*FlowActionClearbitFindPerson) error
	VisitFlowActionClearbitFindCompany(*FlowActionClearbitFindCompany) error
}

func (f *FlowActionClearbit) Accept(visitor FlowActionClearbitVisitor) error {
	if f.typ == "FlowActionClearbitFindPerson" || f.FlowActionClearbitFindPerson != nil {
		return visitor.VisitFlowActionClearbitFindPerson(f.FlowActionClearbitFindPerson)
	}
	if f.typ == "FlowActionClearbitFindCompany" || f.FlowActionClearbitFindCompany != nil {
		return visitor.VisitFlowActionClearbitFindCompany(f.FlowActionClearbitFindCompany)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionClearbitFindCompanyFieldID           = big.NewInt(1 << 0)
	flowActionClearbitFindCompanyFieldAlias        = big.NewInt(1 << 1)
	flowActionClearbitFindCompanyFieldAllowFailure = big.NewInt(1 << 2)
	flowActionClearbitFindCompanyFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionClearbitFindCompanyFieldParams       = big.NewInt(1 << 4)
)

type FlowActionClearbitFindCompany struct {
	ID           string                               `json:"id" url:"id"`
	Alias        *string                              `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionClearbitFindCompanyParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionClearbitFindCompany) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionClearbitFindCompany) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionClearbitFindCompany) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionClearbitFindCompany) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionClearbitFindCompany) GetParams() *FlowActionClearbitFindCompanyParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionClearbitFindCompany) Type() string {
	return f.type_
}

func (f *FlowActionClearbitFindCompany) Action() string {
	return f.action
}

func (f *FlowActionClearbitFindCompany) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionClearbitFindCompany) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionClearbitFindCompany) SetID(id string) {
	f.ID = id
	f.require(flowActionClearbitFindCompanyFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionClearbitFindCompany) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionClearbitFindCompanyFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionClearbitFindCompany) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionClearbitFindCompanyFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionClearbitFindCompany) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionClearbitFindCompanyFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionClearbitFindCompany) SetParams(params *FlowActionClearbitFindCompanyParams) {
	f.Params = params
	f.require(flowActionClearbitFindCompanyFieldParams)
}

func (f *FlowActionClearbitFindCompany) UnmarshalJSON(data []byte) error {
	type embed FlowActionClearbitFindCompany
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionClearbitFindCompany(unmarshaler.embed)
	if unmarshaler.Type != "CLEARBIT" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "CLEARBIT", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "FIND_COMPANY" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "FIND_COMPANY", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionClearbitFindCompany) MarshalJSON() ([]byte, error) {
	type embed FlowActionClearbitFindCompany
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "CLEARBIT",
		Action: "FIND_COMPANY",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionClearbitFindCompany) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionClearbitFindCompanyParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionClearbitFindCompanyParamsFieldDomain       = big.NewInt(1 << 1)
)

type FlowActionClearbitFindCompanyParams struct {
	ConnectionID string `json:"connection_id" url:"connection_id"`
	Domain       string `json:"domain" url:"domain"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionClearbitFindCompanyParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionClearbitFindCompanyParams) GetDomain() string {
	if f == nil {
		return ""
	}
	return f.Domain
}

func (f *FlowActionClearbitFindCompanyParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionClearbitFindCompanyParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionClearbitFindCompanyParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionClearbitFindCompanyParamsFieldConnectionID)
}

// SetDomain sets the Domain field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionClearbitFindCompanyParams) SetDomain(domain string) {
	f.Domain = domain
	f.require(flowActionClearbitFindCompanyParamsFieldDomain)
}

func (f *FlowActionClearbitFindCompanyParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionClearbitFindCompanyParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionClearbitFindCompanyParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionClearbitFindCompanyParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionClearbitFindCompanyParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionClearbitFindCompanyParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionClearbitFindPersonFieldID           = big.NewInt(1 << 0)
	flowActionClearbitFindPersonFieldAlias        = big.NewInt(1 << 1)
	flowActionClearbitFindPersonFieldAllowFailure = big.NewInt(1 << 2)
	flowActionClearbitFindPersonFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionClearbitFindPersonFieldParams       = big.NewInt(1 << 4)
)

type FlowActionClearbitFindPerson struct {
	ID           string                              `json:"id" url:"id"`
	Alias        *string                             `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                               `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                               `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionClearbitFindPersonParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionClearbitFindPerson) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionClearbitFindPerson) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionClearbitFindPerson) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionClearbitFindPerson) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionClearbitFindPerson) GetParams() *FlowActionClearbitFindPersonParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionClearbitFindPerson) Type() string {
	return f.type_
}

func (f *FlowActionClearbitFindPerson) Action() string {
	return f.action
}

func (f *FlowActionClearbitFindPerson) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionClearbitFindPerson) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionClearbitFindPerson) SetID(id string) {
	f.ID = id
	f.require(flowActionClearbitFindPersonFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionClearbitFindPerson) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionClearbitFindPersonFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionClearbitFindPerson) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionClearbitFindPersonFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionClearbitFindPerson) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionClearbitFindPersonFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionClearbitFindPerson) SetParams(params *FlowActionClearbitFindPersonParams) {
	f.Params = params
	f.require(flowActionClearbitFindPersonFieldParams)
}

func (f *FlowActionClearbitFindPerson) UnmarshalJSON(data []byte) error {
	type embed FlowActionClearbitFindPerson
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionClearbitFindPerson(unmarshaler.embed)
	if unmarshaler.Type != "CLEARBIT" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "CLEARBIT", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "FIND_PERSON" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "FIND_PERSON", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionClearbitFindPerson) MarshalJSON() ([]byte, error) {
	type embed FlowActionClearbitFindPerson
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "CLEARBIT",
		Action: "FIND_PERSON",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionClearbitFindPerson) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionClearbitFindPersonParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionClearbitFindPersonParamsFieldEmail        = big.NewInt(1 << 1)
)

type FlowActionClearbitFindPersonParams struct {
	ConnectionID string `json:"connection_id" url:"connection_id"`
	Email        string `json:"email" url:"email"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionClearbitFindPersonParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionClearbitFindPersonParams) GetEmail() string {
	if f == nil {
		return ""
	}
	return f.Email
}

func (f *FlowActionClearbitFindPersonParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionClearbitFindPersonParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionClearbitFindPersonParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionClearbitFindPersonParamsFieldConnectionID)
}

// SetEmail sets the Email field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionClearbitFindPersonParams) SetEmail(email string) {
	f.Email = email
	f.require(flowActionClearbitFindPersonParamsFieldEmail)
}

func (f *FlowActionClearbitFindPersonParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionClearbitFindPersonParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionClearbitFindPersonParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionClearbitFindPersonParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionClearbitFindPersonParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionClearbitFindPersonParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionEmail = *FlowActionEmailVerifyEmail

var (
	flowActionEmailVerifyEmailFieldID           = big.NewInt(1 << 0)
	flowActionEmailVerifyEmailFieldAlias        = big.NewInt(1 << 1)
	flowActionEmailVerifyEmailFieldAllowFailure = big.NewInt(1 << 2)
	flowActionEmailVerifyEmailFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionEmailVerifyEmailFieldParams       = big.NewInt(1 << 4)
)

type FlowActionEmailVerifyEmail struct {
	ID           string                            `json:"id" url:"id"`
	Alias        *string                           `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                             `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                             `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionEmailVerifyEmailParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionEmailVerifyEmail) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionEmailVerifyEmail) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionEmailVerifyEmail) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionEmailVerifyEmail) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionEmailVerifyEmail) GetParams() *FlowActionEmailVerifyEmailParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionEmailVerifyEmail) Type() string {
	return f.type_
}

func (f *FlowActionEmailVerifyEmail) Action() string {
	return f.action
}

func (f *FlowActionEmailVerifyEmail) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionEmailVerifyEmail) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionEmailVerifyEmail) SetID(id string) {
	f.ID = id
	f.require(flowActionEmailVerifyEmailFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionEmailVerifyEmail) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionEmailVerifyEmailFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionEmailVerifyEmail) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionEmailVerifyEmailFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionEmailVerifyEmail) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionEmailVerifyEmailFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionEmailVerifyEmail) SetParams(params *FlowActionEmailVerifyEmailParams) {
	f.Params = params
	f.require(flowActionEmailVerifyEmailFieldParams)
}

func (f *FlowActionEmailVerifyEmail) UnmarshalJSON(data []byte) error {
	type embed FlowActionEmailVerifyEmail
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionEmailVerifyEmail(unmarshaler.embed)
	if unmarshaler.Type != "EMAIL" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "EMAIL", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "VERIFY_EMAIL" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "VERIFY_EMAIL", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionEmailVerifyEmail) MarshalJSON() ([]byte, error) {
	type embed FlowActionEmailVerifyEmail
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "EMAIL",
		Action: "VERIFY_EMAIL",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionEmailVerifyEmail) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionEmailVerifyEmailParamsFieldEmail = big.NewInt(1 << 0)
	flowActionEmailVerifyEmailParamsFieldRules = big.NewInt(1 << 1)
)

type FlowActionEmailVerifyEmailParams struct {
	Email string                                 `json:"email" url:"email"`
	Rules *FlowActionEmailVerifyEmailParamsRules `json:"rules,omitempty" url:"rules,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionEmailVerifyEmailParams) GetEmail() string {
	if f == nil {
		return ""
	}
	return f.Email
}

func (f *FlowActionEmailVerifyEmailParams) GetRules() FlowActionEmailVerifyEmailParamsRules {
	if f == nil || f.Rules == nil {
		return FlowActionEmailVerifyEmailParamsRules{}
	}
	return *f.Rules
}

func (f *FlowActionEmailVerifyEmailParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionEmailVerifyEmailParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetEmail sets the Email field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionEmailVerifyEmailParams) SetEmail(email string) {
	f.Email = email
	f.require(flowActionEmailVerifyEmailParamsFieldEmail)
}

// SetRules sets the Rules field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionEmailVerifyEmailParams) SetRules(rules *FlowActionEmailVerifyEmailParamsRules) {
	f.Rules = rules
	f.require(flowActionEmailVerifyEmailParamsFieldRules)
}

func (f *FlowActionEmailVerifyEmailParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionEmailVerifyEmailParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionEmailVerifyEmailParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionEmailVerifyEmailParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionEmailVerifyEmailParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionEmailVerifyEmailParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionEmailVerifyEmailParamsRulesFieldRequireMxRecord       = big.NewInt(1 << 0)
	flowActionEmailVerifyEmailParamsRulesFieldBlockAliases          = big.NewInt(1 << 1)
	flowActionEmailVerifyEmailParamsRulesFieldBlockFreeEmails       = big.NewInt(1 << 2)
	flowActionEmailVerifyEmailParamsRulesFieldBlockDisposableEmails = big.NewInt(1 << 3)
	flowActionEmailVerifyEmailParamsRulesFieldBlocklist             = big.NewInt(1 << 4)
	flowActionEmailVerifyEmailParamsRulesFieldAllowlist             = big.NewInt(1 << 5)
)

type FlowActionEmailVerifyEmailParamsRules struct {
	RequireMxRecord       *bool    `json:"require_mx_record,omitempty" url:"require_mx_record,omitempty"`
	BlockAliases          *bool    `json:"block_aliases,omitempty" url:"block_aliases,omitempty"`
	BlockFreeEmails       *bool    `json:"block_free_emails,omitempty" url:"block_free_emails,omitempty"`
	BlockDisposableEmails *bool    `json:"block_disposable_emails,omitempty" url:"block_disposable_emails,omitempty"`
	Blocklist             []string `json:"blocklist,omitempty" url:"blocklist,omitempty"`
	Allowlist             []string `json:"allowlist,omitempty" url:"allowlist,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionEmailVerifyEmailParamsRules) GetRequireMxRecord() bool {
	if f == nil || f.RequireMxRecord == nil {
		return false
	}
	return *f.RequireMxRecord
}

func (f *FlowActionEmailVerifyEmailParamsRules) GetBlockAliases() bool {
	if f == nil || f.BlockAliases == nil {
		return false
	}
	return *f.BlockAliases
}

func (f *FlowActionEmailVerifyEmailParamsRules) GetBlockFreeEmails() bool {
	if f == nil || f.BlockFreeEmails == nil {
		return false
	}
	return *f.BlockFreeEmails
}

func (f *FlowActionEmailVerifyEmailParamsRules) GetBlockDisposableEmails() bool {
	if f == nil || f.BlockDisposableEmails == nil {
		return false
	}
	return *f.BlockDisposableEmails
}

func (f *FlowActionEmailVerifyEmailParamsRules) GetBlocklist() []string {
	if f == nil || f.Blocklist == nil {
		return nil
	}
	return f.Blocklist
}

func (f *FlowActionEmailVerifyEmailParamsRules) GetAllowlist() []string {
	if f == nil || f.Allowlist == nil {
		return nil
	}
	return f.Allowlist
}

func (f *FlowActionEmailVerifyEmailParamsRules) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionEmailVerifyEmailParamsRules) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetRequireMxRecord sets the RequireMxRecord field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionEmailVerifyEmailParamsRules) SetRequireMxRecord(requireMxRecord *bool) {
	f.RequireMxRecord = requireMxRecord
	f.require(flowActionEmailVerifyEmailParamsRulesFieldRequireMxRecord)
}

// SetBlockAliases sets the BlockAliases field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionEmailVerifyEmailParamsRules) SetBlockAliases(blockAliases *bool) {
	f.BlockAliases = blockAliases
	f.require(flowActionEmailVerifyEmailParamsRulesFieldBlockAliases)
}

// SetBlockFreeEmails sets the BlockFreeEmails field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionEmailVerifyEmailParamsRules) SetBlockFreeEmails(blockFreeEmails *bool) {
	f.BlockFreeEmails = blockFreeEmails
	f.require(flowActionEmailVerifyEmailParamsRulesFieldBlockFreeEmails)
}

// SetBlockDisposableEmails sets the BlockDisposableEmails field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionEmailVerifyEmailParamsRules) SetBlockDisposableEmails(blockDisposableEmails *bool) {
	f.BlockDisposableEmails = blockDisposableEmails
	f.require(flowActionEmailVerifyEmailParamsRulesFieldBlockDisposableEmails)
}

// SetBlocklist sets the Blocklist field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionEmailVerifyEmailParamsRules) SetBlocklist(blocklist []string) {
	f.Blocklist = blocklist
	f.require(flowActionEmailVerifyEmailParamsRulesFieldBlocklist)
}

// SetAllowlist sets the Allowlist field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionEmailVerifyEmailParamsRules) SetAllowlist(allowlist []string) {
	f.Allowlist = allowlist
	f.require(flowActionEmailVerifyEmailParamsRulesFieldAllowlist)
}

func (f *FlowActionEmailVerifyEmailParamsRules) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionEmailVerifyEmailParamsRules
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionEmailVerifyEmailParamsRules(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionEmailVerifyEmailParamsRules) MarshalJSON() ([]byte, error) {
	type embed FlowActionEmailVerifyEmailParamsRules
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionEmailVerifyEmailParamsRules) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionFlow struct {
	FlowActionFlowBooleanCondition *FlowActionFlowBooleanCondition
	FlowActionFlowDelayFlow        *FlowActionFlowDelayFlow
	FlowActionFlowDoNothing        *FlowActionFlowDoNothing
	FlowActionFlowErrorMessage     *FlowActionFlowErrorMessage
	FlowActionFlowMapValue         *FlowActionFlowMapValue
	FlowActionFlowReturnJSON       *FlowActionFlowReturnJSON
	FlowActionFlowStoreVars        *FlowActionFlowStoreVars

	typ string
}

func (f *FlowActionFlow) GetFlowActionFlowBooleanCondition() *FlowActionFlowBooleanCondition {
	if f == nil {
		return nil
	}
	return f.FlowActionFlowBooleanCondition
}

func (f *FlowActionFlow) GetFlowActionFlowDelayFlow() *FlowActionFlowDelayFlow {
	if f == nil {
		return nil
	}
	return f.FlowActionFlowDelayFlow
}

func (f *FlowActionFlow) GetFlowActionFlowDoNothing() *FlowActionFlowDoNothing {
	if f == nil {
		return nil
	}
	return f.FlowActionFlowDoNothing
}

func (f *FlowActionFlow) GetFlowActionFlowErrorMessage() *FlowActionFlowErrorMessage {
	if f == nil {
		return nil
	}
	return f.FlowActionFlowErrorMessage
}

func (f *FlowActionFlow) GetFlowActionFlowMapValue() *FlowActionFlowMapValue {
	if f == nil {
		return nil
	}
	return f.FlowActionFlowMapValue
}

func (f *FlowActionFlow) GetFlowActionFlowReturnJSON() *FlowActionFlowReturnJSON {
	if f == nil {
		return nil
	}
	return f.FlowActionFlowReturnJSON
}

func (f *FlowActionFlow) GetFlowActionFlowStoreVars() *FlowActionFlowStoreVars {
	if f == nil {
		return nil
	}
	return f.FlowActionFlowStoreVars
}

func (f *FlowActionFlow) UnmarshalJSON(data []byte) error {
	valueFlowActionFlowBooleanCondition := new(FlowActionFlowBooleanCondition)
	if err := json.Unmarshal(data, &valueFlowActionFlowBooleanCondition); err == nil {
		f.typ = "FlowActionFlowBooleanCondition"
		f.FlowActionFlowBooleanCondition = valueFlowActionFlowBooleanCondition
		return nil
	}
	valueFlowActionFlowDelayFlow := new(FlowActionFlowDelayFlow)
	if err := json.Unmarshal(data, &valueFlowActionFlowDelayFlow); err == nil {
		f.typ = "FlowActionFlowDelayFlow"
		f.FlowActionFlowDelayFlow = valueFlowActionFlowDelayFlow
		return nil
	}
	valueFlowActionFlowDoNothing := new(FlowActionFlowDoNothing)
	if err := json.Unmarshal(data, &valueFlowActionFlowDoNothing); err == nil {
		f.typ = "FlowActionFlowDoNothing"
		f.FlowActionFlowDoNothing = valueFlowActionFlowDoNothing
		return nil
	}
	valueFlowActionFlowErrorMessage := new(FlowActionFlowErrorMessage)
	if err := json.Unmarshal(data, &valueFlowActionFlowErrorMessage); err == nil {
		f.typ = "FlowActionFlowErrorMessage"
		f.FlowActionFlowErrorMessage = valueFlowActionFlowErrorMessage
		return nil
	}
	valueFlowActionFlowMapValue := new(FlowActionFlowMapValue)
	if err := json.Unmarshal(data, &valueFlowActionFlowMapValue); err == nil {
		f.typ = "FlowActionFlowMapValue"
		f.FlowActionFlowMapValue = valueFlowActionFlowMapValue
		return nil
	}
	valueFlowActionFlowReturnJSON := new(FlowActionFlowReturnJSON)
	if err := json.Unmarshal(data, &valueFlowActionFlowReturnJSON); err == nil {
		f.typ = "FlowActionFlowReturnJSON"
		f.FlowActionFlowReturnJSON = valueFlowActionFlowReturnJSON
		return nil
	}
	valueFlowActionFlowStoreVars := new(FlowActionFlowStoreVars)
	if err := json.Unmarshal(data, &valueFlowActionFlowStoreVars); err == nil {
		f.typ = "FlowActionFlowStoreVars"
		f.FlowActionFlowStoreVars = valueFlowActionFlowStoreVars
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionFlow) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionFlowBooleanCondition" || f.FlowActionFlowBooleanCondition != nil {
		return json.Marshal(f.FlowActionFlowBooleanCondition)
	}
	if f.typ == "FlowActionFlowDelayFlow" || f.FlowActionFlowDelayFlow != nil {
		return json.Marshal(f.FlowActionFlowDelayFlow)
	}
	if f.typ == "FlowActionFlowDoNothing" || f.FlowActionFlowDoNothing != nil {
		return json.Marshal(f.FlowActionFlowDoNothing)
	}
	if f.typ == "FlowActionFlowErrorMessage" || f.FlowActionFlowErrorMessage != nil {
		return json.Marshal(f.FlowActionFlowErrorMessage)
	}
	if f.typ == "FlowActionFlowMapValue" || f.FlowActionFlowMapValue != nil {
		return json.Marshal(f.FlowActionFlowMapValue)
	}
	if f.typ == "FlowActionFlowReturnJSON" || f.FlowActionFlowReturnJSON != nil {
		return json.Marshal(f.FlowActionFlowReturnJSON)
	}
	if f.typ == "FlowActionFlowStoreVars" || f.FlowActionFlowStoreVars != nil {
		return json.Marshal(f.FlowActionFlowStoreVars)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionFlowVisitor interface {
	VisitFlowActionFlowBooleanCondition(*FlowActionFlowBooleanCondition) error
	VisitFlowActionFlowDelayFlow(*FlowActionFlowDelayFlow) error
	VisitFlowActionFlowDoNothing(*FlowActionFlowDoNothing) error
	VisitFlowActionFlowErrorMessage(*FlowActionFlowErrorMessage) error
	VisitFlowActionFlowMapValue(*FlowActionFlowMapValue) error
	VisitFlowActionFlowReturnJSON(*FlowActionFlowReturnJSON) error
	VisitFlowActionFlowStoreVars(*FlowActionFlowStoreVars) error
}

func (f *FlowActionFlow) Accept(visitor FlowActionFlowVisitor) error {
	if f.typ == "FlowActionFlowBooleanCondition" || f.FlowActionFlowBooleanCondition != nil {
		return visitor.VisitFlowActionFlowBooleanCondition(f.FlowActionFlowBooleanCondition)
	}
	if f.typ == "FlowActionFlowDelayFlow" || f.FlowActionFlowDelayFlow != nil {
		return visitor.VisitFlowActionFlowDelayFlow(f.FlowActionFlowDelayFlow)
	}
	if f.typ == "FlowActionFlowDoNothing" || f.FlowActionFlowDoNothing != nil {
		return visitor.VisitFlowActionFlowDoNothing(f.FlowActionFlowDoNothing)
	}
	if f.typ == "FlowActionFlowErrorMessage" || f.FlowActionFlowErrorMessage != nil {
		return visitor.VisitFlowActionFlowErrorMessage(f.FlowActionFlowErrorMessage)
	}
	if f.typ == "FlowActionFlowMapValue" || f.FlowActionFlowMapValue != nil {
		return visitor.VisitFlowActionFlowMapValue(f.FlowActionFlowMapValue)
	}
	if f.typ == "FlowActionFlowReturnJSON" || f.FlowActionFlowReturnJSON != nil {
		return visitor.VisitFlowActionFlowReturnJSON(f.FlowActionFlowReturnJSON)
	}
	if f.typ == "FlowActionFlowStoreVars" || f.FlowActionFlowStoreVars != nil {
		return visitor.VisitFlowActionFlowStoreVars(f.FlowActionFlowStoreVars)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionFlowBooleanConditionFieldID           = big.NewInt(1 << 0)
	flowActionFlowBooleanConditionFieldAlias        = big.NewInt(1 << 1)
	flowActionFlowBooleanConditionFieldAllowFailure = big.NewInt(1 << 2)
	flowActionFlowBooleanConditionFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionFlowBooleanConditionFieldParams       = big.NewInt(1 << 4)
)

type FlowActionFlowBooleanCondition struct {
	ID           string                                `json:"id" url:"id"`
	Alias        *string                               `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                 `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                 `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionFlowBooleanConditionParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionFlowBooleanCondition) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionFlowBooleanCondition) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionFlowBooleanCondition) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionFlowBooleanCondition) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionFlowBooleanCondition) GetParams() *FlowActionFlowBooleanConditionParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionFlowBooleanCondition) Type() string {
	return f.type_
}

func (f *FlowActionFlowBooleanCondition) Action() string {
	return f.action
}

func (f *FlowActionFlowBooleanCondition) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionFlowBooleanCondition) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowBooleanCondition) SetID(id string) {
	f.ID = id
	f.require(flowActionFlowBooleanConditionFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowBooleanCondition) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionFlowBooleanConditionFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowBooleanCondition) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionFlowBooleanConditionFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowBooleanCondition) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionFlowBooleanConditionFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowBooleanCondition) SetParams(params *FlowActionFlowBooleanConditionParams) {
	f.Params = params
	f.require(flowActionFlowBooleanConditionFieldParams)
}

func (f *FlowActionFlowBooleanCondition) UnmarshalJSON(data []byte) error {
	type embed FlowActionFlowBooleanCondition
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionFlowBooleanCondition(unmarshaler.embed)
	if unmarshaler.Type != "FLOW" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "FLOW", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "BOOLEAN_CONDITION" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "BOOLEAN_CONDITION", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionFlowBooleanCondition) MarshalJSON() ([]byte, error) {
	type embed FlowActionFlowBooleanCondition
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "FLOW",
		Action: "BOOLEAN_CONDITION",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionFlowBooleanCondition) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionFlowBooleanConditionParamsFieldThen = big.NewInt(1 << 0)
	flowActionFlowBooleanConditionParamsFieldElse = big.NewInt(1 << 1)
)

type FlowActionFlowBooleanConditionParams struct {
	Then []*FlowAction `json:"then,omitempty" url:"then,omitempty"`
	Else []*FlowAction `json:"else,omitempty" url:"else,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionFlowBooleanConditionParams) GetThen() []*FlowAction {
	if f == nil || f.Then == nil {
		return nil
	}
	return f.Then
}

func (f *FlowActionFlowBooleanConditionParams) GetElse() []*FlowAction {
	if f == nil || f.Else == nil {
		return nil
	}
	return f.Else
}

func (f *FlowActionFlowBooleanConditionParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionFlowBooleanConditionParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetThen sets the Then field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowBooleanConditionParams) SetThen(then []*FlowAction) {
	f.Then = then
	f.require(flowActionFlowBooleanConditionParamsFieldThen)
}

// SetElse sets the Else field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowBooleanConditionParams) SetElse(else_ []*FlowAction) {
	f.Else = else_
	f.require(flowActionFlowBooleanConditionParamsFieldElse)
}

func (f *FlowActionFlowBooleanConditionParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionFlowBooleanConditionParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionFlowBooleanConditionParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionFlowBooleanConditionParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionFlowBooleanConditionParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionFlowBooleanConditionParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionFlowDelayFlowFieldID           = big.NewInt(1 << 0)
	flowActionFlowDelayFlowFieldAlias        = big.NewInt(1 << 1)
	flowActionFlowDelayFlowFieldAllowFailure = big.NewInt(1 << 2)
	flowActionFlowDelayFlowFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionFlowDelayFlowFieldParams       = big.NewInt(1 << 4)
)

type FlowActionFlowDelayFlow struct {
	ID           string                         `json:"id" url:"id"`
	Alias        *string                        `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                          `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                          `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionFlowDelayFlowParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionFlowDelayFlow) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionFlowDelayFlow) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionFlowDelayFlow) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionFlowDelayFlow) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionFlowDelayFlow) GetParams() *FlowActionFlowDelayFlowParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionFlowDelayFlow) Type() string {
	return f.type_
}

func (f *FlowActionFlowDelayFlow) Action() string {
	return f.action
}

func (f *FlowActionFlowDelayFlow) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionFlowDelayFlow) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowDelayFlow) SetID(id string) {
	f.ID = id
	f.require(flowActionFlowDelayFlowFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowDelayFlow) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionFlowDelayFlowFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowDelayFlow) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionFlowDelayFlowFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowDelayFlow) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionFlowDelayFlowFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowDelayFlow) SetParams(params *FlowActionFlowDelayFlowParams) {
	f.Params = params
	f.require(flowActionFlowDelayFlowFieldParams)
}

func (f *FlowActionFlowDelayFlow) UnmarshalJSON(data []byte) error {
	type embed FlowActionFlowDelayFlow
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionFlowDelayFlow(unmarshaler.embed)
	if unmarshaler.Type != "FLOW" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "FLOW", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "DELAY_FLOW" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "DELAY_FLOW", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionFlowDelayFlow) MarshalJSON() ([]byte, error) {
	type embed FlowActionFlowDelayFlow
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "FLOW",
		Action: "DELAY_FLOW",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionFlowDelayFlow) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionFlowDelayFlowParamsFieldNumber = big.NewInt(1 << 0)
	flowActionFlowDelayFlowParamsFieldUnits  = big.NewInt(1 << 1)
)

type FlowActionFlowDelayFlowParams struct {
	Number *FlowActionFlowDelayFlowParamsNumber `json:"number" url:"number"`
	Units  *FlowActionFlowDelayFlowParamsUnits  `json:"units,omitempty" url:"units,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionFlowDelayFlowParams) GetNumber() *FlowActionFlowDelayFlowParamsNumber {
	if f == nil {
		return nil
	}
	return f.Number
}

func (f *FlowActionFlowDelayFlowParams) GetUnits() FlowActionFlowDelayFlowParamsUnits {
	if f == nil || f.Units == nil {
		return ""
	}
	return *f.Units
}

func (f *FlowActionFlowDelayFlowParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionFlowDelayFlowParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetNumber sets the Number field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowDelayFlowParams) SetNumber(number *FlowActionFlowDelayFlowParamsNumber) {
	f.Number = number
	f.require(flowActionFlowDelayFlowParamsFieldNumber)
}

// SetUnits sets the Units field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowDelayFlowParams) SetUnits(units *FlowActionFlowDelayFlowParamsUnits) {
	f.Units = units
	f.require(flowActionFlowDelayFlowParamsFieldUnits)
}

func (f *FlowActionFlowDelayFlowParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionFlowDelayFlowParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionFlowDelayFlowParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionFlowDelayFlowParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionFlowDelayFlowParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionFlowDelayFlowParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionFlowDelayFlowParamsNumber struct {
	Integer int
	String  string

	typ string
}

func (f *FlowActionFlowDelayFlowParamsNumber) GetInteger() int {
	if f == nil {
		return 0
	}
	return f.Integer
}

func (f *FlowActionFlowDelayFlowParamsNumber) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionFlowDelayFlowParamsNumber) UnmarshalJSON(data []byte) error {
	var valueInteger int
	if err := json.Unmarshal(data, &valueInteger); err == nil {
		f.typ = "Integer"
		f.Integer = valueInteger
		return nil
	}
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionFlowDelayFlowParamsNumber) MarshalJSON() ([]byte, error) {
	if f.typ == "Integer" || f.Integer != 0 {
		return json.Marshal(f.Integer)
	}
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionFlowDelayFlowParamsNumberVisitor interface {
	VisitInteger(int) error
	VisitString(string) error
}

func (f *FlowActionFlowDelayFlowParamsNumber) Accept(visitor FlowActionFlowDelayFlowParamsNumberVisitor) error {
	if f.typ == "Integer" || f.Integer != 0 {
		return visitor.VisitInteger(f.Integer)
	}
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionFlowDelayFlowParamsUnits string

const (
	FlowActionFlowDelayFlowParamsUnitsSeconds FlowActionFlowDelayFlowParamsUnits = "SECONDS"
	FlowActionFlowDelayFlowParamsUnitsMinutes FlowActionFlowDelayFlowParamsUnits = "MINUTES"
	FlowActionFlowDelayFlowParamsUnitsHours   FlowActionFlowDelayFlowParamsUnits = "HOURS"
	FlowActionFlowDelayFlowParamsUnitsDays    FlowActionFlowDelayFlowParamsUnits = "DAYS"
)

func NewFlowActionFlowDelayFlowParamsUnitsFromString(s string) (FlowActionFlowDelayFlowParamsUnits, error) {
	switch s {
	case "SECONDS":
		return FlowActionFlowDelayFlowParamsUnitsSeconds, nil
	case "MINUTES":
		return FlowActionFlowDelayFlowParamsUnitsMinutes, nil
	case "HOURS":
		return FlowActionFlowDelayFlowParamsUnitsHours, nil
	case "DAYS":
		return FlowActionFlowDelayFlowParamsUnitsDays, nil
	}
	var t FlowActionFlowDelayFlowParamsUnits
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (f FlowActionFlowDelayFlowParamsUnits) Ptr() *FlowActionFlowDelayFlowParamsUnits {
	return &f
}

var (
	flowActionFlowDoNothingFieldID           = big.NewInt(1 << 0)
	flowActionFlowDoNothingFieldAlias        = big.NewInt(1 << 1)
	flowActionFlowDoNothingFieldAllowFailure = big.NewInt(1 << 2)
	flowActionFlowDoNothingFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionFlowDoNothingFieldParams       = big.NewInt(1 << 4)
)

type FlowActionFlowDoNothing struct {
	ID           string                         `json:"id" url:"id"`
	Alias        *string                        `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                          `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                          `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionFlowDoNothingParams `json:"params,omitempty" url:"params,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionFlowDoNothing) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionFlowDoNothing) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionFlowDoNothing) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionFlowDoNothing) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionFlowDoNothing) GetParams() FlowActionFlowDoNothingParams {
	if f == nil || f.Params == nil {
		return FlowActionFlowDoNothingParams{}
	}
	return *f.Params
}

func (f *FlowActionFlowDoNothing) Type() string {
	return f.type_
}

func (f *FlowActionFlowDoNothing) Action() string {
	return f.action
}

func (f *FlowActionFlowDoNothing) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionFlowDoNothing) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowDoNothing) SetID(id string) {
	f.ID = id
	f.require(flowActionFlowDoNothingFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowDoNothing) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionFlowDoNothingFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowDoNothing) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionFlowDoNothingFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowDoNothing) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionFlowDoNothingFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowDoNothing) SetParams(params *FlowActionFlowDoNothingParams) {
	f.Params = params
	f.require(flowActionFlowDoNothingFieldParams)
}

func (f *FlowActionFlowDoNothing) UnmarshalJSON(data []byte) error {
	type embed FlowActionFlowDoNothing
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionFlowDoNothing(unmarshaler.embed)
	if unmarshaler.Type != "FLOW" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "FLOW", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "DO_NOTHING" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "DO_NOTHING", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionFlowDoNothing) MarshalJSON() ([]byte, error) {
	type embed FlowActionFlowDoNothing
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "FLOW",
		Action: "DO_NOTHING",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionFlowDoNothing) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionFlowDoNothingParams struct {

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionFlowDoNothingParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionFlowDoNothingParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

func (f *FlowActionFlowDoNothingParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionFlowDoNothingParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionFlowDoNothingParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionFlowDoNothingParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionFlowDoNothingParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionFlowDoNothingParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionFlowErrorMessageFieldID           = big.NewInt(1 << 0)
	flowActionFlowErrorMessageFieldAlias        = big.NewInt(1 << 1)
	flowActionFlowErrorMessageFieldAllowFailure = big.NewInt(1 << 2)
	flowActionFlowErrorMessageFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionFlowErrorMessageFieldParams       = big.NewInt(1 << 4)
)

type FlowActionFlowErrorMessage struct {
	ID           string                            `json:"id" url:"id"`
	Alias        *string                           `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                             `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                             `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionFlowErrorMessageParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionFlowErrorMessage) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionFlowErrorMessage) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionFlowErrorMessage) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionFlowErrorMessage) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionFlowErrorMessage) GetParams() *FlowActionFlowErrorMessageParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionFlowErrorMessage) Type() string {
	return f.type_
}

func (f *FlowActionFlowErrorMessage) Action() string {
	return f.action
}

func (f *FlowActionFlowErrorMessage) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionFlowErrorMessage) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowErrorMessage) SetID(id string) {
	f.ID = id
	f.require(flowActionFlowErrorMessageFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowErrorMessage) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionFlowErrorMessageFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowErrorMessage) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionFlowErrorMessageFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowErrorMessage) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionFlowErrorMessageFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowErrorMessage) SetParams(params *FlowActionFlowErrorMessageParams) {
	f.Params = params
	f.require(flowActionFlowErrorMessageFieldParams)
}

func (f *FlowActionFlowErrorMessage) UnmarshalJSON(data []byte) error {
	type embed FlowActionFlowErrorMessage
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionFlowErrorMessage(unmarshaler.embed)
	if unmarshaler.Type != "FLOW" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "FLOW", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "ERROR_MESSAGE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "ERROR_MESSAGE", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionFlowErrorMessage) MarshalJSON() ([]byte, error) {
	type embed FlowActionFlowErrorMessage
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "FLOW",
		Action: "ERROR_MESSAGE",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionFlowErrorMessage) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionFlowErrorMessageParamsFieldMessage = big.NewInt(1 << 0)
)

type FlowActionFlowErrorMessageParams struct {
	Message string `json:"message" url:"message"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionFlowErrorMessageParams) GetMessage() string {
	if f == nil {
		return ""
	}
	return f.Message
}

func (f *FlowActionFlowErrorMessageParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionFlowErrorMessageParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetMessage sets the Message field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowErrorMessageParams) SetMessage(message string) {
	f.Message = message
	f.require(flowActionFlowErrorMessageParamsFieldMessage)
}

func (f *FlowActionFlowErrorMessageParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionFlowErrorMessageParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionFlowErrorMessageParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionFlowErrorMessageParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionFlowErrorMessageParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionFlowErrorMessageParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionFlowMapValueFieldID           = big.NewInt(1 << 0)
	flowActionFlowMapValueFieldAlias        = big.NewInt(1 << 1)
	flowActionFlowMapValueFieldAllowFailure = big.NewInt(1 << 2)
	flowActionFlowMapValueFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionFlowMapValueFieldParams       = big.NewInt(1 << 4)
)

type FlowActionFlowMapValue struct {
	ID           string                        `json:"id" url:"id"`
	Alias        *string                       `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                         `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                         `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionFlowMapValueParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionFlowMapValue) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionFlowMapValue) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionFlowMapValue) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionFlowMapValue) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionFlowMapValue) GetParams() *FlowActionFlowMapValueParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionFlowMapValue) Type() string {
	return f.type_
}

func (f *FlowActionFlowMapValue) Action() string {
	return f.action
}

func (f *FlowActionFlowMapValue) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionFlowMapValue) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowMapValue) SetID(id string) {
	f.ID = id
	f.require(flowActionFlowMapValueFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowMapValue) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionFlowMapValueFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowMapValue) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionFlowMapValueFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowMapValue) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionFlowMapValueFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowMapValue) SetParams(params *FlowActionFlowMapValueParams) {
	f.Params = params
	f.require(flowActionFlowMapValueFieldParams)
}

func (f *FlowActionFlowMapValue) UnmarshalJSON(data []byte) error {
	type embed FlowActionFlowMapValue
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionFlowMapValue(unmarshaler.embed)
	if unmarshaler.Type != "FLOW" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "FLOW", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "MAP_VALUE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "MAP_VALUE", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionFlowMapValue) MarshalJSON() ([]byte, error) {
	type embed FlowActionFlowMapValue
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "FLOW",
		Action: "MAP_VALUE",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionFlowMapValue) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionFlowMapValueParamsFieldInput    = big.NewInt(1 << 0)
	flowActionFlowMapValueParamsFieldCases    = big.NewInt(1 << 1)
	flowActionFlowMapValueParamsFieldFallback = big.NewInt(1 << 2)
)

type FlowActionFlowMapValueParams struct {
	Input    *FlowActionFlowMapValueParamsInput    `json:"input" url:"input"`
	Cases    *FlowActionFlowMapValueParamsCases    `json:"cases,omitempty" url:"cases,omitempty"`
	Fallback *FlowActionFlowMapValueParamsFallback `json:"fallback,omitempty" url:"fallback,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionFlowMapValueParams) GetInput() *FlowActionFlowMapValueParamsInput {
	if f == nil {
		return nil
	}
	return f.Input
}

func (f *FlowActionFlowMapValueParams) GetCases() FlowActionFlowMapValueParamsCases {
	if f == nil || f.Cases == nil {
		return nil
	}
	return *f.Cases
}

func (f *FlowActionFlowMapValueParams) GetFallback() FlowActionFlowMapValueParamsFallback {
	if f == nil || f.Fallback == nil {
		return FlowActionFlowMapValueParamsFallback{}
	}
	return *f.Fallback
}

func (f *FlowActionFlowMapValueParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionFlowMapValueParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetInput sets the Input field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowMapValueParams) SetInput(input *FlowActionFlowMapValueParamsInput) {
	f.Input = input
	f.require(flowActionFlowMapValueParamsFieldInput)
}

// SetCases sets the Cases field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowMapValueParams) SetCases(cases *FlowActionFlowMapValueParamsCases) {
	f.Cases = cases
	f.require(flowActionFlowMapValueParamsFieldCases)
}

// SetFallback sets the Fallback field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowMapValueParams) SetFallback(fallback *FlowActionFlowMapValueParamsFallback) {
	f.Fallback = fallback
	f.require(flowActionFlowMapValueParamsFieldFallback)
}

func (f *FlowActionFlowMapValueParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionFlowMapValueParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionFlowMapValueParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionFlowMapValueParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionFlowMapValueParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionFlowMapValueParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionFlowMapValueParamsCases = map[string]interface{}

type FlowActionFlowMapValueParamsFallback struct {
	String                                     string
	Double                                     float64
	FlowActionFlowMapValueParamsFallbackObject FlowActionFlowMapValueParamsFallbackObject
	UnknownList                                []interface{}

	typ string
}

func (f *FlowActionFlowMapValueParamsFallback) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionFlowMapValueParamsFallback) GetDouble() float64 {
	if f == nil {
		return 0
	}
	return f.Double
}

func (f *FlowActionFlowMapValueParamsFallback) GetFlowActionFlowMapValueParamsFallbackObject() FlowActionFlowMapValueParamsFallbackObject {
	if f == nil {
		return nil
	}
	return f.FlowActionFlowMapValueParamsFallbackObject
}

func (f *FlowActionFlowMapValueParamsFallback) GetUnknownList() []interface{} {
	if f == nil {
		return nil
	}
	return f.UnknownList
}

func (f *FlowActionFlowMapValueParamsFallback) UnmarshalJSON(data []byte) error {
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	var valueDouble float64
	if err := json.Unmarshal(data, &valueDouble); err == nil {
		f.typ = "Double"
		f.Double = valueDouble
		return nil
	}
	var valueFlowActionFlowMapValueParamsFallbackObject FlowActionFlowMapValueParamsFallbackObject
	if err := json.Unmarshal(data, &valueFlowActionFlowMapValueParamsFallbackObject); err == nil {
		f.typ = "FlowActionFlowMapValueParamsFallbackObject"
		f.FlowActionFlowMapValueParamsFallbackObject = valueFlowActionFlowMapValueParamsFallbackObject
		return nil
	}
	var valueUnknownList []interface{}
	if err := json.Unmarshal(data, &valueUnknownList); err == nil {
		f.typ = "UnknownList"
		f.UnknownList = valueUnknownList
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionFlowMapValueParamsFallback) MarshalJSON() ([]byte, error) {
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return json.Marshal(f.Double)
	}
	if f.typ == "FlowActionFlowMapValueParamsFallbackObject" || f.FlowActionFlowMapValueParamsFallbackObject != nil {
		return json.Marshal(f.FlowActionFlowMapValueParamsFallbackObject)
	}
	if f.typ == "UnknownList" || f.UnknownList != nil {
		return json.Marshal(f.UnknownList)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionFlowMapValueParamsFallbackVisitor interface {
	VisitString(string) error
	VisitDouble(float64) error
	VisitFlowActionFlowMapValueParamsFallbackObject(FlowActionFlowMapValueParamsFallbackObject) error
	VisitUnknownList([]interface{}) error
}

func (f *FlowActionFlowMapValueParamsFallback) Accept(visitor FlowActionFlowMapValueParamsFallbackVisitor) error {
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return visitor.VisitDouble(f.Double)
	}
	if f.typ == "FlowActionFlowMapValueParamsFallbackObject" || f.FlowActionFlowMapValueParamsFallbackObject != nil {
		return visitor.VisitFlowActionFlowMapValueParamsFallbackObject(f.FlowActionFlowMapValueParamsFallbackObject)
	}
	if f.typ == "UnknownList" || f.UnknownList != nil {
		return visitor.VisitUnknownList(f.UnknownList)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionFlowMapValueParamsFallbackObject = map[string]interface{}

type FlowActionFlowMapValueParamsInput struct {
	String string
	Double float64

	typ string
}

func (f *FlowActionFlowMapValueParamsInput) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionFlowMapValueParamsInput) GetDouble() float64 {
	if f == nil {
		return 0
	}
	return f.Double
}

func (f *FlowActionFlowMapValueParamsInput) UnmarshalJSON(data []byte) error {
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	var valueDouble float64
	if err := json.Unmarshal(data, &valueDouble); err == nil {
		f.typ = "Double"
		f.Double = valueDouble
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionFlowMapValueParamsInput) MarshalJSON() ([]byte, error) {
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return json.Marshal(f.Double)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionFlowMapValueParamsInputVisitor interface {
	VisitString(string) error
	VisitDouble(float64) error
}

func (f *FlowActionFlowMapValueParamsInput) Accept(visitor FlowActionFlowMapValueParamsInputVisitor) error {
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return visitor.VisitDouble(f.Double)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionFlowReturnJSONFieldID           = big.NewInt(1 << 0)
	flowActionFlowReturnJSONFieldAlias        = big.NewInt(1 << 1)
	flowActionFlowReturnJSONFieldAllowFailure = big.NewInt(1 << 2)
	flowActionFlowReturnJSONFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionFlowReturnJSONFieldParams       = big.NewInt(1 << 4)
)

type FlowActionFlowReturnJSON struct {
	ID           string                          `json:"id" url:"id"`
	Alias        *string                         `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                           `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                           `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionFlowReturnJSONParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionFlowReturnJSON) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionFlowReturnJSON) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionFlowReturnJSON) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionFlowReturnJSON) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionFlowReturnJSON) GetParams() *FlowActionFlowReturnJSONParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionFlowReturnJSON) Type() string {
	return f.type_
}

func (f *FlowActionFlowReturnJSON) Action() string {
	return f.action
}

func (f *FlowActionFlowReturnJSON) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionFlowReturnJSON) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowReturnJSON) SetID(id string) {
	f.ID = id
	f.require(flowActionFlowReturnJSONFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowReturnJSON) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionFlowReturnJSONFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowReturnJSON) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionFlowReturnJSONFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowReturnJSON) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionFlowReturnJSONFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowReturnJSON) SetParams(params *FlowActionFlowReturnJSONParams) {
	f.Params = params
	f.require(flowActionFlowReturnJSONFieldParams)
}

func (f *FlowActionFlowReturnJSON) UnmarshalJSON(data []byte) error {
	type embed FlowActionFlowReturnJSON
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionFlowReturnJSON(unmarshaler.embed)
	if unmarshaler.Type != "FLOW" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "FLOW", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "RETURN_JSON" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "RETURN_JSON", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionFlowReturnJSON) MarshalJSON() ([]byte, error) {
	type embed FlowActionFlowReturnJSON
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "FLOW",
		Action: "RETURN_JSON",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionFlowReturnJSON) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionFlowReturnJSONParamsFieldPayload = big.NewInt(1 << 0)
)

type FlowActionFlowReturnJSONParams struct {
	Payload *FlowActionFlowReturnJSONParamsPayload `json:"payload" url:"payload"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionFlowReturnJSONParams) GetPayload() *FlowActionFlowReturnJSONParamsPayload {
	if f == nil {
		return nil
	}
	return f.Payload
}

func (f *FlowActionFlowReturnJSONParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionFlowReturnJSONParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetPayload sets the Payload field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowReturnJSONParams) SetPayload(payload *FlowActionFlowReturnJSONParamsPayload) {
	f.Payload = payload
	f.require(flowActionFlowReturnJSONParamsFieldPayload)
}

func (f *FlowActionFlowReturnJSONParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionFlowReturnJSONParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionFlowReturnJSONParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionFlowReturnJSONParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionFlowReturnJSONParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionFlowReturnJSONParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionFlowReturnJSONParamsPayload struct {
	FlowActionFlowReturnJSONParamsPayloadObject FlowActionFlowReturnJSONParamsPayloadObject
	String                                      string

	typ string
}

func (f *FlowActionFlowReturnJSONParamsPayload) GetFlowActionFlowReturnJSONParamsPayloadObject() FlowActionFlowReturnJSONParamsPayloadObject {
	if f == nil {
		return nil
	}
	return f.FlowActionFlowReturnJSONParamsPayloadObject
}

func (f *FlowActionFlowReturnJSONParamsPayload) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionFlowReturnJSONParamsPayload) UnmarshalJSON(data []byte) error {
	var valueFlowActionFlowReturnJSONParamsPayloadObject FlowActionFlowReturnJSONParamsPayloadObject
	if err := json.Unmarshal(data, &valueFlowActionFlowReturnJSONParamsPayloadObject); err == nil {
		f.typ = "FlowActionFlowReturnJSONParamsPayloadObject"
		f.FlowActionFlowReturnJSONParamsPayloadObject = valueFlowActionFlowReturnJSONParamsPayloadObject
		return nil
	}
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionFlowReturnJSONParamsPayload) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionFlowReturnJSONParamsPayloadObject" || f.FlowActionFlowReturnJSONParamsPayloadObject != nil {
		return json.Marshal(f.FlowActionFlowReturnJSONParamsPayloadObject)
	}
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionFlowReturnJSONParamsPayloadVisitor interface {
	VisitFlowActionFlowReturnJSONParamsPayloadObject(FlowActionFlowReturnJSONParamsPayloadObject) error
	VisitString(string) error
}

func (f *FlowActionFlowReturnJSONParamsPayload) Accept(visitor FlowActionFlowReturnJSONParamsPayloadVisitor) error {
	if f.typ == "FlowActionFlowReturnJSONParamsPayloadObject" || f.FlowActionFlowReturnJSONParamsPayloadObject != nil {
		return visitor.VisitFlowActionFlowReturnJSONParamsPayloadObject(f.FlowActionFlowReturnJSONParamsPayloadObject)
	}
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionFlowReturnJSONParamsPayloadObject = map[string]interface{}

var (
	flowActionFlowStoreVarsFieldID           = big.NewInt(1 << 0)
	flowActionFlowStoreVarsFieldAlias        = big.NewInt(1 << 1)
	flowActionFlowStoreVarsFieldAllowFailure = big.NewInt(1 << 2)
	flowActionFlowStoreVarsFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionFlowStoreVarsFieldParams       = big.NewInt(1 << 4)
)

type FlowActionFlowStoreVars struct {
	ID           string                         `json:"id" url:"id"`
	Alias        *string                        `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                          `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                          `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionFlowStoreVarsParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionFlowStoreVars) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionFlowStoreVars) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionFlowStoreVars) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionFlowStoreVars) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionFlowStoreVars) GetParams() *FlowActionFlowStoreVarsParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionFlowStoreVars) Type() string {
	return f.type_
}

func (f *FlowActionFlowStoreVars) Action() string {
	return f.action
}

func (f *FlowActionFlowStoreVars) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionFlowStoreVars) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowStoreVars) SetID(id string) {
	f.ID = id
	f.require(flowActionFlowStoreVarsFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowStoreVars) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionFlowStoreVarsFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowStoreVars) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionFlowStoreVarsFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowStoreVars) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionFlowStoreVarsFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowStoreVars) SetParams(params *FlowActionFlowStoreVarsParams) {
	f.Params = params
	f.require(flowActionFlowStoreVarsFieldParams)
}

func (f *FlowActionFlowStoreVars) UnmarshalJSON(data []byte) error {
	type embed FlowActionFlowStoreVars
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionFlowStoreVars(unmarshaler.embed)
	if unmarshaler.Type != "FLOW" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "FLOW", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "STORE_VARS" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "STORE_VARS", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionFlowStoreVars) MarshalJSON() ([]byte, error) {
	type embed FlowActionFlowStoreVars
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "FLOW",
		Action: "STORE_VARS",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionFlowStoreVars) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionFlowStoreVarsParamsFieldVars = big.NewInt(1 << 0)
)

type FlowActionFlowStoreVarsParams struct {
	Vars FlowActionFlowStoreVarsParamsVars `json:"vars" url:"vars"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionFlowStoreVarsParams) GetVars() FlowActionFlowStoreVarsParamsVars {
	if f == nil {
		return nil
	}
	return f.Vars
}

func (f *FlowActionFlowStoreVarsParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionFlowStoreVarsParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetVars sets the Vars field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionFlowStoreVarsParams) SetVars(vars FlowActionFlowStoreVarsParamsVars) {
	f.Vars = vars
	f.require(flowActionFlowStoreVarsParamsFieldVars)
}

func (f *FlowActionFlowStoreVarsParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionFlowStoreVarsParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionFlowStoreVarsParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionFlowStoreVarsParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionFlowStoreVarsParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionFlowStoreVarsParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionFlowStoreVarsParamsVars = map[string]interface{}

type FlowActionGoogleSheets = *FlowActionGoogleSheetsAddRow

var (
	flowActionGoogleSheetsAddRowFieldID           = big.NewInt(1 << 0)
	flowActionGoogleSheetsAddRowFieldAlias        = big.NewInt(1 << 1)
	flowActionGoogleSheetsAddRowFieldAllowFailure = big.NewInt(1 << 2)
	flowActionGoogleSheetsAddRowFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionGoogleSheetsAddRowFieldParams       = big.NewInt(1 << 4)
)

type FlowActionGoogleSheetsAddRow struct {
	ID           string                              `json:"id" url:"id"`
	Alias        *string                             `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                               `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                               `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionGoogleSheetsAddRowParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionGoogleSheetsAddRow) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionGoogleSheetsAddRow) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionGoogleSheetsAddRow) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionGoogleSheetsAddRow) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionGoogleSheetsAddRow) GetParams() *FlowActionGoogleSheetsAddRowParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionGoogleSheetsAddRow) Type() string {
	return f.type_
}

func (f *FlowActionGoogleSheetsAddRow) Action() string {
	return f.action
}

func (f *FlowActionGoogleSheetsAddRow) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionGoogleSheetsAddRow) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionGoogleSheetsAddRow) SetID(id string) {
	f.ID = id
	f.require(flowActionGoogleSheetsAddRowFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionGoogleSheetsAddRow) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionGoogleSheetsAddRowFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionGoogleSheetsAddRow) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionGoogleSheetsAddRowFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionGoogleSheetsAddRow) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionGoogleSheetsAddRowFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionGoogleSheetsAddRow) SetParams(params *FlowActionGoogleSheetsAddRowParams) {
	f.Params = params
	f.require(flowActionGoogleSheetsAddRowFieldParams)
}

func (f *FlowActionGoogleSheetsAddRow) UnmarshalJSON(data []byte) error {
	type embed FlowActionGoogleSheetsAddRow
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionGoogleSheetsAddRow(unmarshaler.embed)
	if unmarshaler.Type != "GOOGLE_SHEETS" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "GOOGLE_SHEETS", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "ADD_ROW" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "ADD_ROW", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionGoogleSheetsAddRow) MarshalJSON() ([]byte, error) {
	type embed FlowActionGoogleSheetsAddRow
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "GOOGLE_SHEETS",
		Action: "ADD_ROW",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionGoogleSheetsAddRow) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionGoogleSheetsAddRowParamsFieldConnectionID  = big.NewInt(1 << 0)
	flowActionGoogleSheetsAddRowParamsFieldSpreadsheetID = big.NewInt(1 << 1)
	flowActionGoogleSheetsAddRowParamsFieldSheetID       = big.NewInt(1 << 2)
	flowActionGoogleSheetsAddRowParamsFieldValues        = big.NewInt(1 << 3)
)

type FlowActionGoogleSheetsAddRowParams struct {
	ConnectionID  string                                     `json:"connection_id" url:"connection_id"`
	SpreadsheetID string                                     `json:"spreadsheet_id" url:"spreadsheet_id"`
	SheetID       *FlowActionGoogleSheetsAddRowParamsSheetID `json:"sheet_id,omitempty" url:"sheet_id,omitempty"`
	Values        *FlowActionGoogleSheetsAddRowParamsValues  `json:"values,omitempty" url:"values,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionGoogleSheetsAddRowParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionGoogleSheetsAddRowParams) GetSpreadsheetID() string {
	if f == nil {
		return ""
	}
	return f.SpreadsheetID
}

func (f *FlowActionGoogleSheetsAddRowParams) GetSheetID() FlowActionGoogleSheetsAddRowParamsSheetID {
	if f == nil || f.SheetID == nil {
		return FlowActionGoogleSheetsAddRowParamsSheetID{}
	}
	return *f.SheetID
}

func (f *FlowActionGoogleSheetsAddRowParams) GetValues() FlowActionGoogleSheetsAddRowParamsValues {
	if f == nil || f.Values == nil {
		return nil
	}
	return *f.Values
}

func (f *FlowActionGoogleSheetsAddRowParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionGoogleSheetsAddRowParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionGoogleSheetsAddRowParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionGoogleSheetsAddRowParamsFieldConnectionID)
}

// SetSpreadsheetID sets the SpreadsheetID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionGoogleSheetsAddRowParams) SetSpreadsheetID(spreadsheetID string) {
	f.SpreadsheetID = spreadsheetID
	f.require(flowActionGoogleSheetsAddRowParamsFieldSpreadsheetID)
}

// SetSheetID sets the SheetID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionGoogleSheetsAddRowParams) SetSheetID(sheetID *FlowActionGoogleSheetsAddRowParamsSheetID) {
	f.SheetID = sheetID
	f.require(flowActionGoogleSheetsAddRowParamsFieldSheetID)
}

// SetValues sets the Values field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionGoogleSheetsAddRowParams) SetValues(values *FlowActionGoogleSheetsAddRowParamsValues) {
	f.Values = values
	f.require(flowActionGoogleSheetsAddRowParamsFieldValues)
}

func (f *FlowActionGoogleSheetsAddRowParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionGoogleSheetsAddRowParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionGoogleSheetsAddRowParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionGoogleSheetsAddRowParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionGoogleSheetsAddRowParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionGoogleSheetsAddRowParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionGoogleSheetsAddRowParamsSheetID struct {
	Integer int
	String  string

	typ string
}

func (f *FlowActionGoogleSheetsAddRowParamsSheetID) GetInteger() int {
	if f == nil {
		return 0
	}
	return f.Integer
}

func (f *FlowActionGoogleSheetsAddRowParamsSheetID) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionGoogleSheetsAddRowParamsSheetID) UnmarshalJSON(data []byte) error {
	var valueInteger int
	if err := json.Unmarshal(data, &valueInteger); err == nil {
		f.typ = "Integer"
		f.Integer = valueInteger
		return nil
	}
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionGoogleSheetsAddRowParamsSheetID) MarshalJSON() ([]byte, error) {
	if f.typ == "Integer" || f.Integer != 0 {
		return json.Marshal(f.Integer)
	}
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionGoogleSheetsAddRowParamsSheetIDVisitor interface {
	VisitInteger(int) error
	VisitString(string) error
}

func (f *FlowActionGoogleSheetsAddRowParamsSheetID) Accept(visitor FlowActionGoogleSheetsAddRowParamsSheetIDVisitor) error {
	if f.typ == "Integer" || f.Integer != 0 {
		return visitor.VisitInteger(f.Integer)
	}
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionGoogleSheetsAddRowParamsValues = []*string

type FlowActionHTTP = *FlowActionHTTPSendRequest

var (
	flowActionHTTPSendRequestFieldID           = big.NewInt(1 << 0)
	flowActionHTTPSendRequestFieldAlias        = big.NewInt(1 << 1)
	flowActionHTTPSendRequestFieldAllowFailure = big.NewInt(1 << 2)
	flowActionHTTPSendRequestFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionHTTPSendRequestFieldParams       = big.NewInt(1 << 4)
)

type FlowActionHTTPSendRequest struct {
	ID           string                           `json:"id" url:"id"`
	Alias        *string                          `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                            `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                            `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionHTTPSendRequestParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionHTTPSendRequest) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionHTTPSendRequest) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionHTTPSendRequest) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionHTTPSendRequest) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionHTTPSendRequest) GetParams() *FlowActionHTTPSendRequestParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionHTTPSendRequest) Type() string {
	return f.type_
}

func (f *FlowActionHTTPSendRequest) Action() string {
	return f.action
}

func (f *FlowActionHTTPSendRequest) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionHTTPSendRequest) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHTTPSendRequest) SetID(id string) {
	f.ID = id
	f.require(flowActionHTTPSendRequestFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHTTPSendRequest) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionHTTPSendRequestFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHTTPSendRequest) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionHTTPSendRequestFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHTTPSendRequest) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionHTTPSendRequestFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHTTPSendRequest) SetParams(params *FlowActionHTTPSendRequestParams) {
	f.Params = params
	f.require(flowActionHTTPSendRequestFieldParams)
}

func (f *FlowActionHTTPSendRequest) UnmarshalJSON(data []byte) error {
	type embed FlowActionHTTPSendRequest
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionHTTPSendRequest(unmarshaler.embed)
	if unmarshaler.Type != "HTTP" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "HTTP", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "SEND_REQUEST" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SEND_REQUEST", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionHTTPSendRequest) MarshalJSON() ([]byte, error) {
	type embed FlowActionHTTPSendRequest
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "HTTP",
		Action: "SEND_REQUEST",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionHTTPSendRequest) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionHTTPSendRequestParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionHTTPSendRequestParamsFieldURL          = big.NewInt(1 << 1)
	flowActionHTTPSendRequestParamsFieldMethod       = big.NewInt(1 << 2)
	flowActionHTTPSendRequestParamsFieldHeaders      = big.NewInt(1 << 3)
	flowActionHTTPSendRequestParamsFieldBasic        = big.NewInt(1 << 4)
	flowActionHTTPSendRequestParamsFieldParams       = big.NewInt(1 << 5)
	flowActionHTTPSendRequestParamsFieldPayload      = big.NewInt(1 << 6)
	flowActionHTTPSendRequestParamsFieldContentType  = big.NewInt(1 << 7)
)

type FlowActionHTTPSendRequestParams struct {
	ConnectionID *string                                     `json:"connection_id,omitempty" url:"connection_id,omitempty"`
	URL          string                                      `json:"url" url:"url"`
	Method       *FlowActionHTTPSendRequestParamsMethod      `json:"method,omitempty" url:"method,omitempty"`
	Headers      *FlowActionHTTPSendRequestParamsHeaders     `json:"headers,omitempty" url:"headers,omitempty"`
	Basic        *FlowActionHTTPSendRequestParamsBasicAuth   `json:"basic,omitempty" url:"basic,omitempty"`
	Params       *FlowActionHTTPSendRequestParamsQueryParams `json:"params,omitempty" url:"params,omitempty"`
	Payload      *FlowActionHTTPSendRequestParamsPayload     `json:"payload,omitempty" url:"payload,omitempty"`
	ContentType  *FlowActionHTTPSendRequestParamsContentType `json:"content_type,omitempty" url:"content_type,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionHTTPSendRequestParams) GetConnectionID() string {
	if f == nil || f.ConnectionID == nil {
		return ""
	}
	return *f.ConnectionID
}

func (f *FlowActionHTTPSendRequestParams) GetURL() string {
	if f == nil {
		return ""
	}
	return f.URL
}

func (f *FlowActionHTTPSendRequestParams) GetMethod() FlowActionHTTPSendRequestParamsMethod {
	if f == nil || f.Method == nil {
		return ""
	}
	return *f.Method
}

func (f *FlowActionHTTPSendRequestParams) GetHeaders() FlowActionHTTPSendRequestParamsHeaders {
	if f == nil || f.Headers == nil {
		return nil
	}
	return *f.Headers
}

func (f *FlowActionHTTPSendRequestParams) GetBasic() FlowActionHTTPSendRequestParamsBasicAuth {
	if f == nil || f.Basic == nil {
		return FlowActionHTTPSendRequestParamsBasicAuth{}
	}
	return *f.Basic
}

func (f *FlowActionHTTPSendRequestParams) GetParams() FlowActionHTTPSendRequestParamsQueryParams {
	if f == nil || f.Params == nil {
		return nil
	}
	return *f.Params
}

func (f *FlowActionHTTPSendRequestParams) GetPayload() FlowActionHTTPSendRequestParamsPayload {
	if f == nil || f.Payload == nil {
		return FlowActionHTTPSendRequestParamsPayload{}
	}
	return *f.Payload
}

func (f *FlowActionHTTPSendRequestParams) GetContentType() FlowActionHTTPSendRequestParamsContentType {
	if f == nil || f.ContentType == nil {
		return ""
	}
	return *f.ContentType
}

func (f *FlowActionHTTPSendRequestParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionHTTPSendRequestParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHTTPSendRequestParams) SetConnectionID(connectionID *string) {
	f.ConnectionID = connectionID
	f.require(flowActionHTTPSendRequestParamsFieldConnectionID)
}

// SetURL sets the URL field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHTTPSendRequestParams) SetURL(url string) {
	f.URL = url
	f.require(flowActionHTTPSendRequestParamsFieldURL)
}

// SetMethod sets the Method field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHTTPSendRequestParams) SetMethod(method *FlowActionHTTPSendRequestParamsMethod) {
	f.Method = method
	f.require(flowActionHTTPSendRequestParamsFieldMethod)
}

// SetHeaders sets the Headers field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHTTPSendRequestParams) SetHeaders(headers *FlowActionHTTPSendRequestParamsHeaders) {
	f.Headers = headers
	f.require(flowActionHTTPSendRequestParamsFieldHeaders)
}

// SetBasic sets the Basic field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHTTPSendRequestParams) SetBasic(basic *FlowActionHTTPSendRequestParamsBasicAuth) {
	f.Basic = basic
	f.require(flowActionHTTPSendRequestParamsFieldBasic)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHTTPSendRequestParams) SetParams(params *FlowActionHTTPSendRequestParamsQueryParams) {
	f.Params = params
	f.require(flowActionHTTPSendRequestParamsFieldParams)
}

// SetPayload sets the Payload field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHTTPSendRequestParams) SetPayload(payload *FlowActionHTTPSendRequestParamsPayload) {
	f.Payload = payload
	f.require(flowActionHTTPSendRequestParamsFieldPayload)
}

// SetContentType sets the ContentType field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHTTPSendRequestParams) SetContentType(contentType *FlowActionHTTPSendRequestParamsContentType) {
	f.ContentType = contentType
	f.require(flowActionHTTPSendRequestParamsFieldContentType)
}

func (f *FlowActionHTTPSendRequestParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionHTTPSendRequestParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionHTTPSendRequestParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionHTTPSendRequestParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionHTTPSendRequestParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionHTTPSendRequestParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionHTTPSendRequestParamsBasicAuthFieldUsername = big.NewInt(1 << 0)
	flowActionHTTPSendRequestParamsBasicAuthFieldPassword = big.NewInt(1 << 1)
)

type FlowActionHTTPSendRequestParamsBasicAuth struct {
	Username *string `json:"username,omitempty" url:"username,omitempty"`
	Password *string `json:"password,omitempty" url:"password,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionHTTPSendRequestParamsBasicAuth) GetUsername() string {
	if f == nil || f.Username == nil {
		return ""
	}
	return *f.Username
}

func (f *FlowActionHTTPSendRequestParamsBasicAuth) GetPassword() string {
	if f == nil || f.Password == nil {
		return ""
	}
	return *f.Password
}

func (f *FlowActionHTTPSendRequestParamsBasicAuth) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionHTTPSendRequestParamsBasicAuth) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetUsername sets the Username field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHTTPSendRequestParamsBasicAuth) SetUsername(username *string) {
	f.Username = username
	f.require(flowActionHTTPSendRequestParamsBasicAuthFieldUsername)
}

// SetPassword sets the Password field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHTTPSendRequestParamsBasicAuth) SetPassword(password *string) {
	f.Password = password
	f.require(flowActionHTTPSendRequestParamsBasicAuthFieldPassword)
}

func (f *FlowActionHTTPSendRequestParamsBasicAuth) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionHTTPSendRequestParamsBasicAuth
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionHTTPSendRequestParamsBasicAuth(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionHTTPSendRequestParamsBasicAuth) MarshalJSON() ([]byte, error) {
	type embed FlowActionHTTPSendRequestParamsBasicAuth
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionHTTPSendRequestParamsBasicAuth) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionHTTPSendRequestParamsContentType string

const (
	FlowActionHTTPSendRequestParamsContentTypeJSON FlowActionHTTPSendRequestParamsContentType = "JSON"
	FlowActionHTTPSendRequestParamsContentTypeForm FlowActionHTTPSendRequestParamsContentType = "FORM"
	FlowActionHTTPSendRequestParamsContentTypeXML  FlowActionHTTPSendRequestParamsContentType = "XML"
)

func NewFlowActionHTTPSendRequestParamsContentTypeFromString(s string) (FlowActionHTTPSendRequestParamsContentType, error) {
	switch s {
	case "JSON":
		return FlowActionHTTPSendRequestParamsContentTypeJSON, nil
	case "FORM":
		return FlowActionHTTPSendRequestParamsContentTypeForm, nil
	case "XML":
		return FlowActionHTTPSendRequestParamsContentTypeXML, nil
	}
	var t FlowActionHTTPSendRequestParamsContentType
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (f FlowActionHTTPSendRequestParamsContentType) Ptr() *FlowActionHTTPSendRequestParamsContentType {
	return &f
}

type FlowActionHTTPSendRequestParamsHeaders = map[string]interface{}

type FlowActionHTTPSendRequestParamsMethod string

const (
	FlowActionHTTPSendRequestParamsMethodGet    FlowActionHTTPSendRequestParamsMethod = "GET"
	FlowActionHTTPSendRequestParamsMethodPost   FlowActionHTTPSendRequestParamsMethod = "POST"
	FlowActionHTTPSendRequestParamsMethodPut    FlowActionHTTPSendRequestParamsMethod = "PUT"
	FlowActionHTTPSendRequestParamsMethodPatch  FlowActionHTTPSendRequestParamsMethod = "PATCH"
	FlowActionHTTPSendRequestParamsMethodDelete FlowActionHTTPSendRequestParamsMethod = "DELETE"
)

func NewFlowActionHTTPSendRequestParamsMethodFromString(s string) (FlowActionHTTPSendRequestParamsMethod, error) {
	switch s {
	case "GET":
		return FlowActionHTTPSendRequestParamsMethodGet, nil
	case "POST":
		return FlowActionHTTPSendRequestParamsMethodPost, nil
	case "PUT":
		return FlowActionHTTPSendRequestParamsMethodPut, nil
	case "PATCH":
		return FlowActionHTTPSendRequestParamsMethodPatch, nil
	case "DELETE":
		return FlowActionHTTPSendRequestParamsMethodDelete, nil
	}
	var t FlowActionHTTPSendRequestParamsMethod
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (f FlowActionHTTPSendRequestParamsMethod) Ptr() *FlowActionHTTPSendRequestParamsMethod {
	return &f
}

type FlowActionHTTPSendRequestParamsPayload struct {
	String                                       string
	UnknownList                                  []interface{}
	FlowActionHTTPSendRequestParamsPayloadObject FlowActionHTTPSendRequestParamsPayloadObject

	typ string
}

func (f *FlowActionHTTPSendRequestParamsPayload) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionHTTPSendRequestParamsPayload) GetUnknownList() []interface{} {
	if f == nil {
		return nil
	}
	return f.UnknownList
}

func (f *FlowActionHTTPSendRequestParamsPayload) GetFlowActionHTTPSendRequestParamsPayloadObject() FlowActionHTTPSendRequestParamsPayloadObject {
	if f == nil {
		return nil
	}
	return f.FlowActionHTTPSendRequestParamsPayloadObject
}

func (f *FlowActionHTTPSendRequestParamsPayload) UnmarshalJSON(data []byte) error {
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	var valueUnknownList []interface{}
	if err := json.Unmarshal(data, &valueUnknownList); err == nil {
		f.typ = "UnknownList"
		f.UnknownList = valueUnknownList
		return nil
	}
	var valueFlowActionHTTPSendRequestParamsPayloadObject FlowActionHTTPSendRequestParamsPayloadObject
	if err := json.Unmarshal(data, &valueFlowActionHTTPSendRequestParamsPayloadObject); err == nil {
		f.typ = "FlowActionHTTPSendRequestParamsPayloadObject"
		f.FlowActionHTTPSendRequestParamsPayloadObject = valueFlowActionHTTPSendRequestParamsPayloadObject
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionHTTPSendRequestParamsPayload) MarshalJSON() ([]byte, error) {
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	if f.typ == "UnknownList" || f.UnknownList != nil {
		return json.Marshal(f.UnknownList)
	}
	if f.typ == "FlowActionHTTPSendRequestParamsPayloadObject" || f.FlowActionHTTPSendRequestParamsPayloadObject != nil {
		return json.Marshal(f.FlowActionHTTPSendRequestParamsPayloadObject)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionHTTPSendRequestParamsPayloadVisitor interface {
	VisitString(string) error
	VisitUnknownList([]interface{}) error
	VisitFlowActionHTTPSendRequestParamsPayloadObject(FlowActionHTTPSendRequestParamsPayloadObject) error
}

func (f *FlowActionHTTPSendRequestParamsPayload) Accept(visitor FlowActionHTTPSendRequestParamsPayloadVisitor) error {
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	if f.typ == "UnknownList" || f.UnknownList != nil {
		return visitor.VisitUnknownList(f.UnknownList)
	}
	if f.typ == "FlowActionHTTPSendRequestParamsPayloadObject" || f.FlowActionHTTPSendRequestParamsPayloadObject != nil {
		return visitor.VisitFlowActionHTTPSendRequestParamsPayloadObject(f.FlowActionHTTPSendRequestParamsPayloadObject)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionHTTPSendRequestParamsPayloadObject = map[string]interface{}

type FlowActionHTTPSendRequestParamsQueryParams = map[string]*FlowActionHTTPSendRequestParamsQueryParamsValue

type FlowActionHTTPSendRequestParamsQueryParamsValue struct {
	Double float64
	String string

	typ string
}

func (f *FlowActionHTTPSendRequestParamsQueryParamsValue) GetDouble() float64 {
	if f == nil {
		return 0
	}
	return f.Double
}

func (f *FlowActionHTTPSendRequestParamsQueryParamsValue) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionHTTPSendRequestParamsQueryParamsValue) UnmarshalJSON(data []byte) error {
	var valueDouble float64
	if err := json.Unmarshal(data, &valueDouble); err == nil {
		f.typ = "Double"
		f.Double = valueDouble
		return nil
	}
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionHTTPSendRequestParamsQueryParamsValue) MarshalJSON() ([]byte, error) {
	if f.typ == "Double" || f.Double != 0 {
		return json.Marshal(f.Double)
	}
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionHTTPSendRequestParamsQueryParamsValueVisitor interface {
	VisitDouble(float64) error
	VisitString(string) error
}

func (f *FlowActionHTTPSendRequestParamsQueryParamsValue) Accept(visitor FlowActionHTTPSendRequestParamsQueryParamsValueVisitor) error {
	if f.typ == "Double" || f.Double != 0 {
		return visitor.VisitDouble(f.Double)
	}
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionHubspot struct {
	FlowActionHubspotEnrollContact *FlowActionHubspotEnrollContact
	FlowActionHubspotGetContact    *FlowActionHubspotGetContact
	FlowActionHubspotUpsertContact *FlowActionHubspotUpsertContact

	typ string
}

func (f *FlowActionHubspot) GetFlowActionHubspotEnrollContact() *FlowActionHubspotEnrollContact {
	if f == nil {
		return nil
	}
	return f.FlowActionHubspotEnrollContact
}

func (f *FlowActionHubspot) GetFlowActionHubspotGetContact() *FlowActionHubspotGetContact {
	if f == nil {
		return nil
	}
	return f.FlowActionHubspotGetContact
}

func (f *FlowActionHubspot) GetFlowActionHubspotUpsertContact() *FlowActionHubspotUpsertContact {
	if f == nil {
		return nil
	}
	return f.FlowActionHubspotUpsertContact
}

func (f *FlowActionHubspot) UnmarshalJSON(data []byte) error {
	valueFlowActionHubspotEnrollContact := new(FlowActionHubspotEnrollContact)
	if err := json.Unmarshal(data, &valueFlowActionHubspotEnrollContact); err == nil {
		f.typ = "FlowActionHubspotEnrollContact"
		f.FlowActionHubspotEnrollContact = valueFlowActionHubspotEnrollContact
		return nil
	}
	valueFlowActionHubspotGetContact := new(FlowActionHubspotGetContact)
	if err := json.Unmarshal(data, &valueFlowActionHubspotGetContact); err == nil {
		f.typ = "FlowActionHubspotGetContact"
		f.FlowActionHubspotGetContact = valueFlowActionHubspotGetContact
		return nil
	}
	valueFlowActionHubspotUpsertContact := new(FlowActionHubspotUpsertContact)
	if err := json.Unmarshal(data, &valueFlowActionHubspotUpsertContact); err == nil {
		f.typ = "FlowActionHubspotUpsertContact"
		f.FlowActionHubspotUpsertContact = valueFlowActionHubspotUpsertContact
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionHubspot) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionHubspotEnrollContact" || f.FlowActionHubspotEnrollContact != nil {
		return json.Marshal(f.FlowActionHubspotEnrollContact)
	}
	if f.typ == "FlowActionHubspotGetContact" || f.FlowActionHubspotGetContact != nil {
		return json.Marshal(f.FlowActionHubspotGetContact)
	}
	if f.typ == "FlowActionHubspotUpsertContact" || f.FlowActionHubspotUpsertContact != nil {
		return json.Marshal(f.FlowActionHubspotUpsertContact)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionHubspotVisitor interface {
	VisitFlowActionHubspotEnrollContact(*FlowActionHubspotEnrollContact) error
	VisitFlowActionHubspotGetContact(*FlowActionHubspotGetContact) error
	VisitFlowActionHubspotUpsertContact(*FlowActionHubspotUpsertContact) error
}

func (f *FlowActionHubspot) Accept(visitor FlowActionHubspotVisitor) error {
	if f.typ == "FlowActionHubspotEnrollContact" || f.FlowActionHubspotEnrollContact != nil {
		return visitor.VisitFlowActionHubspotEnrollContact(f.FlowActionHubspotEnrollContact)
	}
	if f.typ == "FlowActionHubspotGetContact" || f.FlowActionHubspotGetContact != nil {
		return visitor.VisitFlowActionHubspotGetContact(f.FlowActionHubspotGetContact)
	}
	if f.typ == "FlowActionHubspotUpsertContact" || f.FlowActionHubspotUpsertContact != nil {
		return visitor.VisitFlowActionHubspotUpsertContact(f.FlowActionHubspotUpsertContact)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionHubspotEnrollContactFieldID           = big.NewInt(1 << 0)
	flowActionHubspotEnrollContactFieldAlias        = big.NewInt(1 << 1)
	flowActionHubspotEnrollContactFieldAllowFailure = big.NewInt(1 << 2)
	flowActionHubspotEnrollContactFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionHubspotEnrollContactFieldParams       = big.NewInt(1 << 4)
)

type FlowActionHubspotEnrollContact struct {
	ID           string                                `json:"id" url:"id"`
	Alias        *string                               `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                 `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                 `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionHubspotEnrollContactParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionHubspotEnrollContact) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionHubspotEnrollContact) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionHubspotEnrollContact) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionHubspotEnrollContact) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionHubspotEnrollContact) GetParams() *FlowActionHubspotEnrollContactParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionHubspotEnrollContact) Type() string {
	return f.type_
}

func (f *FlowActionHubspotEnrollContact) Action() string {
	return f.action
}

func (f *FlowActionHubspotEnrollContact) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionHubspotEnrollContact) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotEnrollContact) SetID(id string) {
	f.ID = id
	f.require(flowActionHubspotEnrollContactFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotEnrollContact) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionHubspotEnrollContactFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotEnrollContact) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionHubspotEnrollContactFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotEnrollContact) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionHubspotEnrollContactFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotEnrollContact) SetParams(params *FlowActionHubspotEnrollContactParams) {
	f.Params = params
	f.require(flowActionHubspotEnrollContactFieldParams)
}

func (f *FlowActionHubspotEnrollContact) UnmarshalJSON(data []byte) error {
	type embed FlowActionHubspotEnrollContact
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionHubspotEnrollContact(unmarshaler.embed)
	if unmarshaler.Type != "HUBSPOT" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "HUBSPOT", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "ENROLL_CONTACT" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "ENROLL_CONTACT", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionHubspotEnrollContact) MarshalJSON() ([]byte, error) {
	type embed FlowActionHubspotEnrollContact
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "HUBSPOT",
		Action: "ENROLL_CONTACT",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionHubspotEnrollContact) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionHubspotEnrollContactParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionHubspotEnrollContactParamsFieldEmail        = big.NewInt(1 << 1)
	flowActionHubspotEnrollContactParamsFieldWorkflowID   = big.NewInt(1 << 2)
)

type FlowActionHubspotEnrollContactParams struct {
	ConnectionID string                                          `json:"connection_id" url:"connection_id"`
	Email        string                                          `json:"email" url:"email"`
	WorkflowID   *FlowActionHubspotEnrollContactParamsWorkflowID `json:"workflow_id" url:"workflow_id"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionHubspotEnrollContactParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionHubspotEnrollContactParams) GetEmail() string {
	if f == nil {
		return ""
	}
	return f.Email
}

func (f *FlowActionHubspotEnrollContactParams) GetWorkflowID() *FlowActionHubspotEnrollContactParamsWorkflowID {
	if f == nil {
		return nil
	}
	return f.WorkflowID
}

func (f *FlowActionHubspotEnrollContactParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionHubspotEnrollContactParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotEnrollContactParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionHubspotEnrollContactParamsFieldConnectionID)
}

// SetEmail sets the Email field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotEnrollContactParams) SetEmail(email string) {
	f.Email = email
	f.require(flowActionHubspotEnrollContactParamsFieldEmail)
}

// SetWorkflowID sets the WorkflowID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotEnrollContactParams) SetWorkflowID(workflowID *FlowActionHubspotEnrollContactParamsWorkflowID) {
	f.WorkflowID = workflowID
	f.require(flowActionHubspotEnrollContactParamsFieldWorkflowID)
}

func (f *FlowActionHubspotEnrollContactParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionHubspotEnrollContactParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionHubspotEnrollContactParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionHubspotEnrollContactParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionHubspotEnrollContactParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionHubspotEnrollContactParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionHubspotEnrollContactParamsWorkflowID struct {
	String  string
	Integer int

	typ string
}

func (f *FlowActionHubspotEnrollContactParamsWorkflowID) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionHubspotEnrollContactParamsWorkflowID) GetInteger() int {
	if f == nil {
		return 0
	}
	return f.Integer
}

func (f *FlowActionHubspotEnrollContactParamsWorkflowID) UnmarshalJSON(data []byte) error {
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	var valueInteger int
	if err := json.Unmarshal(data, &valueInteger); err == nil {
		f.typ = "Integer"
		f.Integer = valueInteger
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionHubspotEnrollContactParamsWorkflowID) MarshalJSON() ([]byte, error) {
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	if f.typ == "Integer" || f.Integer != 0 {
		return json.Marshal(f.Integer)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionHubspotEnrollContactParamsWorkflowIDVisitor interface {
	VisitString(string) error
	VisitInteger(int) error
}

func (f *FlowActionHubspotEnrollContactParamsWorkflowID) Accept(visitor FlowActionHubspotEnrollContactParamsWorkflowIDVisitor) error {
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	if f.typ == "Integer" || f.Integer != 0 {
		return visitor.VisitInteger(f.Integer)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionHubspotGetContactFieldID           = big.NewInt(1 << 0)
	flowActionHubspotGetContactFieldAlias        = big.NewInt(1 << 1)
	flowActionHubspotGetContactFieldAllowFailure = big.NewInt(1 << 2)
	flowActionHubspotGetContactFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionHubspotGetContactFieldParams       = big.NewInt(1 << 4)
)

type FlowActionHubspotGetContact struct {
	ID           string                             `json:"id" url:"id"`
	Alias        *string                            `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                              `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                              `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionHubspotGetContactParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionHubspotGetContact) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionHubspotGetContact) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionHubspotGetContact) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionHubspotGetContact) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionHubspotGetContact) GetParams() *FlowActionHubspotGetContactParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionHubspotGetContact) Type() string {
	return f.type_
}

func (f *FlowActionHubspotGetContact) Action() string {
	return f.action
}

func (f *FlowActionHubspotGetContact) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionHubspotGetContact) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotGetContact) SetID(id string) {
	f.ID = id
	f.require(flowActionHubspotGetContactFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotGetContact) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionHubspotGetContactFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotGetContact) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionHubspotGetContactFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotGetContact) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionHubspotGetContactFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotGetContact) SetParams(params *FlowActionHubspotGetContactParams) {
	f.Params = params
	f.require(flowActionHubspotGetContactFieldParams)
}

func (f *FlowActionHubspotGetContact) UnmarshalJSON(data []byte) error {
	type embed FlowActionHubspotGetContact
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionHubspotGetContact(unmarshaler.embed)
	if unmarshaler.Type != "HUBSPOT" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "HUBSPOT", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "GET_CONTACT" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "GET_CONTACT", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionHubspotGetContact) MarshalJSON() ([]byte, error) {
	type embed FlowActionHubspotGetContact
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "HUBSPOT",
		Action: "GET_CONTACT",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionHubspotGetContact) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionHubspotGetContactParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionHubspotGetContactParamsFieldEmail        = big.NewInt(1 << 1)
)

type FlowActionHubspotGetContactParams struct {
	ConnectionID string `json:"connection_id" url:"connection_id"`
	Email        string `json:"email" url:"email"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionHubspotGetContactParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionHubspotGetContactParams) GetEmail() string {
	if f == nil {
		return ""
	}
	return f.Email
}

func (f *FlowActionHubspotGetContactParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionHubspotGetContactParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotGetContactParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionHubspotGetContactParamsFieldConnectionID)
}

// SetEmail sets the Email field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotGetContactParams) SetEmail(email string) {
	f.Email = email
	f.require(flowActionHubspotGetContactParamsFieldEmail)
}

func (f *FlowActionHubspotGetContactParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionHubspotGetContactParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionHubspotGetContactParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionHubspotGetContactParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionHubspotGetContactParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionHubspotGetContactParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionHubspotUpsertContactFieldID           = big.NewInt(1 << 0)
	flowActionHubspotUpsertContactFieldAlias        = big.NewInt(1 << 1)
	flowActionHubspotUpsertContactFieldAllowFailure = big.NewInt(1 << 2)
	flowActionHubspotUpsertContactFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionHubspotUpsertContactFieldParams       = big.NewInt(1 << 4)
)

type FlowActionHubspotUpsertContact struct {
	ID           string                                `json:"id" url:"id"`
	Alias        *string                               `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                 `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                 `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionHubspotUpsertContactParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionHubspotUpsertContact) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionHubspotUpsertContact) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionHubspotUpsertContact) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionHubspotUpsertContact) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionHubspotUpsertContact) GetParams() *FlowActionHubspotUpsertContactParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionHubspotUpsertContact) Type() string {
	return f.type_
}

func (f *FlowActionHubspotUpsertContact) Action() string {
	return f.action
}

func (f *FlowActionHubspotUpsertContact) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionHubspotUpsertContact) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotUpsertContact) SetID(id string) {
	f.ID = id
	f.require(flowActionHubspotUpsertContactFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotUpsertContact) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionHubspotUpsertContactFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotUpsertContact) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionHubspotUpsertContactFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotUpsertContact) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionHubspotUpsertContactFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotUpsertContact) SetParams(params *FlowActionHubspotUpsertContactParams) {
	f.Params = params
	f.require(flowActionHubspotUpsertContactFieldParams)
}

func (f *FlowActionHubspotUpsertContact) UnmarshalJSON(data []byte) error {
	type embed FlowActionHubspotUpsertContact
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionHubspotUpsertContact(unmarshaler.embed)
	if unmarshaler.Type != "HUBSPOT" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "HUBSPOT", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "UPSERT_CONTACT" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "UPSERT_CONTACT", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionHubspotUpsertContact) MarshalJSON() ([]byte, error) {
	type embed FlowActionHubspotUpsertContact
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "HUBSPOT",
		Action: "UPSERT_CONTACT",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionHubspotUpsertContact) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionHubspotUpsertContactParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionHubspotUpsertContactParamsFieldEmail        = big.NewInt(1 << 1)
	flowActionHubspotUpsertContactParamsFieldProperties   = big.NewInt(1 << 2)
)

type FlowActionHubspotUpsertContactParams struct {
	ConnectionID string                                          `json:"connection_id" url:"connection_id"`
	Email        string                                          `json:"email" url:"email"`
	Properties   []*FlowActionHubspotUpsertContactParamsProperty `json:"properties,omitempty" url:"properties,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	ExtraProperties map[string]interface{} `json:"-" url:"-"`

	rawJSON json.RawMessage
}

func (f *FlowActionHubspotUpsertContactParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionHubspotUpsertContactParams) GetEmail() string {
	if f == nil {
		return ""
	}
	return f.Email
}

func (f *FlowActionHubspotUpsertContactParams) GetProperties() []*FlowActionHubspotUpsertContactParamsProperty {
	if f == nil || f.Properties == nil {
		return nil
	}
	return f.Properties
}

func (f *FlowActionHubspotUpsertContactParams) GetExtraProperties() map[string]interface{} {
	return f.ExtraProperties
}

func (f *FlowActionHubspotUpsertContactParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotUpsertContactParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionHubspotUpsertContactParamsFieldConnectionID)
}

// SetEmail sets the Email field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotUpsertContactParams) SetEmail(email string) {
	f.Email = email
	f.require(flowActionHubspotUpsertContactParamsFieldEmail)
}

// SetProperties sets the Properties field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotUpsertContactParams) SetProperties(properties []*FlowActionHubspotUpsertContactParamsProperty) {
	f.Properties = properties
	f.require(flowActionHubspotUpsertContactParamsFieldProperties)
}

func (f *FlowActionHubspotUpsertContactParams) UnmarshalJSON(data []byte) error {
	type embed FlowActionHubspotUpsertContactParams
	var unmarshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionHubspotUpsertContactParams(unmarshaler.embed)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.ExtraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionHubspotUpsertContactParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionHubspotUpsertContactParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return internal.MarshalJSONWithExtraProperties(explicitMarshaler, f.ExtraProperties)
}

func (f *FlowActionHubspotUpsertContactParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionHubspotUpsertContactParamsPropertyFieldProperty = big.NewInt(1 << 0)
)

type FlowActionHubspotUpsertContactParamsProperty struct {
	Property string `json:"property" url:"property"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionHubspotUpsertContactParamsProperty) GetProperty() string {
	if f == nil {
		return ""
	}
	return f.Property
}

func (f *FlowActionHubspotUpsertContactParamsProperty) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionHubspotUpsertContactParamsProperty) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetProperty sets the Property field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionHubspotUpsertContactParamsProperty) SetProperty(property string) {
	f.Property = property
	f.require(flowActionHubspotUpsertContactParamsPropertyFieldProperty)
}

func (f *FlowActionHubspotUpsertContactParamsProperty) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionHubspotUpsertContactParamsProperty
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionHubspotUpsertContactParamsProperty(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionHubspotUpsertContactParamsProperty) MarshalJSON() ([]byte, error) {
	type embed FlowActionHubspotUpsertContactParamsProperty
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionHubspotUpsertContactParamsProperty) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionJSON struct {
	FlowActionJSONCreateJSON    *FlowActionJSONCreateJSON
	FlowActionJSONParseJSON     *FlowActionJSONParseJSON
	FlowActionJSONSerializeJSON *FlowActionJSONSerializeJSON

	typ string
}

func (f *FlowActionJSON) GetFlowActionJSONCreateJSON() *FlowActionJSONCreateJSON {
	if f == nil {
		return nil
	}
	return f.FlowActionJSONCreateJSON
}

func (f *FlowActionJSON) GetFlowActionJSONParseJSON() *FlowActionJSONParseJSON {
	if f == nil {
		return nil
	}
	return f.FlowActionJSONParseJSON
}

func (f *FlowActionJSON) GetFlowActionJSONSerializeJSON() *FlowActionJSONSerializeJSON {
	if f == nil {
		return nil
	}
	return f.FlowActionJSONSerializeJSON
}

func (f *FlowActionJSON) UnmarshalJSON(data []byte) error {
	valueFlowActionJSONCreateJSON := new(FlowActionJSONCreateJSON)
	if err := json.Unmarshal(data, &valueFlowActionJSONCreateJSON); err == nil {
		f.typ = "FlowActionJSONCreateJSON"
		f.FlowActionJSONCreateJSON = valueFlowActionJSONCreateJSON
		return nil
	}
	valueFlowActionJSONParseJSON := new(FlowActionJSONParseJSON)
	if err := json.Unmarshal(data, &valueFlowActionJSONParseJSON); err == nil {
		f.typ = "FlowActionJSONParseJSON"
		f.FlowActionJSONParseJSON = valueFlowActionJSONParseJSON
		return nil
	}
	valueFlowActionJSONSerializeJSON := new(FlowActionJSONSerializeJSON)
	if err := json.Unmarshal(data, &valueFlowActionJSONSerializeJSON); err == nil {
		f.typ = "FlowActionJSONSerializeJSON"
		f.FlowActionJSONSerializeJSON = valueFlowActionJSONSerializeJSON
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionJSON) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionJSONCreateJSON" || f.FlowActionJSONCreateJSON != nil {
		return json.Marshal(f.FlowActionJSONCreateJSON)
	}
	if f.typ == "FlowActionJSONParseJSON" || f.FlowActionJSONParseJSON != nil {
		return json.Marshal(f.FlowActionJSONParseJSON)
	}
	if f.typ == "FlowActionJSONSerializeJSON" || f.FlowActionJSONSerializeJSON != nil {
		return json.Marshal(f.FlowActionJSONSerializeJSON)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionJSONVisitor interface {
	VisitFlowActionJSONCreateJSON(*FlowActionJSONCreateJSON) error
	VisitFlowActionJSONParseJSON(*FlowActionJSONParseJSON) error
	VisitFlowActionJSONSerializeJSON(*FlowActionJSONSerializeJSON) error
}

func (f *FlowActionJSON) Accept(visitor FlowActionJSONVisitor) error {
	if f.typ == "FlowActionJSONCreateJSON" || f.FlowActionJSONCreateJSON != nil {
		return visitor.VisitFlowActionJSONCreateJSON(f.FlowActionJSONCreateJSON)
	}
	if f.typ == "FlowActionJSONParseJSON" || f.FlowActionJSONParseJSON != nil {
		return visitor.VisitFlowActionJSONParseJSON(f.FlowActionJSONParseJSON)
	}
	if f.typ == "FlowActionJSONSerializeJSON" || f.FlowActionJSONSerializeJSON != nil {
		return visitor.VisitFlowActionJSONSerializeJSON(f.FlowActionJSONSerializeJSON)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionJSONCreateJSONFieldID           = big.NewInt(1 << 0)
	flowActionJSONCreateJSONFieldAlias        = big.NewInt(1 << 1)
	flowActionJSONCreateJSONFieldAllowFailure = big.NewInt(1 << 2)
	flowActionJSONCreateJSONFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionJSONCreateJSONFieldParams       = big.NewInt(1 << 4)
)

type FlowActionJSONCreateJSON struct {
	ID           string                          `json:"id" url:"id"`
	Alias        *string                         `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                           `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                           `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionJSONCreateJSONParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionJSONCreateJSON) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionJSONCreateJSON) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionJSONCreateJSON) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionJSONCreateJSON) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionJSONCreateJSON) GetParams() *FlowActionJSONCreateJSONParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionJSONCreateJSON) Type() string {
	return f.type_
}

func (f *FlowActionJSONCreateJSON) Action() string {
	return f.action
}

func (f *FlowActionJSONCreateJSON) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionJSONCreateJSON) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONCreateJSON) SetID(id string) {
	f.ID = id
	f.require(flowActionJSONCreateJSONFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONCreateJSON) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionJSONCreateJSONFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONCreateJSON) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionJSONCreateJSONFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONCreateJSON) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionJSONCreateJSONFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONCreateJSON) SetParams(params *FlowActionJSONCreateJSONParams) {
	f.Params = params
	f.require(flowActionJSONCreateJSONFieldParams)
}

func (f *FlowActionJSONCreateJSON) UnmarshalJSON(data []byte) error {
	type embed FlowActionJSONCreateJSON
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionJSONCreateJSON(unmarshaler.embed)
	if unmarshaler.Type != "JSON" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "JSON", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "CREATE_JSON" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "CREATE_JSON", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionJSONCreateJSON) MarshalJSON() ([]byte, error) {
	type embed FlowActionJSONCreateJSON
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "JSON",
		Action: "CREATE_JSON",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionJSONCreateJSON) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionJSONCreateJSONParamsFieldObject = big.NewInt(1 << 0)
)

type FlowActionJSONCreateJSONParams struct {
	Object FlowActionJSONCreateJSONParamsObject `json:"object" url:"object"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionJSONCreateJSONParams) GetObject() FlowActionJSONCreateJSONParamsObject {
	if f == nil {
		return nil
	}
	return f.Object
}

func (f *FlowActionJSONCreateJSONParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionJSONCreateJSONParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetObject sets the Object field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONCreateJSONParams) SetObject(object FlowActionJSONCreateJSONParamsObject) {
	f.Object = object
	f.require(flowActionJSONCreateJSONParamsFieldObject)
}

func (f *FlowActionJSONCreateJSONParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionJSONCreateJSONParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionJSONCreateJSONParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionJSONCreateJSONParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionJSONCreateJSONParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionJSONCreateJSONParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionJSONCreateJSONParamsObject = map[string]interface{}

var (
	flowActionJSONParseJSONFieldID           = big.NewInt(1 << 0)
	flowActionJSONParseJSONFieldAlias        = big.NewInt(1 << 1)
	flowActionJSONParseJSONFieldAllowFailure = big.NewInt(1 << 2)
	flowActionJSONParseJSONFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionJSONParseJSONFieldParams       = big.NewInt(1 << 4)
)

type FlowActionJSONParseJSON struct {
	ID           string                         `json:"id" url:"id"`
	Alias        *string                        `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                          `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                          `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionJSONParseJSONParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionJSONParseJSON) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionJSONParseJSON) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionJSONParseJSON) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionJSONParseJSON) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionJSONParseJSON) GetParams() *FlowActionJSONParseJSONParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionJSONParseJSON) Type() string {
	return f.type_
}

func (f *FlowActionJSONParseJSON) Action() string {
	return f.action
}

func (f *FlowActionJSONParseJSON) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionJSONParseJSON) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONParseJSON) SetID(id string) {
	f.ID = id
	f.require(flowActionJSONParseJSONFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONParseJSON) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionJSONParseJSONFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONParseJSON) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionJSONParseJSONFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONParseJSON) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionJSONParseJSONFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONParseJSON) SetParams(params *FlowActionJSONParseJSONParams) {
	f.Params = params
	f.require(flowActionJSONParseJSONFieldParams)
}

func (f *FlowActionJSONParseJSON) UnmarshalJSON(data []byte) error {
	type embed FlowActionJSONParseJSON
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionJSONParseJSON(unmarshaler.embed)
	if unmarshaler.Type != "JSON" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "JSON", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "PARSE_JSON" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "PARSE_JSON", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionJSONParseJSON) MarshalJSON() ([]byte, error) {
	type embed FlowActionJSONParseJSON
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "JSON",
		Action: "PARSE_JSON",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionJSONParseJSON) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionJSONParseJSONParamsFieldJSON = big.NewInt(1 << 0)
)

type FlowActionJSONParseJSONParams struct {
	JSON string `json:"json" url:"json"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionJSONParseJSONParams) GetJSON() string {
	if f == nil {
		return ""
	}
	return f.JSON
}

func (f *FlowActionJSONParseJSONParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionJSONParseJSONParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetJSON sets the JSON field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONParseJSONParams) SetJSON(json string) {
	f.JSON = json
	f.require(flowActionJSONParseJSONParamsFieldJSON)
}

func (f *FlowActionJSONParseJSONParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionJSONParseJSONParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionJSONParseJSONParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionJSONParseJSONParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionJSONParseJSONParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionJSONParseJSONParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionJSONSerializeJSONFieldID           = big.NewInt(1 << 0)
	flowActionJSONSerializeJSONFieldAlias        = big.NewInt(1 << 1)
	flowActionJSONSerializeJSONFieldAllowFailure = big.NewInt(1 << 2)
	flowActionJSONSerializeJSONFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionJSONSerializeJSONFieldParams       = big.NewInt(1 << 4)
)

type FlowActionJSONSerializeJSON struct {
	ID           string                             `json:"id" url:"id"`
	Alias        *string                            `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                              `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                              `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionJSONSerializeJSONParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionJSONSerializeJSON) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionJSONSerializeJSON) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionJSONSerializeJSON) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionJSONSerializeJSON) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionJSONSerializeJSON) GetParams() *FlowActionJSONSerializeJSONParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionJSONSerializeJSON) Type() string {
	return f.type_
}

func (f *FlowActionJSONSerializeJSON) Action() string {
	return f.action
}

func (f *FlowActionJSONSerializeJSON) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionJSONSerializeJSON) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONSerializeJSON) SetID(id string) {
	f.ID = id
	f.require(flowActionJSONSerializeJSONFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONSerializeJSON) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionJSONSerializeJSONFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONSerializeJSON) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionJSONSerializeJSONFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONSerializeJSON) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionJSONSerializeJSONFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONSerializeJSON) SetParams(params *FlowActionJSONSerializeJSONParams) {
	f.Params = params
	f.require(flowActionJSONSerializeJSONFieldParams)
}

func (f *FlowActionJSONSerializeJSON) UnmarshalJSON(data []byte) error {
	type embed FlowActionJSONSerializeJSON
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionJSONSerializeJSON(unmarshaler.embed)
	if unmarshaler.Type != "JSON" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "JSON", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "SERIALIZE_JSON" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SERIALIZE_JSON", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionJSONSerializeJSON) MarshalJSON() ([]byte, error) {
	type embed FlowActionJSONSerializeJSON
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "JSON",
		Action: "SERIALIZE_JSON",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionJSONSerializeJSON) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionJSONSerializeJSONParamsFieldObject = big.NewInt(1 << 0)
)

type FlowActionJSONSerializeJSONParams struct {
	Object *FlowActionJSONSerializeJSONParamsObject `json:"object" url:"object"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionJSONSerializeJSONParams) GetObject() *FlowActionJSONSerializeJSONParamsObject {
	if f == nil {
		return nil
	}
	return f.Object
}

func (f *FlowActionJSONSerializeJSONParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionJSONSerializeJSONParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetObject sets the Object field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJSONSerializeJSONParams) SetObject(object *FlowActionJSONSerializeJSONParamsObject) {
	f.Object = object
	f.require(flowActionJSONSerializeJSONParamsFieldObject)
}

func (f *FlowActionJSONSerializeJSONParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionJSONSerializeJSONParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionJSONSerializeJSONParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionJSONSerializeJSONParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionJSONSerializeJSONParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionJSONSerializeJSONParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionJSONSerializeJSONParamsObject struct {
	String                                        string
	FlowActionJSONSerializeJSONParamsObjectObject FlowActionJSONSerializeJSONParamsObjectObject

	typ string
}

func (f *FlowActionJSONSerializeJSONParamsObject) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionJSONSerializeJSONParamsObject) GetFlowActionJSONSerializeJSONParamsObjectObject() FlowActionJSONSerializeJSONParamsObjectObject {
	if f == nil {
		return nil
	}
	return f.FlowActionJSONSerializeJSONParamsObjectObject
}

func (f *FlowActionJSONSerializeJSONParamsObject) UnmarshalJSON(data []byte) error {
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	var valueFlowActionJSONSerializeJSONParamsObjectObject FlowActionJSONSerializeJSONParamsObjectObject
	if err := json.Unmarshal(data, &valueFlowActionJSONSerializeJSONParamsObjectObject); err == nil {
		f.typ = "FlowActionJSONSerializeJSONParamsObjectObject"
		f.FlowActionJSONSerializeJSONParamsObjectObject = valueFlowActionJSONSerializeJSONParamsObjectObject
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionJSONSerializeJSONParamsObject) MarshalJSON() ([]byte, error) {
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	if f.typ == "FlowActionJSONSerializeJSONParamsObjectObject" || f.FlowActionJSONSerializeJSONParamsObjectObject != nil {
		return json.Marshal(f.FlowActionJSONSerializeJSONParamsObjectObject)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionJSONSerializeJSONParamsObjectVisitor interface {
	VisitString(string) error
	VisitFlowActionJSONSerializeJSONParamsObjectObject(FlowActionJSONSerializeJSONParamsObjectObject) error
}

func (f *FlowActionJSONSerializeJSONParamsObject) Accept(visitor FlowActionJSONSerializeJSONParamsObjectVisitor) error {
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	if f.typ == "FlowActionJSONSerializeJSONParamsObjectObject" || f.FlowActionJSONSerializeJSONParamsObjectObject != nil {
		return visitor.VisitFlowActionJSONSerializeJSONParamsObjectObject(f.FlowActionJSONSerializeJSONParamsObjectObject)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionJSONSerializeJSONParamsObjectObject = map[string]interface{}

type FlowActionJwt struct {
	FlowActionJwtDecodeJwt *FlowActionJwtDecodeJwt
	FlowActionJwtSignJwt   *FlowActionJwtSignJwt
	FlowActionJwtVerifyJwt *FlowActionJwtVerifyJwt

	typ string
}

func (f *FlowActionJwt) GetFlowActionJwtDecodeJwt() *FlowActionJwtDecodeJwt {
	if f == nil {
		return nil
	}
	return f.FlowActionJwtDecodeJwt
}

func (f *FlowActionJwt) GetFlowActionJwtSignJwt() *FlowActionJwtSignJwt {
	if f == nil {
		return nil
	}
	return f.FlowActionJwtSignJwt
}

func (f *FlowActionJwt) GetFlowActionJwtVerifyJwt() *FlowActionJwtVerifyJwt {
	if f == nil {
		return nil
	}
	return f.FlowActionJwtVerifyJwt
}

func (f *FlowActionJwt) UnmarshalJSON(data []byte) error {
	valueFlowActionJwtDecodeJwt := new(FlowActionJwtDecodeJwt)
	if err := json.Unmarshal(data, &valueFlowActionJwtDecodeJwt); err == nil {
		f.typ = "FlowActionJwtDecodeJwt"
		f.FlowActionJwtDecodeJwt = valueFlowActionJwtDecodeJwt
		return nil
	}
	valueFlowActionJwtSignJwt := new(FlowActionJwtSignJwt)
	if err := json.Unmarshal(data, &valueFlowActionJwtSignJwt); err == nil {
		f.typ = "FlowActionJwtSignJwt"
		f.FlowActionJwtSignJwt = valueFlowActionJwtSignJwt
		return nil
	}
	valueFlowActionJwtVerifyJwt := new(FlowActionJwtVerifyJwt)
	if err := json.Unmarshal(data, &valueFlowActionJwtVerifyJwt); err == nil {
		f.typ = "FlowActionJwtVerifyJwt"
		f.FlowActionJwtVerifyJwt = valueFlowActionJwtVerifyJwt
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionJwt) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionJwtDecodeJwt" || f.FlowActionJwtDecodeJwt != nil {
		return json.Marshal(f.FlowActionJwtDecodeJwt)
	}
	if f.typ == "FlowActionJwtSignJwt" || f.FlowActionJwtSignJwt != nil {
		return json.Marshal(f.FlowActionJwtSignJwt)
	}
	if f.typ == "FlowActionJwtVerifyJwt" || f.FlowActionJwtVerifyJwt != nil {
		return json.Marshal(f.FlowActionJwtVerifyJwt)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionJwtVisitor interface {
	VisitFlowActionJwtDecodeJwt(*FlowActionJwtDecodeJwt) error
	VisitFlowActionJwtSignJwt(*FlowActionJwtSignJwt) error
	VisitFlowActionJwtVerifyJwt(*FlowActionJwtVerifyJwt) error
}

func (f *FlowActionJwt) Accept(visitor FlowActionJwtVisitor) error {
	if f.typ == "FlowActionJwtDecodeJwt" || f.FlowActionJwtDecodeJwt != nil {
		return visitor.VisitFlowActionJwtDecodeJwt(f.FlowActionJwtDecodeJwt)
	}
	if f.typ == "FlowActionJwtSignJwt" || f.FlowActionJwtSignJwt != nil {
		return visitor.VisitFlowActionJwtSignJwt(f.FlowActionJwtSignJwt)
	}
	if f.typ == "FlowActionJwtVerifyJwt" || f.FlowActionJwtVerifyJwt != nil {
		return visitor.VisitFlowActionJwtVerifyJwt(f.FlowActionJwtVerifyJwt)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionJwtDecodeJwtFieldID           = big.NewInt(1 << 0)
	flowActionJwtDecodeJwtFieldAlias        = big.NewInt(1 << 1)
	flowActionJwtDecodeJwtFieldAllowFailure = big.NewInt(1 << 2)
	flowActionJwtDecodeJwtFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionJwtDecodeJwtFieldParams       = big.NewInt(1 << 4)
)

type FlowActionJwtDecodeJwt struct {
	ID           string                        `json:"id" url:"id"`
	Alias        *string                       `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                         `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                         `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionJwtDecodeJwtParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionJwtDecodeJwt) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionJwtDecodeJwt) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionJwtDecodeJwt) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionJwtDecodeJwt) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionJwtDecodeJwt) GetParams() *FlowActionJwtDecodeJwtParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionJwtDecodeJwt) Type() string {
	return f.type_
}

func (f *FlowActionJwtDecodeJwt) Action() string {
	return f.action
}

func (f *FlowActionJwtDecodeJwt) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionJwtDecodeJwt) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtDecodeJwt) SetID(id string) {
	f.ID = id
	f.require(flowActionJwtDecodeJwtFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtDecodeJwt) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionJwtDecodeJwtFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtDecodeJwt) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionJwtDecodeJwtFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtDecodeJwt) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionJwtDecodeJwtFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtDecodeJwt) SetParams(params *FlowActionJwtDecodeJwtParams) {
	f.Params = params
	f.require(flowActionJwtDecodeJwtFieldParams)
}

func (f *FlowActionJwtDecodeJwt) UnmarshalJSON(data []byte) error {
	type embed FlowActionJwtDecodeJwt
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionJwtDecodeJwt(unmarshaler.embed)
	if unmarshaler.Type != "JWT" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "JWT", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "DECODE_JWT" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "DECODE_JWT", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionJwtDecodeJwt) MarshalJSON() ([]byte, error) {
	type embed FlowActionJwtDecodeJwt
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "JWT",
		Action: "DECODE_JWT",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionJwtDecodeJwt) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionJwtDecodeJwtParamsFieldToken = big.NewInt(1 << 0)
)

type FlowActionJwtDecodeJwtParams struct {
	Token string `json:"token" url:"token"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionJwtDecodeJwtParams) GetToken() string {
	if f == nil {
		return ""
	}
	return f.Token
}

func (f *FlowActionJwtDecodeJwtParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionJwtDecodeJwtParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetToken sets the Token field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtDecodeJwtParams) SetToken(token string) {
	f.Token = token
	f.require(flowActionJwtDecodeJwtParamsFieldToken)
}

func (f *FlowActionJwtDecodeJwtParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionJwtDecodeJwtParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionJwtDecodeJwtParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionJwtDecodeJwtParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionJwtDecodeJwtParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionJwtDecodeJwtParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionJwtSignJwtFieldID           = big.NewInt(1 << 0)
	flowActionJwtSignJwtFieldAlias        = big.NewInt(1 << 1)
	flowActionJwtSignJwtFieldAllowFailure = big.NewInt(1 << 2)
	flowActionJwtSignJwtFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionJwtSignJwtFieldParams       = big.NewInt(1 << 4)
)

type FlowActionJwtSignJwt struct {
	ID           string                      `json:"id" url:"id"`
	Alias        *string                     `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                       `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                       `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionJwtSignJwtParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionJwtSignJwt) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionJwtSignJwt) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionJwtSignJwt) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionJwtSignJwt) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionJwtSignJwt) GetParams() *FlowActionJwtSignJwtParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionJwtSignJwt) Type() string {
	return f.type_
}

func (f *FlowActionJwtSignJwt) Action() string {
	return f.action
}

func (f *FlowActionJwtSignJwt) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionJwtSignJwt) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtSignJwt) SetID(id string) {
	f.ID = id
	f.require(flowActionJwtSignJwtFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtSignJwt) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionJwtSignJwtFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtSignJwt) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionJwtSignJwtFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtSignJwt) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionJwtSignJwtFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtSignJwt) SetParams(params *FlowActionJwtSignJwtParams) {
	f.Params = params
	f.require(flowActionJwtSignJwtFieldParams)
}

func (f *FlowActionJwtSignJwt) UnmarshalJSON(data []byte) error {
	type embed FlowActionJwtSignJwt
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionJwtSignJwt(unmarshaler.embed)
	if unmarshaler.Type != "JWT" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "JWT", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "SIGN_JWT" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SIGN_JWT", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionJwtSignJwt) MarshalJSON() ([]byte, error) {
	type embed FlowActionJwtSignJwt
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "JWT",
		Action: "SIGN_JWT",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionJwtSignJwt) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionJwtSignJwtParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionJwtSignJwtParamsFieldPayload      = big.NewInt(1 << 1)
	flowActionJwtSignJwtParamsFieldSubject      = big.NewInt(1 << 2)
	flowActionJwtSignJwtParamsFieldIssuer       = big.NewInt(1 << 3)
	flowActionJwtSignJwtParamsFieldAudience     = big.NewInt(1 << 4)
	flowActionJwtSignJwtParamsFieldExpiresIn    = big.NewInt(1 << 5)
)

type FlowActionJwtSignJwtParams struct {
	ConnectionID string                             `json:"connection_id" url:"connection_id"`
	Payload      *FlowActionJwtSignJwtParamsPayload `json:"payload,omitempty" url:"payload,omitempty"`
	Subject      *string                            `json:"subject,omitempty" url:"subject,omitempty"`
	Issuer       *string                            `json:"issuer,omitempty" url:"issuer,omitempty"`
	Audience     *string                            `json:"audience,omitempty" url:"audience,omitempty"`
	ExpiresIn    *string                            `json:"expires_in,omitempty" url:"expires_in,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionJwtSignJwtParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionJwtSignJwtParams) GetPayload() FlowActionJwtSignJwtParamsPayload {
	if f == nil || f.Payload == nil {
		return nil
	}
	return *f.Payload
}

func (f *FlowActionJwtSignJwtParams) GetSubject() string {
	if f == nil || f.Subject == nil {
		return ""
	}
	return *f.Subject
}

func (f *FlowActionJwtSignJwtParams) GetIssuer() string {
	if f == nil || f.Issuer == nil {
		return ""
	}
	return *f.Issuer
}

func (f *FlowActionJwtSignJwtParams) GetAudience() string {
	if f == nil || f.Audience == nil {
		return ""
	}
	return *f.Audience
}

func (f *FlowActionJwtSignJwtParams) GetExpiresIn() string {
	if f == nil || f.ExpiresIn == nil {
		return ""
	}
	return *f.ExpiresIn
}

func (f *FlowActionJwtSignJwtParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionJwtSignJwtParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtSignJwtParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionJwtSignJwtParamsFieldConnectionID)
}

// SetPayload sets the Payload field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtSignJwtParams) SetPayload(payload *FlowActionJwtSignJwtParamsPayload) {
	f.Payload = payload
	f.require(flowActionJwtSignJwtParamsFieldPayload)
}

// SetSubject sets the Subject field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtSignJwtParams) SetSubject(subject *string) {
	f.Subject = subject
	f.require(flowActionJwtSignJwtParamsFieldSubject)
}

// SetIssuer sets the Issuer field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtSignJwtParams) SetIssuer(issuer *string) {
	f.Issuer = issuer
	f.require(flowActionJwtSignJwtParamsFieldIssuer)
}

// SetAudience sets the Audience field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtSignJwtParams) SetAudience(audience *string) {
	f.Audience = audience
	f.require(flowActionJwtSignJwtParamsFieldAudience)
}

// SetExpiresIn sets the ExpiresIn field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtSignJwtParams) SetExpiresIn(expiresIn *string) {
	f.ExpiresIn = expiresIn
	f.require(flowActionJwtSignJwtParamsFieldExpiresIn)
}

func (f *FlowActionJwtSignJwtParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionJwtSignJwtParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionJwtSignJwtParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionJwtSignJwtParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionJwtSignJwtParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionJwtSignJwtParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionJwtSignJwtParamsPayload = map[string]interface{}

var (
	flowActionJwtVerifyJwtFieldID           = big.NewInt(1 << 0)
	flowActionJwtVerifyJwtFieldAlias        = big.NewInt(1 << 1)
	flowActionJwtVerifyJwtFieldAllowFailure = big.NewInt(1 << 2)
	flowActionJwtVerifyJwtFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionJwtVerifyJwtFieldParams       = big.NewInt(1 << 4)
)

type FlowActionJwtVerifyJwt struct {
	ID           string                        `json:"id" url:"id"`
	Alias        *string                       `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                         `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                         `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionJwtVerifyJwtParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionJwtVerifyJwt) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionJwtVerifyJwt) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionJwtVerifyJwt) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionJwtVerifyJwt) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionJwtVerifyJwt) GetParams() *FlowActionJwtVerifyJwtParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionJwtVerifyJwt) Type() string {
	return f.type_
}

func (f *FlowActionJwtVerifyJwt) Action() string {
	return f.action
}

func (f *FlowActionJwtVerifyJwt) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionJwtVerifyJwt) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtVerifyJwt) SetID(id string) {
	f.ID = id
	f.require(flowActionJwtVerifyJwtFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtVerifyJwt) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionJwtVerifyJwtFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtVerifyJwt) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionJwtVerifyJwtFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtVerifyJwt) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionJwtVerifyJwtFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtVerifyJwt) SetParams(params *FlowActionJwtVerifyJwtParams) {
	f.Params = params
	f.require(flowActionJwtVerifyJwtFieldParams)
}

func (f *FlowActionJwtVerifyJwt) UnmarshalJSON(data []byte) error {
	type embed FlowActionJwtVerifyJwt
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionJwtVerifyJwt(unmarshaler.embed)
	if unmarshaler.Type != "JWT" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "JWT", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "VERIFY_JWT" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "VERIFY_JWT", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionJwtVerifyJwt) MarshalJSON() ([]byte, error) {
	type embed FlowActionJwtVerifyJwt
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "JWT",
		Action: "VERIFY_JWT",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionJwtVerifyJwt) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionJwtVerifyJwtParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionJwtVerifyJwtParamsFieldToken        = big.NewInt(1 << 1)
	flowActionJwtVerifyJwtParamsFieldAudience     = big.NewInt(1 << 2)
	flowActionJwtVerifyJwtParamsFieldIssuer       = big.NewInt(1 << 3)
)

type FlowActionJwtVerifyJwtParams struct {
	ConnectionID string  `json:"connection_id" url:"connection_id"`
	Token        string  `json:"token" url:"token"`
	Audience     *string `json:"audience,omitempty" url:"audience,omitempty"`
	Issuer       *string `json:"issuer,omitempty" url:"issuer,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionJwtVerifyJwtParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionJwtVerifyJwtParams) GetToken() string {
	if f == nil {
		return ""
	}
	return f.Token
}

func (f *FlowActionJwtVerifyJwtParams) GetAudience() string {
	if f == nil || f.Audience == nil {
		return ""
	}
	return *f.Audience
}

func (f *FlowActionJwtVerifyJwtParams) GetIssuer() string {
	if f == nil || f.Issuer == nil {
		return ""
	}
	return *f.Issuer
}

func (f *FlowActionJwtVerifyJwtParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionJwtVerifyJwtParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtVerifyJwtParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionJwtVerifyJwtParamsFieldConnectionID)
}

// SetToken sets the Token field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtVerifyJwtParams) SetToken(token string) {
	f.Token = token
	f.require(flowActionJwtVerifyJwtParamsFieldToken)
}

// SetAudience sets the Audience field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtVerifyJwtParams) SetAudience(audience *string) {
	f.Audience = audience
	f.require(flowActionJwtVerifyJwtParamsFieldAudience)
}

// SetIssuer sets the Issuer field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionJwtVerifyJwtParams) SetIssuer(issuer *string) {
	f.Issuer = issuer
	f.require(flowActionJwtVerifyJwtParamsFieldIssuer)
}

func (f *FlowActionJwtVerifyJwtParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionJwtVerifyJwtParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionJwtVerifyJwtParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionJwtVerifyJwtParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionJwtVerifyJwtParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionJwtVerifyJwtParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionMailchimp = *FlowActionMailchimpUpsertMember

var (
	flowActionMailchimpUpsertMemberFieldID           = big.NewInt(1 << 0)
	flowActionMailchimpUpsertMemberFieldAlias        = big.NewInt(1 << 1)
	flowActionMailchimpUpsertMemberFieldAllowFailure = big.NewInt(1 << 2)
	flowActionMailchimpUpsertMemberFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionMailchimpUpsertMemberFieldParams       = big.NewInt(1 << 4)
)

type FlowActionMailchimpUpsertMember struct {
	ID           string                                 `json:"id" url:"id"`
	Alias        *string                                `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                  `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                  `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionMailchimpUpsertMemberParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionMailchimpUpsertMember) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionMailchimpUpsertMember) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionMailchimpUpsertMember) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionMailchimpUpsertMember) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionMailchimpUpsertMember) GetParams() *FlowActionMailchimpUpsertMemberParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionMailchimpUpsertMember) Type() string {
	return f.type_
}

func (f *FlowActionMailchimpUpsertMember) Action() string {
	return f.action
}

func (f *FlowActionMailchimpUpsertMember) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionMailchimpUpsertMember) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailchimpUpsertMember) SetID(id string) {
	f.ID = id
	f.require(flowActionMailchimpUpsertMemberFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailchimpUpsertMember) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionMailchimpUpsertMemberFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailchimpUpsertMember) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionMailchimpUpsertMemberFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailchimpUpsertMember) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionMailchimpUpsertMemberFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailchimpUpsertMember) SetParams(params *FlowActionMailchimpUpsertMemberParams) {
	f.Params = params
	f.require(flowActionMailchimpUpsertMemberFieldParams)
}

func (f *FlowActionMailchimpUpsertMember) UnmarshalJSON(data []byte) error {
	type embed FlowActionMailchimpUpsertMember
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionMailchimpUpsertMember(unmarshaler.embed)
	if unmarshaler.Type != "MAILCHIMP" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "MAILCHIMP", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "UPSERT_MEMBER" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "UPSERT_MEMBER", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionMailchimpUpsertMember) MarshalJSON() ([]byte, error) {
	type embed FlowActionMailchimpUpsertMember
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "MAILCHIMP",
		Action: "UPSERT_MEMBER",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionMailchimpUpsertMember) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionMailchimpUpsertMemberParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionMailchimpUpsertMemberParamsFieldListID       = big.NewInt(1 << 1)
	flowActionMailchimpUpsertMemberParamsFieldMember       = big.NewInt(1 << 2)
)

type FlowActionMailchimpUpsertMemberParams struct {
	ConnectionID string                                       `json:"connection_id" url:"connection_id"`
	ListID       string                                       `json:"list_id" url:"list_id"`
	Member       *FlowActionMailchimpUpsertMemberParamsMember `json:"member" url:"member"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionMailchimpUpsertMemberParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionMailchimpUpsertMemberParams) GetListID() string {
	if f == nil {
		return ""
	}
	return f.ListID
}

func (f *FlowActionMailchimpUpsertMemberParams) GetMember() *FlowActionMailchimpUpsertMemberParamsMember {
	if f == nil {
		return nil
	}
	return f.Member
}

func (f *FlowActionMailchimpUpsertMemberParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionMailchimpUpsertMemberParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailchimpUpsertMemberParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionMailchimpUpsertMemberParamsFieldConnectionID)
}

// SetListID sets the ListID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailchimpUpsertMemberParams) SetListID(listID string) {
	f.ListID = listID
	f.require(flowActionMailchimpUpsertMemberParamsFieldListID)
}

// SetMember sets the Member field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailchimpUpsertMemberParams) SetMember(member *FlowActionMailchimpUpsertMemberParamsMember) {
	f.Member = member
	f.require(flowActionMailchimpUpsertMemberParamsFieldMember)
}

func (f *FlowActionMailchimpUpsertMemberParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionMailchimpUpsertMemberParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionMailchimpUpsertMemberParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionMailchimpUpsertMemberParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionMailchimpUpsertMemberParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionMailchimpUpsertMemberParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionMailchimpUpsertMemberParamsMemberFieldEmailAddress = big.NewInt(1 << 0)
	flowActionMailchimpUpsertMemberParamsMemberFieldStatusIfNew  = big.NewInt(1 << 1)
	flowActionMailchimpUpsertMemberParamsMemberFieldMergeFields  = big.NewInt(1 << 2)
)

type FlowActionMailchimpUpsertMemberParamsMember struct {
	EmailAddress string                                                  `json:"email_address" url:"email_address"`
	StatusIfNew  string                                                  `json:"status_if_new" url:"status_if_new"`
	MergeFields  *FlowActionMailchimpUpsertMemberParamsMemberMergeFields `json:"merge_fields,omitempty" url:"merge_fields,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionMailchimpUpsertMemberParamsMember) GetEmailAddress() string {
	if f == nil {
		return ""
	}
	return f.EmailAddress
}

func (f *FlowActionMailchimpUpsertMemberParamsMember) GetStatusIfNew() string {
	if f == nil {
		return ""
	}
	return f.StatusIfNew
}

func (f *FlowActionMailchimpUpsertMemberParamsMember) GetMergeFields() FlowActionMailchimpUpsertMemberParamsMemberMergeFields {
	if f == nil || f.MergeFields == nil {
		return nil
	}
	return *f.MergeFields
}

func (f *FlowActionMailchimpUpsertMemberParamsMember) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionMailchimpUpsertMemberParamsMember) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetEmailAddress sets the EmailAddress field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailchimpUpsertMemberParamsMember) SetEmailAddress(emailAddress string) {
	f.EmailAddress = emailAddress
	f.require(flowActionMailchimpUpsertMemberParamsMemberFieldEmailAddress)
}

// SetStatusIfNew sets the StatusIfNew field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailchimpUpsertMemberParamsMember) SetStatusIfNew(statusIfNew string) {
	f.StatusIfNew = statusIfNew
	f.require(flowActionMailchimpUpsertMemberParamsMemberFieldStatusIfNew)
}

// SetMergeFields sets the MergeFields field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailchimpUpsertMemberParamsMember) SetMergeFields(mergeFields *FlowActionMailchimpUpsertMemberParamsMemberMergeFields) {
	f.MergeFields = mergeFields
	f.require(flowActionMailchimpUpsertMemberParamsMemberFieldMergeFields)
}

func (f *FlowActionMailchimpUpsertMemberParamsMember) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionMailchimpUpsertMemberParamsMember
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionMailchimpUpsertMemberParamsMember(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionMailchimpUpsertMemberParamsMember) MarshalJSON() ([]byte, error) {
	type embed FlowActionMailchimpUpsertMemberParamsMember
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionMailchimpUpsertMemberParamsMember) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionMailchimpUpsertMemberParamsMemberMergeFields = map[string]interface{}

type FlowActionMailjet = *FlowActionMailjetSendEmail

var (
	flowActionMailjetSendEmailFieldID           = big.NewInt(1 << 0)
	flowActionMailjetSendEmailFieldAlias        = big.NewInt(1 << 1)
	flowActionMailjetSendEmailFieldAllowFailure = big.NewInt(1 << 2)
	flowActionMailjetSendEmailFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionMailjetSendEmailFieldParams       = big.NewInt(1 << 4)
)

type FlowActionMailjetSendEmail struct {
	ID           string                            `json:"id" url:"id"`
	Alias        *string                           `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                             `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                             `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionMailjetSendEmailParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionMailjetSendEmail) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionMailjetSendEmail) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionMailjetSendEmail) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionMailjetSendEmail) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionMailjetSendEmail) GetParams() *FlowActionMailjetSendEmailParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionMailjetSendEmail) Type() string {
	return f.type_
}

func (f *FlowActionMailjetSendEmail) Action() string {
	return f.action
}

func (f *FlowActionMailjetSendEmail) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionMailjetSendEmail) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailjetSendEmail) SetID(id string) {
	f.ID = id
	f.require(flowActionMailjetSendEmailFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailjetSendEmail) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionMailjetSendEmailFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailjetSendEmail) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionMailjetSendEmailFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailjetSendEmail) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionMailjetSendEmailFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailjetSendEmail) SetParams(params *FlowActionMailjetSendEmailParams) {
	f.Params = params
	f.require(flowActionMailjetSendEmailFieldParams)
}

func (f *FlowActionMailjetSendEmail) UnmarshalJSON(data []byte) error {
	type embed FlowActionMailjetSendEmail
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionMailjetSendEmail(unmarshaler.embed)
	if unmarshaler.Type != "MAILJET" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "MAILJET", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "SEND_EMAIL" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SEND_EMAIL", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionMailjetSendEmail) MarshalJSON() ([]byte, error) {
	type embed FlowActionMailjetSendEmail
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "MAILJET",
		Action: "SEND_EMAIL",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionMailjetSendEmail) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionMailjetSendEmailParams struct {
	FlowActionMailjetSendEmailParamsContent    *FlowActionMailjetSendEmailParamsContent
	FlowActionMailjetSendEmailParamsTemplateID *FlowActionMailjetSendEmailParamsTemplateID

	typ string
}

func (f *FlowActionMailjetSendEmailParams) GetFlowActionMailjetSendEmailParamsContent() *FlowActionMailjetSendEmailParamsContent {
	if f == nil {
		return nil
	}
	return f.FlowActionMailjetSendEmailParamsContent
}

func (f *FlowActionMailjetSendEmailParams) GetFlowActionMailjetSendEmailParamsTemplateID() *FlowActionMailjetSendEmailParamsTemplateID {
	if f == nil {
		return nil
	}
	return f.FlowActionMailjetSendEmailParamsTemplateID
}

func (f *FlowActionMailjetSendEmailParams) UnmarshalJSON(data []byte) error {
	valueFlowActionMailjetSendEmailParamsContent := new(FlowActionMailjetSendEmailParamsContent)
	if err := json.Unmarshal(data, &valueFlowActionMailjetSendEmailParamsContent); err == nil {
		f.typ = "FlowActionMailjetSendEmailParamsContent"
		f.FlowActionMailjetSendEmailParamsContent = valueFlowActionMailjetSendEmailParamsContent
		return nil
	}
	valueFlowActionMailjetSendEmailParamsTemplateID := new(FlowActionMailjetSendEmailParamsTemplateID)
	if err := json.Unmarshal(data, &valueFlowActionMailjetSendEmailParamsTemplateID); err == nil {
		f.typ = "FlowActionMailjetSendEmailParamsTemplateID"
		f.FlowActionMailjetSendEmailParamsTemplateID = valueFlowActionMailjetSendEmailParamsTemplateID
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionMailjetSendEmailParams) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionMailjetSendEmailParamsContent" || f.FlowActionMailjetSendEmailParamsContent != nil {
		return json.Marshal(f.FlowActionMailjetSendEmailParamsContent)
	}
	if f.typ == "FlowActionMailjetSendEmailParamsTemplateID" || f.FlowActionMailjetSendEmailParamsTemplateID != nil {
		return json.Marshal(f.FlowActionMailjetSendEmailParamsTemplateID)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionMailjetSendEmailParamsVisitor interface {
	VisitFlowActionMailjetSendEmailParamsContent(*FlowActionMailjetSendEmailParamsContent) error
	VisitFlowActionMailjetSendEmailParamsTemplateID(*FlowActionMailjetSendEmailParamsTemplateID) error
}

func (f *FlowActionMailjetSendEmailParams) Accept(visitor FlowActionMailjetSendEmailParamsVisitor) error {
	if f.typ == "FlowActionMailjetSendEmailParamsContent" || f.FlowActionMailjetSendEmailParamsContent != nil {
		return visitor.VisitFlowActionMailjetSendEmailParamsContent(f.FlowActionMailjetSendEmailParamsContent)
	}
	if f.typ == "FlowActionMailjetSendEmailParamsTemplateID" || f.FlowActionMailjetSendEmailParamsTemplateID != nil {
		return visitor.VisitFlowActionMailjetSendEmailParamsTemplateID(f.FlowActionMailjetSendEmailParamsTemplateID)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionMailjetSendEmailParamsContentFieldContent = big.NewInt(1 << 0)
)

type FlowActionMailjetSendEmailParamsContent struct {
	Content string `json:"content" url:"content"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	ExtraProperties map[string]interface{} `json:"-" url:"-"`

	rawJSON json.RawMessage
}

func (f *FlowActionMailjetSendEmailParamsContent) GetContent() string {
	if f == nil {
		return ""
	}
	return f.Content
}

func (f *FlowActionMailjetSendEmailParamsContent) GetExtraProperties() map[string]interface{} {
	return f.ExtraProperties
}

func (f *FlowActionMailjetSendEmailParamsContent) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetContent sets the Content field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailjetSendEmailParamsContent) SetContent(content string) {
	f.Content = content
	f.require(flowActionMailjetSendEmailParamsContentFieldContent)
}

func (f *FlowActionMailjetSendEmailParamsContent) UnmarshalJSON(data []byte) error {
	type embed FlowActionMailjetSendEmailParamsContent
	var unmarshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionMailjetSendEmailParamsContent(unmarshaler.embed)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.ExtraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionMailjetSendEmailParamsContent) MarshalJSON() ([]byte, error) {
	type embed FlowActionMailjetSendEmailParamsContent
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return internal.MarshalJSONWithExtraProperties(explicitMarshaler, f.ExtraProperties)
}

func (f *FlowActionMailjetSendEmailParamsContent) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionMailjetSendEmailParamsTemplateIDFieldTemplateID = big.NewInt(1 << 0)
	flowActionMailjetSendEmailParamsTemplateIDFieldVariables  = big.NewInt(1 << 1)
)

type FlowActionMailjetSendEmailParamsTemplateID struct {
	TemplateID int                    `json:"template_id" url:"template_id"`
	Variables  map[string]interface{} `json:"variables,omitempty" url:"variables,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	ExtraProperties map[string]interface{} `json:"-" url:"-"`

	rawJSON json.RawMessage
}

func (f *FlowActionMailjetSendEmailParamsTemplateID) GetTemplateID() int {
	if f == nil {
		return 0
	}
	return f.TemplateID
}

func (f *FlowActionMailjetSendEmailParamsTemplateID) GetVariables() map[string]interface{} {
	if f == nil || f.Variables == nil {
		return nil
	}
	return f.Variables
}

func (f *FlowActionMailjetSendEmailParamsTemplateID) GetExtraProperties() map[string]interface{} {
	return f.ExtraProperties
}

func (f *FlowActionMailjetSendEmailParamsTemplateID) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetTemplateID sets the TemplateID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailjetSendEmailParamsTemplateID) SetTemplateID(templateID int) {
	f.TemplateID = templateID
	f.require(flowActionMailjetSendEmailParamsTemplateIDFieldTemplateID)
}

// SetVariables sets the Variables field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionMailjetSendEmailParamsTemplateID) SetVariables(variables map[string]interface{}) {
	f.Variables = variables
	f.require(flowActionMailjetSendEmailParamsTemplateIDFieldVariables)
}

func (f *FlowActionMailjetSendEmailParamsTemplateID) UnmarshalJSON(data []byte) error {
	type embed FlowActionMailjetSendEmailParamsTemplateID
	var unmarshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionMailjetSendEmailParamsTemplateID(unmarshaler.embed)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.ExtraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionMailjetSendEmailParamsTemplateID) MarshalJSON() ([]byte, error) {
	type embed FlowActionMailjetSendEmailParamsTemplateID
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return internal.MarshalJSONWithExtraProperties(explicitMarshaler, f.ExtraProperties)
}

func (f *FlowActionMailjetSendEmailParamsTemplateID) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionOtp struct {
	FlowActionOtpGenerateCode *FlowActionOtpGenerateCode
	FlowActionOtpVerifyCode   *FlowActionOtpVerifyCode

	typ string
}

func (f *FlowActionOtp) GetFlowActionOtpGenerateCode() *FlowActionOtpGenerateCode {
	if f == nil {
		return nil
	}
	return f.FlowActionOtpGenerateCode
}

func (f *FlowActionOtp) GetFlowActionOtpVerifyCode() *FlowActionOtpVerifyCode {
	if f == nil {
		return nil
	}
	return f.FlowActionOtpVerifyCode
}

func (f *FlowActionOtp) UnmarshalJSON(data []byte) error {
	valueFlowActionOtpGenerateCode := new(FlowActionOtpGenerateCode)
	if err := json.Unmarshal(data, &valueFlowActionOtpGenerateCode); err == nil {
		f.typ = "FlowActionOtpGenerateCode"
		f.FlowActionOtpGenerateCode = valueFlowActionOtpGenerateCode
		return nil
	}
	valueFlowActionOtpVerifyCode := new(FlowActionOtpVerifyCode)
	if err := json.Unmarshal(data, &valueFlowActionOtpVerifyCode); err == nil {
		f.typ = "FlowActionOtpVerifyCode"
		f.FlowActionOtpVerifyCode = valueFlowActionOtpVerifyCode
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionOtp) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionOtpGenerateCode" || f.FlowActionOtpGenerateCode != nil {
		return json.Marshal(f.FlowActionOtpGenerateCode)
	}
	if f.typ == "FlowActionOtpVerifyCode" || f.FlowActionOtpVerifyCode != nil {
		return json.Marshal(f.FlowActionOtpVerifyCode)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionOtpVisitor interface {
	VisitFlowActionOtpGenerateCode(*FlowActionOtpGenerateCode) error
	VisitFlowActionOtpVerifyCode(*FlowActionOtpVerifyCode) error
}

func (f *FlowActionOtp) Accept(visitor FlowActionOtpVisitor) error {
	if f.typ == "FlowActionOtpGenerateCode" || f.FlowActionOtpGenerateCode != nil {
		return visitor.VisitFlowActionOtpGenerateCode(f.FlowActionOtpGenerateCode)
	}
	if f.typ == "FlowActionOtpVerifyCode" || f.FlowActionOtpVerifyCode != nil {
		return visitor.VisitFlowActionOtpVerifyCode(f.FlowActionOtpVerifyCode)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionOtpGenerateCodeFieldID           = big.NewInt(1 << 0)
	flowActionOtpGenerateCodeFieldAlias        = big.NewInt(1 << 1)
	flowActionOtpGenerateCodeFieldAllowFailure = big.NewInt(1 << 2)
	flowActionOtpGenerateCodeFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionOtpGenerateCodeFieldParams       = big.NewInt(1 << 4)
)

type FlowActionOtpGenerateCode struct {
	ID           string                           `json:"id" url:"id"`
	Alias        *string                          `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                            `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                            `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionOtpGenerateCodeParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionOtpGenerateCode) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionOtpGenerateCode) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionOtpGenerateCode) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionOtpGenerateCode) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionOtpGenerateCode) GetParams() *FlowActionOtpGenerateCodeParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionOtpGenerateCode) Type() string {
	return f.type_
}

func (f *FlowActionOtpGenerateCode) Action() string {
	return f.action
}

func (f *FlowActionOtpGenerateCode) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionOtpGenerateCode) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionOtpGenerateCode) SetID(id string) {
	f.ID = id
	f.require(flowActionOtpGenerateCodeFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionOtpGenerateCode) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionOtpGenerateCodeFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionOtpGenerateCode) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionOtpGenerateCodeFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionOtpGenerateCode) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionOtpGenerateCodeFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionOtpGenerateCode) SetParams(params *FlowActionOtpGenerateCodeParams) {
	f.Params = params
	f.require(flowActionOtpGenerateCodeFieldParams)
}

func (f *FlowActionOtpGenerateCode) UnmarshalJSON(data []byte) error {
	type embed FlowActionOtpGenerateCode
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionOtpGenerateCode(unmarshaler.embed)
	if unmarshaler.Type != "OTP" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "OTP", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "GENERATE_CODE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "GENERATE_CODE", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionOtpGenerateCode) MarshalJSON() ([]byte, error) {
	type embed FlowActionOtpGenerateCode
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "OTP",
		Action: "GENERATE_CODE",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionOtpGenerateCode) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionOtpGenerateCodeParamsFieldReference = big.NewInt(1 << 0)
	flowActionOtpGenerateCodeParamsFieldLength    = big.NewInt(1 << 1)
)

type FlowActionOtpGenerateCodeParams struct {
	Reference string `json:"reference" url:"reference"`
	Length    int    `json:"length" url:"length"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionOtpGenerateCodeParams) GetReference() string {
	if f == nil {
		return ""
	}
	return f.Reference
}

func (f *FlowActionOtpGenerateCodeParams) GetLength() int {
	if f == nil {
		return 0
	}
	return f.Length
}

func (f *FlowActionOtpGenerateCodeParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionOtpGenerateCodeParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetReference sets the Reference field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionOtpGenerateCodeParams) SetReference(reference string) {
	f.Reference = reference
	f.require(flowActionOtpGenerateCodeParamsFieldReference)
}

// SetLength sets the Length field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionOtpGenerateCodeParams) SetLength(length int) {
	f.Length = length
	f.require(flowActionOtpGenerateCodeParamsFieldLength)
}

func (f *FlowActionOtpGenerateCodeParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionOtpGenerateCodeParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionOtpGenerateCodeParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionOtpGenerateCodeParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionOtpGenerateCodeParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionOtpGenerateCodeParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionOtpVerifyCodeFieldID           = big.NewInt(1 << 0)
	flowActionOtpVerifyCodeFieldAlias        = big.NewInt(1 << 1)
	flowActionOtpVerifyCodeFieldAllowFailure = big.NewInt(1 << 2)
	flowActionOtpVerifyCodeFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionOtpVerifyCodeFieldParams       = big.NewInt(1 << 4)
)

type FlowActionOtpVerifyCode struct {
	ID           string                         `json:"id" url:"id"`
	Alias        *string                        `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                          `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                          `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionOtpVerifyCodeParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionOtpVerifyCode) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionOtpVerifyCode) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionOtpVerifyCode) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionOtpVerifyCode) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionOtpVerifyCode) GetParams() *FlowActionOtpVerifyCodeParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionOtpVerifyCode) Type() string {
	return f.type_
}

func (f *FlowActionOtpVerifyCode) Action() string {
	return f.action
}

func (f *FlowActionOtpVerifyCode) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionOtpVerifyCode) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionOtpVerifyCode) SetID(id string) {
	f.ID = id
	f.require(flowActionOtpVerifyCodeFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionOtpVerifyCode) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionOtpVerifyCodeFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionOtpVerifyCode) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionOtpVerifyCodeFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionOtpVerifyCode) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionOtpVerifyCodeFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionOtpVerifyCode) SetParams(params *FlowActionOtpVerifyCodeParams) {
	f.Params = params
	f.require(flowActionOtpVerifyCodeFieldParams)
}

func (f *FlowActionOtpVerifyCode) UnmarshalJSON(data []byte) error {
	type embed FlowActionOtpVerifyCode
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionOtpVerifyCode(unmarshaler.embed)
	if unmarshaler.Type != "OTP" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "OTP", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "VERIFY_CODE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "VERIFY_CODE", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionOtpVerifyCode) MarshalJSON() ([]byte, error) {
	type embed FlowActionOtpVerifyCode
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "OTP",
		Action: "VERIFY_CODE",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionOtpVerifyCode) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionOtpVerifyCodeParamsFieldReference = big.NewInt(1 << 0)
	flowActionOtpVerifyCodeParamsFieldCode      = big.NewInt(1 << 1)
)

type FlowActionOtpVerifyCodeParams struct {
	Reference string                             `json:"reference" url:"reference"`
	Code      *FlowActionOtpVerifyCodeParamsCode `json:"code" url:"code"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionOtpVerifyCodeParams) GetReference() string {
	if f == nil {
		return ""
	}
	return f.Reference
}

func (f *FlowActionOtpVerifyCodeParams) GetCode() *FlowActionOtpVerifyCodeParamsCode {
	if f == nil {
		return nil
	}
	return f.Code
}

func (f *FlowActionOtpVerifyCodeParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionOtpVerifyCodeParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetReference sets the Reference field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionOtpVerifyCodeParams) SetReference(reference string) {
	f.Reference = reference
	f.require(flowActionOtpVerifyCodeParamsFieldReference)
}

// SetCode sets the Code field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionOtpVerifyCodeParams) SetCode(code *FlowActionOtpVerifyCodeParamsCode) {
	f.Code = code
	f.require(flowActionOtpVerifyCodeParamsFieldCode)
}

func (f *FlowActionOtpVerifyCodeParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionOtpVerifyCodeParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionOtpVerifyCodeParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionOtpVerifyCodeParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionOtpVerifyCodeParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionOtpVerifyCodeParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionOtpVerifyCodeParamsCode struct {
	Integer int
	String  string

	typ string
}

func (f *FlowActionOtpVerifyCodeParamsCode) GetInteger() int {
	if f == nil {
		return 0
	}
	return f.Integer
}

func (f *FlowActionOtpVerifyCodeParamsCode) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionOtpVerifyCodeParamsCode) UnmarshalJSON(data []byte) error {
	var valueInteger int
	if err := json.Unmarshal(data, &valueInteger); err == nil {
		f.typ = "Integer"
		f.Integer = valueInteger
		return nil
	}
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionOtpVerifyCodeParamsCode) MarshalJSON() ([]byte, error) {
	if f.typ == "Integer" || f.Integer != 0 {
		return json.Marshal(f.Integer)
	}
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionOtpVerifyCodeParamsCodeVisitor interface {
	VisitInteger(int) error
	VisitString(string) error
}

func (f *FlowActionOtpVerifyCodeParamsCode) Accept(visitor FlowActionOtpVerifyCodeParamsCodeVisitor) error {
	if f.typ == "Integer" || f.Integer != 0 {
		return visitor.VisitInteger(f.Integer)
	}
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionPipedrive struct {
	FlowActionPipedriveAddDeal         *FlowActionPipedriveAddDeal
	FlowActionPipedriveAddOrganization *FlowActionPipedriveAddOrganization
	FlowActionPipedriveAddPerson       *FlowActionPipedriveAddPerson

	typ string
}

func (f *FlowActionPipedrive) GetFlowActionPipedriveAddDeal() *FlowActionPipedriveAddDeal {
	if f == nil {
		return nil
	}
	return f.FlowActionPipedriveAddDeal
}

func (f *FlowActionPipedrive) GetFlowActionPipedriveAddOrganization() *FlowActionPipedriveAddOrganization {
	if f == nil {
		return nil
	}
	return f.FlowActionPipedriveAddOrganization
}

func (f *FlowActionPipedrive) GetFlowActionPipedriveAddPerson() *FlowActionPipedriveAddPerson {
	if f == nil {
		return nil
	}
	return f.FlowActionPipedriveAddPerson
}

func (f *FlowActionPipedrive) UnmarshalJSON(data []byte) error {
	valueFlowActionPipedriveAddDeal := new(FlowActionPipedriveAddDeal)
	if err := json.Unmarshal(data, &valueFlowActionPipedriveAddDeal); err == nil {
		f.typ = "FlowActionPipedriveAddDeal"
		f.FlowActionPipedriveAddDeal = valueFlowActionPipedriveAddDeal
		return nil
	}
	valueFlowActionPipedriveAddOrganization := new(FlowActionPipedriveAddOrganization)
	if err := json.Unmarshal(data, &valueFlowActionPipedriveAddOrganization); err == nil {
		f.typ = "FlowActionPipedriveAddOrganization"
		f.FlowActionPipedriveAddOrganization = valueFlowActionPipedriveAddOrganization
		return nil
	}
	valueFlowActionPipedriveAddPerson := new(FlowActionPipedriveAddPerson)
	if err := json.Unmarshal(data, &valueFlowActionPipedriveAddPerson); err == nil {
		f.typ = "FlowActionPipedriveAddPerson"
		f.FlowActionPipedriveAddPerson = valueFlowActionPipedriveAddPerson
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionPipedrive) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionPipedriveAddDeal" || f.FlowActionPipedriveAddDeal != nil {
		return json.Marshal(f.FlowActionPipedriveAddDeal)
	}
	if f.typ == "FlowActionPipedriveAddOrganization" || f.FlowActionPipedriveAddOrganization != nil {
		return json.Marshal(f.FlowActionPipedriveAddOrganization)
	}
	if f.typ == "FlowActionPipedriveAddPerson" || f.FlowActionPipedriveAddPerson != nil {
		return json.Marshal(f.FlowActionPipedriveAddPerson)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionPipedriveVisitor interface {
	VisitFlowActionPipedriveAddDeal(*FlowActionPipedriveAddDeal) error
	VisitFlowActionPipedriveAddOrganization(*FlowActionPipedriveAddOrganization) error
	VisitFlowActionPipedriveAddPerson(*FlowActionPipedriveAddPerson) error
}

func (f *FlowActionPipedrive) Accept(visitor FlowActionPipedriveVisitor) error {
	if f.typ == "FlowActionPipedriveAddDeal" || f.FlowActionPipedriveAddDeal != nil {
		return visitor.VisitFlowActionPipedriveAddDeal(f.FlowActionPipedriveAddDeal)
	}
	if f.typ == "FlowActionPipedriveAddOrganization" || f.FlowActionPipedriveAddOrganization != nil {
		return visitor.VisitFlowActionPipedriveAddOrganization(f.FlowActionPipedriveAddOrganization)
	}
	if f.typ == "FlowActionPipedriveAddPerson" || f.FlowActionPipedriveAddPerson != nil {
		return visitor.VisitFlowActionPipedriveAddPerson(f.FlowActionPipedriveAddPerson)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionPipedriveAddDealFieldID           = big.NewInt(1 << 0)
	flowActionPipedriveAddDealFieldAlias        = big.NewInt(1 << 1)
	flowActionPipedriveAddDealFieldAllowFailure = big.NewInt(1 << 2)
	flowActionPipedriveAddDealFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionPipedriveAddDealFieldParams       = big.NewInt(1 << 4)
)

type FlowActionPipedriveAddDeal struct {
	ID           string                            `json:"id" url:"id"`
	Alias        *string                           `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                             `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                             `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionPipedriveAddDealParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionPipedriveAddDeal) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionPipedriveAddDeal) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionPipedriveAddDeal) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionPipedriveAddDeal) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionPipedriveAddDeal) GetParams() *FlowActionPipedriveAddDealParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionPipedriveAddDeal) Type() string {
	return f.type_
}

func (f *FlowActionPipedriveAddDeal) Action() string {
	return f.action
}

func (f *FlowActionPipedriveAddDeal) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionPipedriveAddDeal) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddDeal) SetID(id string) {
	f.ID = id
	f.require(flowActionPipedriveAddDealFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddDeal) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionPipedriveAddDealFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddDeal) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionPipedriveAddDealFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddDeal) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionPipedriveAddDealFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddDeal) SetParams(params *FlowActionPipedriveAddDealParams) {
	f.Params = params
	f.require(flowActionPipedriveAddDealFieldParams)
}

func (f *FlowActionPipedriveAddDeal) UnmarshalJSON(data []byte) error {
	type embed FlowActionPipedriveAddDeal
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionPipedriveAddDeal(unmarshaler.embed)
	if unmarshaler.Type != "PIPEDRIVE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "PIPEDRIVE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "ADD_DEAL" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "ADD_DEAL", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionPipedriveAddDeal) MarshalJSON() ([]byte, error) {
	type embed FlowActionPipedriveAddDeal
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "PIPEDRIVE",
		Action: "ADD_DEAL",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionPipedriveAddDeal) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionPipedriveAddDealParamsFieldConnectionID   = big.NewInt(1 << 0)
	flowActionPipedriveAddDealParamsFieldTitle          = big.NewInt(1 << 1)
	flowActionPipedriveAddDealParamsFieldValue          = big.NewInt(1 << 2)
	flowActionPipedriveAddDealParamsFieldUserID         = big.NewInt(1 << 3)
	flowActionPipedriveAddDealParamsFieldPersonID       = big.NewInt(1 << 4)
	flowActionPipedriveAddDealParamsFieldOrganizationID = big.NewInt(1 << 5)
	flowActionPipedriveAddDealParamsFieldStageID        = big.NewInt(1 << 6)
	flowActionPipedriveAddDealParamsFieldFields         = big.NewInt(1 << 7)
)

type FlowActionPipedriveAddDealParams struct {
	ConnectionID   string                                          `json:"connection_id" url:"connection_id"`
	Title          string                                          `json:"title" url:"title"`
	Value          *string                                         `json:"value,omitempty" url:"value,omitempty"`
	UserID         *FlowActionPipedriveAddDealParamsUserID         `json:"user_id,omitempty" url:"user_id,omitempty"`
	PersonID       *FlowActionPipedriveAddDealParamsPersonID       `json:"person_id,omitempty" url:"person_id,omitempty"`
	OrganizationID *FlowActionPipedriveAddDealParamsOrganizationID `json:"organization_id,omitempty" url:"organization_id,omitempty"`
	StageID        *FlowActionPipedriveAddDealParamsStageID        `json:"stage_id,omitempty" url:"stage_id,omitempty"`
	Fields         *FlowActionPipedriveAddDealParamsFields         `json:"fields,omitempty" url:"fields,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionPipedriveAddDealParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionPipedriveAddDealParams) GetTitle() string {
	if f == nil {
		return ""
	}
	return f.Title
}

func (f *FlowActionPipedriveAddDealParams) GetValue() string {
	if f == nil || f.Value == nil {
		return ""
	}
	return *f.Value
}

func (f *FlowActionPipedriveAddDealParams) GetUserID() FlowActionPipedriveAddDealParamsUserID {
	if f == nil || f.UserID == nil {
		return FlowActionPipedriveAddDealParamsUserID{}
	}
	return *f.UserID
}

func (f *FlowActionPipedriveAddDealParams) GetPersonID() FlowActionPipedriveAddDealParamsPersonID {
	if f == nil || f.PersonID == nil {
		return FlowActionPipedriveAddDealParamsPersonID{}
	}
	return *f.PersonID
}

func (f *FlowActionPipedriveAddDealParams) GetOrganizationID() FlowActionPipedriveAddDealParamsOrganizationID {
	if f == nil || f.OrganizationID == nil {
		return FlowActionPipedriveAddDealParamsOrganizationID{}
	}
	return *f.OrganizationID
}

func (f *FlowActionPipedriveAddDealParams) GetStageID() FlowActionPipedriveAddDealParamsStageID {
	if f == nil || f.StageID == nil {
		return FlowActionPipedriveAddDealParamsStageID{}
	}
	return *f.StageID
}

func (f *FlowActionPipedriveAddDealParams) GetFields() FlowActionPipedriveAddDealParamsFields {
	if f == nil || f.Fields == nil {
		return nil
	}
	return *f.Fields
}

func (f *FlowActionPipedriveAddDealParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionPipedriveAddDealParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddDealParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionPipedriveAddDealParamsFieldConnectionID)
}

// SetTitle sets the Title field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddDealParams) SetTitle(title string) {
	f.Title = title
	f.require(flowActionPipedriveAddDealParamsFieldTitle)
}

// SetValue sets the Value field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddDealParams) SetValue(value *string) {
	f.Value = value
	f.require(flowActionPipedriveAddDealParamsFieldValue)
}

// SetUserID sets the UserID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddDealParams) SetUserID(userID *FlowActionPipedriveAddDealParamsUserID) {
	f.UserID = userID
	f.require(flowActionPipedriveAddDealParamsFieldUserID)
}

// SetPersonID sets the PersonID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddDealParams) SetPersonID(personID *FlowActionPipedriveAddDealParamsPersonID) {
	f.PersonID = personID
	f.require(flowActionPipedriveAddDealParamsFieldPersonID)
}

// SetOrganizationID sets the OrganizationID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddDealParams) SetOrganizationID(organizationID *FlowActionPipedriveAddDealParamsOrganizationID) {
	f.OrganizationID = organizationID
	f.require(flowActionPipedriveAddDealParamsFieldOrganizationID)
}

// SetStageID sets the StageID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddDealParams) SetStageID(stageID *FlowActionPipedriveAddDealParamsStageID) {
	f.StageID = stageID
	f.require(flowActionPipedriveAddDealParamsFieldStageID)
}

// SetFields sets the Fields field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddDealParams) SetFields(fields *FlowActionPipedriveAddDealParamsFields) {
	f.Fields = fields
	f.require(flowActionPipedriveAddDealParamsFieldFields)
}

func (f *FlowActionPipedriveAddDealParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionPipedriveAddDealParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionPipedriveAddDealParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionPipedriveAddDealParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionPipedriveAddDealParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionPipedriveAddDealParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionPipedriveAddDealParamsFields = map[string]interface{}

type FlowActionPipedriveAddDealParamsOrganizationID struct {
	String string
	Double float64

	typ string
}

func (f *FlowActionPipedriveAddDealParamsOrganizationID) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionPipedriveAddDealParamsOrganizationID) GetDouble() float64 {
	if f == nil {
		return 0
	}
	return f.Double
}

func (f *FlowActionPipedriveAddDealParamsOrganizationID) UnmarshalJSON(data []byte) error {
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	var valueDouble float64
	if err := json.Unmarshal(data, &valueDouble); err == nil {
		f.typ = "Double"
		f.Double = valueDouble
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionPipedriveAddDealParamsOrganizationID) MarshalJSON() ([]byte, error) {
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return json.Marshal(f.Double)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionPipedriveAddDealParamsOrganizationIDVisitor interface {
	VisitString(string) error
	VisitDouble(float64) error
}

func (f *FlowActionPipedriveAddDealParamsOrganizationID) Accept(visitor FlowActionPipedriveAddDealParamsOrganizationIDVisitor) error {
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return visitor.VisitDouble(f.Double)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionPipedriveAddDealParamsPersonID struct {
	String string
	Double float64

	typ string
}

func (f *FlowActionPipedriveAddDealParamsPersonID) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionPipedriveAddDealParamsPersonID) GetDouble() float64 {
	if f == nil {
		return 0
	}
	return f.Double
}

func (f *FlowActionPipedriveAddDealParamsPersonID) UnmarshalJSON(data []byte) error {
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	var valueDouble float64
	if err := json.Unmarshal(data, &valueDouble); err == nil {
		f.typ = "Double"
		f.Double = valueDouble
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionPipedriveAddDealParamsPersonID) MarshalJSON() ([]byte, error) {
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return json.Marshal(f.Double)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionPipedriveAddDealParamsPersonIDVisitor interface {
	VisitString(string) error
	VisitDouble(float64) error
}

func (f *FlowActionPipedriveAddDealParamsPersonID) Accept(visitor FlowActionPipedriveAddDealParamsPersonIDVisitor) error {
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return visitor.VisitDouble(f.Double)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionPipedriveAddDealParamsStageID struct {
	String string
	Double float64

	typ string
}

func (f *FlowActionPipedriveAddDealParamsStageID) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionPipedriveAddDealParamsStageID) GetDouble() float64 {
	if f == nil {
		return 0
	}
	return f.Double
}

func (f *FlowActionPipedriveAddDealParamsStageID) UnmarshalJSON(data []byte) error {
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	var valueDouble float64
	if err := json.Unmarshal(data, &valueDouble); err == nil {
		f.typ = "Double"
		f.Double = valueDouble
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionPipedriveAddDealParamsStageID) MarshalJSON() ([]byte, error) {
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return json.Marshal(f.Double)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionPipedriveAddDealParamsStageIDVisitor interface {
	VisitString(string) error
	VisitDouble(float64) error
}

func (f *FlowActionPipedriveAddDealParamsStageID) Accept(visitor FlowActionPipedriveAddDealParamsStageIDVisitor) error {
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return visitor.VisitDouble(f.Double)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionPipedriveAddDealParamsUserID struct {
	String string
	Double float64

	typ string
}

func (f *FlowActionPipedriveAddDealParamsUserID) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionPipedriveAddDealParamsUserID) GetDouble() float64 {
	if f == nil {
		return 0
	}
	return f.Double
}

func (f *FlowActionPipedriveAddDealParamsUserID) UnmarshalJSON(data []byte) error {
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	var valueDouble float64
	if err := json.Unmarshal(data, &valueDouble); err == nil {
		f.typ = "Double"
		f.Double = valueDouble
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionPipedriveAddDealParamsUserID) MarshalJSON() ([]byte, error) {
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return json.Marshal(f.Double)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionPipedriveAddDealParamsUserIDVisitor interface {
	VisitString(string) error
	VisitDouble(float64) error
}

func (f *FlowActionPipedriveAddDealParamsUserID) Accept(visitor FlowActionPipedriveAddDealParamsUserIDVisitor) error {
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return visitor.VisitDouble(f.Double)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionPipedriveAddOrganizationFieldID           = big.NewInt(1 << 0)
	flowActionPipedriveAddOrganizationFieldAlias        = big.NewInt(1 << 1)
	flowActionPipedriveAddOrganizationFieldAllowFailure = big.NewInt(1 << 2)
	flowActionPipedriveAddOrganizationFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionPipedriveAddOrganizationFieldParams       = big.NewInt(1 << 4)
)

type FlowActionPipedriveAddOrganization struct {
	ID           string                                    `json:"id" url:"id"`
	Alias        *string                                   `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                     `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                     `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionPipedriveAddOrganizationParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionPipedriveAddOrganization) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionPipedriveAddOrganization) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionPipedriveAddOrganization) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionPipedriveAddOrganization) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionPipedriveAddOrganization) GetParams() *FlowActionPipedriveAddOrganizationParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionPipedriveAddOrganization) Type() string {
	return f.type_
}

func (f *FlowActionPipedriveAddOrganization) Action() string {
	return f.action
}

func (f *FlowActionPipedriveAddOrganization) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionPipedriveAddOrganization) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddOrganization) SetID(id string) {
	f.ID = id
	f.require(flowActionPipedriveAddOrganizationFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddOrganization) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionPipedriveAddOrganizationFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddOrganization) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionPipedriveAddOrganizationFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddOrganization) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionPipedriveAddOrganizationFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddOrganization) SetParams(params *FlowActionPipedriveAddOrganizationParams) {
	f.Params = params
	f.require(flowActionPipedriveAddOrganizationFieldParams)
}

func (f *FlowActionPipedriveAddOrganization) UnmarshalJSON(data []byte) error {
	type embed FlowActionPipedriveAddOrganization
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionPipedriveAddOrganization(unmarshaler.embed)
	if unmarshaler.Type != "PIPEDRIVE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "PIPEDRIVE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "ADD_ORGANIZATION" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "ADD_ORGANIZATION", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionPipedriveAddOrganization) MarshalJSON() ([]byte, error) {
	type embed FlowActionPipedriveAddOrganization
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "PIPEDRIVE",
		Action: "ADD_ORGANIZATION",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionPipedriveAddOrganization) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionPipedriveAddOrganizationParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionPipedriveAddOrganizationParamsFieldName         = big.NewInt(1 << 1)
	flowActionPipedriveAddOrganizationParamsFieldOwnerID      = big.NewInt(1 << 2)
	flowActionPipedriveAddOrganizationParamsFieldFields       = big.NewInt(1 << 3)
)

type FlowActionPipedriveAddOrganizationParams struct {
	ConnectionID string                                           `json:"connection_id" url:"connection_id"`
	Name         string                                           `json:"name" url:"name"`
	OwnerID      *FlowActionPipedriveAddOrganizationParamsOwnerID `json:"owner_id,omitempty" url:"owner_id,omitempty"`
	Fields       *FlowActionPipedriveAddOrganizationParamsFields  `json:"fields,omitempty" url:"fields,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionPipedriveAddOrganizationParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionPipedriveAddOrganizationParams) GetName() string {
	if f == nil {
		return ""
	}
	return f.Name
}

func (f *FlowActionPipedriveAddOrganizationParams) GetOwnerID() FlowActionPipedriveAddOrganizationParamsOwnerID {
	if f == nil || f.OwnerID == nil {
		return FlowActionPipedriveAddOrganizationParamsOwnerID{}
	}
	return *f.OwnerID
}

func (f *FlowActionPipedriveAddOrganizationParams) GetFields() FlowActionPipedriveAddOrganizationParamsFields {
	if f == nil || f.Fields == nil {
		return nil
	}
	return *f.Fields
}

func (f *FlowActionPipedriveAddOrganizationParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionPipedriveAddOrganizationParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddOrganizationParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionPipedriveAddOrganizationParamsFieldConnectionID)
}

// SetName sets the Name field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddOrganizationParams) SetName(name string) {
	f.Name = name
	f.require(flowActionPipedriveAddOrganizationParamsFieldName)
}

// SetOwnerID sets the OwnerID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddOrganizationParams) SetOwnerID(ownerID *FlowActionPipedriveAddOrganizationParamsOwnerID) {
	f.OwnerID = ownerID
	f.require(flowActionPipedriveAddOrganizationParamsFieldOwnerID)
}

// SetFields sets the Fields field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddOrganizationParams) SetFields(fields *FlowActionPipedriveAddOrganizationParamsFields) {
	f.Fields = fields
	f.require(flowActionPipedriveAddOrganizationParamsFieldFields)
}

func (f *FlowActionPipedriveAddOrganizationParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionPipedriveAddOrganizationParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionPipedriveAddOrganizationParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionPipedriveAddOrganizationParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionPipedriveAddOrganizationParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionPipedriveAddOrganizationParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionPipedriveAddOrganizationParamsFields = map[string]interface{}

type FlowActionPipedriveAddOrganizationParamsOwnerID struct {
	String string
	Double float64

	typ string
}

func (f *FlowActionPipedriveAddOrganizationParamsOwnerID) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionPipedriveAddOrganizationParamsOwnerID) GetDouble() float64 {
	if f == nil {
		return 0
	}
	return f.Double
}

func (f *FlowActionPipedriveAddOrganizationParamsOwnerID) UnmarshalJSON(data []byte) error {
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	var valueDouble float64
	if err := json.Unmarshal(data, &valueDouble); err == nil {
		f.typ = "Double"
		f.Double = valueDouble
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionPipedriveAddOrganizationParamsOwnerID) MarshalJSON() ([]byte, error) {
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return json.Marshal(f.Double)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionPipedriveAddOrganizationParamsOwnerIDVisitor interface {
	VisitString(string) error
	VisitDouble(float64) error
}

func (f *FlowActionPipedriveAddOrganizationParamsOwnerID) Accept(visitor FlowActionPipedriveAddOrganizationParamsOwnerIDVisitor) error {
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return visitor.VisitDouble(f.Double)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionPipedriveAddPersonFieldID           = big.NewInt(1 << 0)
	flowActionPipedriveAddPersonFieldAlias        = big.NewInt(1 << 1)
	flowActionPipedriveAddPersonFieldAllowFailure = big.NewInt(1 << 2)
	flowActionPipedriveAddPersonFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionPipedriveAddPersonFieldParams       = big.NewInt(1 << 4)
)

type FlowActionPipedriveAddPerson struct {
	ID           string                              `json:"id" url:"id"`
	Alias        *string                             `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                               `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                               `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionPipedriveAddPersonParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionPipedriveAddPerson) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionPipedriveAddPerson) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionPipedriveAddPerson) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionPipedriveAddPerson) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionPipedriveAddPerson) GetParams() *FlowActionPipedriveAddPersonParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionPipedriveAddPerson) Type() string {
	return f.type_
}

func (f *FlowActionPipedriveAddPerson) Action() string {
	return f.action
}

func (f *FlowActionPipedriveAddPerson) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionPipedriveAddPerson) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddPerson) SetID(id string) {
	f.ID = id
	f.require(flowActionPipedriveAddPersonFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddPerson) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionPipedriveAddPersonFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddPerson) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionPipedriveAddPersonFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddPerson) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionPipedriveAddPersonFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddPerson) SetParams(params *FlowActionPipedriveAddPersonParams) {
	f.Params = params
	f.require(flowActionPipedriveAddPersonFieldParams)
}

func (f *FlowActionPipedriveAddPerson) UnmarshalJSON(data []byte) error {
	type embed FlowActionPipedriveAddPerson
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionPipedriveAddPerson(unmarshaler.embed)
	if unmarshaler.Type != "PIPEDRIVE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "PIPEDRIVE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "ADD_PERSON" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "ADD_PERSON", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionPipedriveAddPerson) MarshalJSON() ([]byte, error) {
	type embed FlowActionPipedriveAddPerson
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "PIPEDRIVE",
		Action: "ADD_PERSON",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionPipedriveAddPerson) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionPipedriveAddPersonParamsFieldConnectionID   = big.NewInt(1 << 0)
	flowActionPipedriveAddPersonParamsFieldName           = big.NewInt(1 << 1)
	flowActionPipedriveAddPersonParamsFieldEmail          = big.NewInt(1 << 2)
	flowActionPipedriveAddPersonParamsFieldPhone          = big.NewInt(1 << 3)
	flowActionPipedriveAddPersonParamsFieldOwnerID        = big.NewInt(1 << 4)
	flowActionPipedriveAddPersonParamsFieldOrganizationID = big.NewInt(1 << 5)
	flowActionPipedriveAddPersonParamsFieldFields         = big.NewInt(1 << 6)
)

type FlowActionPipedriveAddPersonParams struct {
	ConnectionID   string                                            `json:"connection_id" url:"connection_id"`
	Name           string                                            `json:"name" url:"name"`
	Email          *string                                           `json:"email,omitempty" url:"email,omitempty"`
	Phone          *string                                           `json:"phone,omitempty" url:"phone,omitempty"`
	OwnerID        *FlowActionPipedriveAddPersonParamsOwnerID        `json:"owner_id,omitempty" url:"owner_id,omitempty"`
	OrganizationID *FlowActionPipedriveAddPersonParamsOrganizationID `json:"organization_id,omitempty" url:"organization_id,omitempty"`
	Fields         *FlowActionPipedriveAddPersonParamsFields         `json:"fields,omitempty" url:"fields,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionPipedriveAddPersonParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionPipedriveAddPersonParams) GetName() string {
	if f == nil {
		return ""
	}
	return f.Name
}

func (f *FlowActionPipedriveAddPersonParams) GetEmail() string {
	if f == nil || f.Email == nil {
		return ""
	}
	return *f.Email
}

func (f *FlowActionPipedriveAddPersonParams) GetPhone() string {
	if f == nil || f.Phone == nil {
		return ""
	}
	return *f.Phone
}

func (f *FlowActionPipedriveAddPersonParams) GetOwnerID() FlowActionPipedriveAddPersonParamsOwnerID {
	if f == nil || f.OwnerID == nil {
		return FlowActionPipedriveAddPersonParamsOwnerID{}
	}
	return *f.OwnerID
}

func (f *FlowActionPipedriveAddPersonParams) GetOrganizationID() FlowActionPipedriveAddPersonParamsOrganizationID {
	if f == nil || f.OrganizationID == nil {
		return FlowActionPipedriveAddPersonParamsOrganizationID{}
	}
	return *f.OrganizationID
}

func (f *FlowActionPipedriveAddPersonParams) GetFields() FlowActionPipedriveAddPersonParamsFields {
	if f == nil || f.Fields == nil {
		return nil
	}
	return *f.Fields
}

func (f *FlowActionPipedriveAddPersonParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionPipedriveAddPersonParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddPersonParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionPipedriveAddPersonParamsFieldConnectionID)
}

// SetName sets the Name field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddPersonParams) SetName(name string) {
	f.Name = name
	f.require(flowActionPipedriveAddPersonParamsFieldName)
}

// SetEmail sets the Email field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddPersonParams) SetEmail(email *string) {
	f.Email = email
	f.require(flowActionPipedriveAddPersonParamsFieldEmail)
}

// SetPhone sets the Phone field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddPersonParams) SetPhone(phone *string) {
	f.Phone = phone
	f.require(flowActionPipedriveAddPersonParamsFieldPhone)
}

// SetOwnerID sets the OwnerID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddPersonParams) SetOwnerID(ownerID *FlowActionPipedriveAddPersonParamsOwnerID) {
	f.OwnerID = ownerID
	f.require(flowActionPipedriveAddPersonParamsFieldOwnerID)
}

// SetOrganizationID sets the OrganizationID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddPersonParams) SetOrganizationID(organizationID *FlowActionPipedriveAddPersonParamsOrganizationID) {
	f.OrganizationID = organizationID
	f.require(flowActionPipedriveAddPersonParamsFieldOrganizationID)
}

// SetFields sets the Fields field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionPipedriveAddPersonParams) SetFields(fields *FlowActionPipedriveAddPersonParamsFields) {
	f.Fields = fields
	f.require(flowActionPipedriveAddPersonParamsFieldFields)
}

func (f *FlowActionPipedriveAddPersonParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionPipedriveAddPersonParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionPipedriveAddPersonParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionPipedriveAddPersonParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionPipedriveAddPersonParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionPipedriveAddPersonParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionPipedriveAddPersonParamsFields = map[string]interface{}

type FlowActionPipedriveAddPersonParamsOrganizationID struct {
	String string
	Double float64

	typ string
}

func (f *FlowActionPipedriveAddPersonParamsOrganizationID) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionPipedriveAddPersonParamsOrganizationID) GetDouble() float64 {
	if f == nil {
		return 0
	}
	return f.Double
}

func (f *FlowActionPipedriveAddPersonParamsOrganizationID) UnmarshalJSON(data []byte) error {
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	var valueDouble float64
	if err := json.Unmarshal(data, &valueDouble); err == nil {
		f.typ = "Double"
		f.Double = valueDouble
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionPipedriveAddPersonParamsOrganizationID) MarshalJSON() ([]byte, error) {
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return json.Marshal(f.Double)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionPipedriveAddPersonParamsOrganizationIDVisitor interface {
	VisitString(string) error
	VisitDouble(float64) error
}

func (f *FlowActionPipedriveAddPersonParamsOrganizationID) Accept(visitor FlowActionPipedriveAddPersonParamsOrganizationIDVisitor) error {
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return visitor.VisitDouble(f.Double)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionPipedriveAddPersonParamsOwnerID struct {
	String string
	Double float64

	typ string
}

func (f *FlowActionPipedriveAddPersonParamsOwnerID) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionPipedriveAddPersonParamsOwnerID) GetDouble() float64 {
	if f == nil {
		return 0
	}
	return f.Double
}

func (f *FlowActionPipedriveAddPersonParamsOwnerID) UnmarshalJSON(data []byte) error {
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	var valueDouble float64
	if err := json.Unmarshal(data, &valueDouble); err == nil {
		f.typ = "Double"
		f.Double = valueDouble
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionPipedriveAddPersonParamsOwnerID) MarshalJSON() ([]byte, error) {
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return json.Marshal(f.Double)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionPipedriveAddPersonParamsOwnerIDVisitor interface {
	VisitString(string) error
	VisitDouble(float64) error
}

func (f *FlowActionPipedriveAddPersonParamsOwnerID) Accept(visitor FlowActionPipedriveAddPersonParamsOwnerIDVisitor) error {
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	if f.typ == "Double" || f.Double != 0 {
		return visitor.VisitDouble(f.Double)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionSalesforce struct {
	FlowActionSalesforceCreateLead  *FlowActionSalesforceCreateLead
	FlowActionSalesforceGetLead     *FlowActionSalesforceGetLead
	FlowActionSalesforceSearchLeads *FlowActionSalesforceSearchLeads
	FlowActionSalesforceUpdateLead  *FlowActionSalesforceUpdateLead

	typ string
}

func (f *FlowActionSalesforce) GetFlowActionSalesforceCreateLead() *FlowActionSalesforceCreateLead {
	if f == nil {
		return nil
	}
	return f.FlowActionSalesforceCreateLead
}

func (f *FlowActionSalesforce) GetFlowActionSalesforceGetLead() *FlowActionSalesforceGetLead {
	if f == nil {
		return nil
	}
	return f.FlowActionSalesforceGetLead
}

func (f *FlowActionSalesforce) GetFlowActionSalesforceSearchLeads() *FlowActionSalesforceSearchLeads {
	if f == nil {
		return nil
	}
	return f.FlowActionSalesforceSearchLeads
}

func (f *FlowActionSalesforce) GetFlowActionSalesforceUpdateLead() *FlowActionSalesforceUpdateLead {
	if f == nil {
		return nil
	}
	return f.FlowActionSalesforceUpdateLead
}

func (f *FlowActionSalesforce) UnmarshalJSON(data []byte) error {
	valueFlowActionSalesforceCreateLead := new(FlowActionSalesforceCreateLead)
	if err := json.Unmarshal(data, &valueFlowActionSalesforceCreateLead); err == nil {
		f.typ = "FlowActionSalesforceCreateLead"
		f.FlowActionSalesforceCreateLead = valueFlowActionSalesforceCreateLead
		return nil
	}
	valueFlowActionSalesforceGetLead := new(FlowActionSalesforceGetLead)
	if err := json.Unmarshal(data, &valueFlowActionSalesforceGetLead); err == nil {
		f.typ = "FlowActionSalesforceGetLead"
		f.FlowActionSalesforceGetLead = valueFlowActionSalesforceGetLead
		return nil
	}
	valueFlowActionSalesforceSearchLeads := new(FlowActionSalesforceSearchLeads)
	if err := json.Unmarshal(data, &valueFlowActionSalesforceSearchLeads); err == nil {
		f.typ = "FlowActionSalesforceSearchLeads"
		f.FlowActionSalesforceSearchLeads = valueFlowActionSalesforceSearchLeads
		return nil
	}
	valueFlowActionSalesforceUpdateLead := new(FlowActionSalesforceUpdateLead)
	if err := json.Unmarshal(data, &valueFlowActionSalesforceUpdateLead); err == nil {
		f.typ = "FlowActionSalesforceUpdateLead"
		f.FlowActionSalesforceUpdateLead = valueFlowActionSalesforceUpdateLead
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionSalesforce) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionSalesforceCreateLead" || f.FlowActionSalesforceCreateLead != nil {
		return json.Marshal(f.FlowActionSalesforceCreateLead)
	}
	if f.typ == "FlowActionSalesforceGetLead" || f.FlowActionSalesforceGetLead != nil {
		return json.Marshal(f.FlowActionSalesforceGetLead)
	}
	if f.typ == "FlowActionSalesforceSearchLeads" || f.FlowActionSalesforceSearchLeads != nil {
		return json.Marshal(f.FlowActionSalesforceSearchLeads)
	}
	if f.typ == "FlowActionSalesforceUpdateLead" || f.FlowActionSalesforceUpdateLead != nil {
		return json.Marshal(f.FlowActionSalesforceUpdateLead)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionSalesforceVisitor interface {
	VisitFlowActionSalesforceCreateLead(*FlowActionSalesforceCreateLead) error
	VisitFlowActionSalesforceGetLead(*FlowActionSalesforceGetLead) error
	VisitFlowActionSalesforceSearchLeads(*FlowActionSalesforceSearchLeads) error
	VisitFlowActionSalesforceUpdateLead(*FlowActionSalesforceUpdateLead) error
}

func (f *FlowActionSalesforce) Accept(visitor FlowActionSalesforceVisitor) error {
	if f.typ == "FlowActionSalesforceCreateLead" || f.FlowActionSalesforceCreateLead != nil {
		return visitor.VisitFlowActionSalesforceCreateLead(f.FlowActionSalesforceCreateLead)
	}
	if f.typ == "FlowActionSalesforceGetLead" || f.FlowActionSalesforceGetLead != nil {
		return visitor.VisitFlowActionSalesforceGetLead(f.FlowActionSalesforceGetLead)
	}
	if f.typ == "FlowActionSalesforceSearchLeads" || f.FlowActionSalesforceSearchLeads != nil {
		return visitor.VisitFlowActionSalesforceSearchLeads(f.FlowActionSalesforceSearchLeads)
	}
	if f.typ == "FlowActionSalesforceUpdateLead" || f.FlowActionSalesforceUpdateLead != nil {
		return visitor.VisitFlowActionSalesforceUpdateLead(f.FlowActionSalesforceUpdateLead)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionSalesforceCreateLeadFieldID           = big.NewInt(1 << 0)
	flowActionSalesforceCreateLeadFieldAlias        = big.NewInt(1 << 1)
	flowActionSalesforceCreateLeadFieldAllowFailure = big.NewInt(1 << 2)
	flowActionSalesforceCreateLeadFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionSalesforceCreateLeadFieldParams       = big.NewInt(1 << 4)
)

type FlowActionSalesforceCreateLead struct {
	ID           string                                `json:"id" url:"id"`
	Alias        *string                               `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                 `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                 `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionSalesforceCreateLeadParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionSalesforceCreateLead) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionSalesforceCreateLead) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionSalesforceCreateLead) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionSalesforceCreateLead) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionSalesforceCreateLead) GetParams() *FlowActionSalesforceCreateLeadParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionSalesforceCreateLead) Type() string {
	return f.type_
}

func (f *FlowActionSalesforceCreateLead) Action() string {
	return f.action
}

func (f *FlowActionSalesforceCreateLead) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionSalesforceCreateLead) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceCreateLead) SetID(id string) {
	f.ID = id
	f.require(flowActionSalesforceCreateLeadFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceCreateLead) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionSalesforceCreateLeadFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceCreateLead) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionSalesforceCreateLeadFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceCreateLead) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionSalesforceCreateLeadFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceCreateLead) SetParams(params *FlowActionSalesforceCreateLeadParams) {
	f.Params = params
	f.require(flowActionSalesforceCreateLeadFieldParams)
}

func (f *FlowActionSalesforceCreateLead) UnmarshalJSON(data []byte) error {
	type embed FlowActionSalesforceCreateLead
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionSalesforceCreateLead(unmarshaler.embed)
	if unmarshaler.Type != "SALESFORCE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SALESFORCE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "CREATE_LEAD" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "CREATE_LEAD", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionSalesforceCreateLead) MarshalJSON() ([]byte, error) {
	type embed FlowActionSalesforceCreateLead
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "SALESFORCE",
		Action: "CREATE_LEAD",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionSalesforceCreateLead) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionSalesforceCreateLeadParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionSalesforceCreateLeadParamsFieldFirstName    = big.NewInt(1 << 1)
	flowActionSalesforceCreateLeadParamsFieldLastName     = big.NewInt(1 << 2)
	flowActionSalesforceCreateLeadParamsFieldCompany      = big.NewInt(1 << 3)
	flowActionSalesforceCreateLeadParamsFieldEmail        = big.NewInt(1 << 4)
	flowActionSalesforceCreateLeadParamsFieldPhone        = big.NewInt(1 << 5)
	flowActionSalesforceCreateLeadParamsFieldPayload      = big.NewInt(1 << 6)
)

type FlowActionSalesforceCreateLeadParams struct {
	ConnectionID string                                       `json:"connection_id" url:"connection_id"`
	FirstName    *string                                      `json:"first_name,omitempty" url:"first_name,omitempty"`
	LastName     string                                       `json:"last_name" url:"last_name"`
	Company      string                                       `json:"company" url:"company"`
	Email        *string                                      `json:"email,omitempty" url:"email,omitempty"`
	Phone        *string                                      `json:"phone,omitempty" url:"phone,omitempty"`
	Payload      *FlowActionSalesforceCreateLeadParamsPayload `json:"payload,omitempty" url:"payload,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionSalesforceCreateLeadParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionSalesforceCreateLeadParams) GetFirstName() string {
	if f == nil || f.FirstName == nil {
		return ""
	}
	return *f.FirstName
}

func (f *FlowActionSalesforceCreateLeadParams) GetLastName() string {
	if f == nil {
		return ""
	}
	return f.LastName
}

func (f *FlowActionSalesforceCreateLeadParams) GetCompany() string {
	if f == nil {
		return ""
	}
	return f.Company
}

func (f *FlowActionSalesforceCreateLeadParams) GetEmail() string {
	if f == nil || f.Email == nil {
		return ""
	}
	return *f.Email
}

func (f *FlowActionSalesforceCreateLeadParams) GetPhone() string {
	if f == nil || f.Phone == nil {
		return ""
	}
	return *f.Phone
}

func (f *FlowActionSalesforceCreateLeadParams) GetPayload() FlowActionSalesforceCreateLeadParamsPayload {
	if f == nil || f.Payload == nil {
		return nil
	}
	return *f.Payload
}

func (f *FlowActionSalesforceCreateLeadParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionSalesforceCreateLeadParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceCreateLeadParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionSalesforceCreateLeadParamsFieldConnectionID)
}

// SetFirstName sets the FirstName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceCreateLeadParams) SetFirstName(firstName *string) {
	f.FirstName = firstName
	f.require(flowActionSalesforceCreateLeadParamsFieldFirstName)
}

// SetLastName sets the LastName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceCreateLeadParams) SetLastName(lastName string) {
	f.LastName = lastName
	f.require(flowActionSalesforceCreateLeadParamsFieldLastName)
}

// SetCompany sets the Company field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceCreateLeadParams) SetCompany(company string) {
	f.Company = company
	f.require(flowActionSalesforceCreateLeadParamsFieldCompany)
}

// SetEmail sets the Email field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceCreateLeadParams) SetEmail(email *string) {
	f.Email = email
	f.require(flowActionSalesforceCreateLeadParamsFieldEmail)
}

// SetPhone sets the Phone field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceCreateLeadParams) SetPhone(phone *string) {
	f.Phone = phone
	f.require(flowActionSalesforceCreateLeadParamsFieldPhone)
}

// SetPayload sets the Payload field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceCreateLeadParams) SetPayload(payload *FlowActionSalesforceCreateLeadParamsPayload) {
	f.Payload = payload
	f.require(flowActionSalesforceCreateLeadParamsFieldPayload)
}

func (f *FlowActionSalesforceCreateLeadParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionSalesforceCreateLeadParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionSalesforceCreateLeadParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionSalesforceCreateLeadParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionSalesforceCreateLeadParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionSalesforceCreateLeadParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionSalesforceCreateLeadParamsPayload = map[string]interface{}

var (
	flowActionSalesforceGetLeadFieldID           = big.NewInt(1 << 0)
	flowActionSalesforceGetLeadFieldAlias        = big.NewInt(1 << 1)
	flowActionSalesforceGetLeadFieldAllowFailure = big.NewInt(1 << 2)
	flowActionSalesforceGetLeadFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionSalesforceGetLeadFieldParams       = big.NewInt(1 << 4)
)

type FlowActionSalesforceGetLead struct {
	ID           string                             `json:"id" url:"id"`
	Alias        *string                            `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                              `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                              `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionSalesforceGetLeadParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionSalesforceGetLead) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionSalesforceGetLead) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionSalesforceGetLead) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionSalesforceGetLead) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionSalesforceGetLead) GetParams() *FlowActionSalesforceGetLeadParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionSalesforceGetLead) Type() string {
	return f.type_
}

func (f *FlowActionSalesforceGetLead) Action() string {
	return f.action
}

func (f *FlowActionSalesforceGetLead) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionSalesforceGetLead) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceGetLead) SetID(id string) {
	f.ID = id
	f.require(flowActionSalesforceGetLeadFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceGetLead) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionSalesforceGetLeadFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceGetLead) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionSalesforceGetLeadFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceGetLead) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionSalesforceGetLeadFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceGetLead) SetParams(params *FlowActionSalesforceGetLeadParams) {
	f.Params = params
	f.require(flowActionSalesforceGetLeadFieldParams)
}

func (f *FlowActionSalesforceGetLead) UnmarshalJSON(data []byte) error {
	type embed FlowActionSalesforceGetLead
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionSalesforceGetLead(unmarshaler.embed)
	if unmarshaler.Type != "SALESFORCE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SALESFORCE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "GET_LEAD" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "GET_LEAD", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionSalesforceGetLead) MarshalJSON() ([]byte, error) {
	type embed FlowActionSalesforceGetLead
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "SALESFORCE",
		Action: "GET_LEAD",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionSalesforceGetLead) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionSalesforceGetLeadParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionSalesforceGetLeadParamsFieldLeadID       = big.NewInt(1 << 1)
)

type FlowActionSalesforceGetLeadParams struct {
	ConnectionID string `json:"connection_id" url:"connection_id"`
	LeadID       string `json:"lead_id" url:"lead_id"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionSalesforceGetLeadParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionSalesforceGetLeadParams) GetLeadID() string {
	if f == nil {
		return ""
	}
	return f.LeadID
}

func (f *FlowActionSalesforceGetLeadParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionSalesforceGetLeadParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceGetLeadParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionSalesforceGetLeadParamsFieldConnectionID)
}

// SetLeadID sets the LeadID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceGetLeadParams) SetLeadID(leadID string) {
	f.LeadID = leadID
	f.require(flowActionSalesforceGetLeadParamsFieldLeadID)
}

func (f *FlowActionSalesforceGetLeadParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionSalesforceGetLeadParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionSalesforceGetLeadParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionSalesforceGetLeadParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionSalesforceGetLeadParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionSalesforceGetLeadParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionSalesforceSearchLeadsFieldID           = big.NewInt(1 << 0)
	flowActionSalesforceSearchLeadsFieldAlias        = big.NewInt(1 << 1)
	flowActionSalesforceSearchLeadsFieldAllowFailure = big.NewInt(1 << 2)
	flowActionSalesforceSearchLeadsFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionSalesforceSearchLeadsFieldParams       = big.NewInt(1 << 4)
)

type FlowActionSalesforceSearchLeads struct {
	ID           string                                 `json:"id" url:"id"`
	Alias        *string                                `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                  `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                  `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionSalesforceSearchLeadsParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionSalesforceSearchLeads) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionSalesforceSearchLeads) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionSalesforceSearchLeads) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionSalesforceSearchLeads) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionSalesforceSearchLeads) GetParams() *FlowActionSalesforceSearchLeadsParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionSalesforceSearchLeads) Type() string {
	return f.type_
}

func (f *FlowActionSalesforceSearchLeads) Action() string {
	return f.action
}

func (f *FlowActionSalesforceSearchLeads) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionSalesforceSearchLeads) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceSearchLeads) SetID(id string) {
	f.ID = id
	f.require(flowActionSalesforceSearchLeadsFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceSearchLeads) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionSalesforceSearchLeadsFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceSearchLeads) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionSalesforceSearchLeadsFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceSearchLeads) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionSalesforceSearchLeadsFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceSearchLeads) SetParams(params *FlowActionSalesforceSearchLeadsParams) {
	f.Params = params
	f.require(flowActionSalesforceSearchLeadsFieldParams)
}

func (f *FlowActionSalesforceSearchLeads) UnmarshalJSON(data []byte) error {
	type embed FlowActionSalesforceSearchLeads
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionSalesforceSearchLeads(unmarshaler.embed)
	if unmarshaler.Type != "SALESFORCE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SALESFORCE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "SEARCH_LEADS" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SEARCH_LEADS", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionSalesforceSearchLeads) MarshalJSON() ([]byte, error) {
	type embed FlowActionSalesforceSearchLeads
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "SALESFORCE",
		Action: "SEARCH_LEADS",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionSalesforceSearchLeads) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionSalesforceSearchLeadsParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionSalesforceSearchLeadsParamsFieldSearchField  = big.NewInt(1 << 1)
	flowActionSalesforceSearchLeadsParamsFieldSearchValue  = big.NewInt(1 << 2)
	flowActionSalesforceSearchLeadsParamsFieldLeadFields   = big.NewInt(1 << 3)
)

type FlowActionSalesforceSearchLeadsParams struct {
	ConnectionID string                                           `json:"connection_id" url:"connection_id"`
	SearchField  FlowActionSalesforceSearchLeadsParamsSearchField `json:"search_field" url:"search_field"`
	SearchValue  string                                           `json:"search_value" url:"search_value"`
	LeadFields   []string                                         `json:"lead_fields" url:"lead_fields"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionSalesforceSearchLeadsParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionSalesforceSearchLeadsParams) GetSearchField() FlowActionSalesforceSearchLeadsParamsSearchField {
	if f == nil {
		return ""
	}
	return f.SearchField
}

func (f *FlowActionSalesforceSearchLeadsParams) GetSearchValue() string {
	if f == nil {
		return ""
	}
	return f.SearchValue
}

func (f *FlowActionSalesforceSearchLeadsParams) GetLeadFields() []string {
	if f == nil {
		return nil
	}
	return f.LeadFields
}

func (f *FlowActionSalesforceSearchLeadsParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionSalesforceSearchLeadsParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceSearchLeadsParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionSalesforceSearchLeadsParamsFieldConnectionID)
}

// SetSearchField sets the SearchField field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceSearchLeadsParams) SetSearchField(searchField FlowActionSalesforceSearchLeadsParamsSearchField) {
	f.SearchField = searchField
	f.require(flowActionSalesforceSearchLeadsParamsFieldSearchField)
}

// SetSearchValue sets the SearchValue field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceSearchLeadsParams) SetSearchValue(searchValue string) {
	f.SearchValue = searchValue
	f.require(flowActionSalesforceSearchLeadsParamsFieldSearchValue)
}

// SetLeadFields sets the LeadFields field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceSearchLeadsParams) SetLeadFields(leadFields []string) {
	f.LeadFields = leadFields
	f.require(flowActionSalesforceSearchLeadsParamsFieldLeadFields)
}

func (f *FlowActionSalesforceSearchLeadsParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionSalesforceSearchLeadsParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionSalesforceSearchLeadsParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionSalesforceSearchLeadsParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionSalesforceSearchLeadsParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionSalesforceSearchLeadsParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionSalesforceSearchLeadsParamsSearchField string

const (
	FlowActionSalesforceSearchLeadsParamsSearchFieldEmail FlowActionSalesforceSearchLeadsParamsSearchField = "email"
	FlowActionSalesforceSearchLeadsParamsSearchFieldName  FlowActionSalesforceSearchLeadsParamsSearchField = "name"
	FlowActionSalesforceSearchLeadsParamsSearchFieldPhone FlowActionSalesforceSearchLeadsParamsSearchField = "phone"
	FlowActionSalesforceSearchLeadsParamsSearchFieldAll   FlowActionSalesforceSearchLeadsParamsSearchField = "all"
)

func NewFlowActionSalesforceSearchLeadsParamsSearchFieldFromString(s string) (FlowActionSalesforceSearchLeadsParamsSearchField, error) {
	switch s {
	case "email":
		return FlowActionSalesforceSearchLeadsParamsSearchFieldEmail, nil
	case "name":
		return FlowActionSalesforceSearchLeadsParamsSearchFieldName, nil
	case "phone":
		return FlowActionSalesforceSearchLeadsParamsSearchFieldPhone, nil
	case "all":
		return FlowActionSalesforceSearchLeadsParamsSearchFieldAll, nil
	}
	var t FlowActionSalesforceSearchLeadsParamsSearchField
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (f FlowActionSalesforceSearchLeadsParamsSearchField) Ptr() *FlowActionSalesforceSearchLeadsParamsSearchField {
	return &f
}

var (
	flowActionSalesforceUpdateLeadFieldID           = big.NewInt(1 << 0)
	flowActionSalesforceUpdateLeadFieldAlias        = big.NewInt(1 << 1)
	flowActionSalesforceUpdateLeadFieldAllowFailure = big.NewInt(1 << 2)
	flowActionSalesforceUpdateLeadFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionSalesforceUpdateLeadFieldParams       = big.NewInt(1 << 4)
)

type FlowActionSalesforceUpdateLead struct {
	ID           string                                `json:"id" url:"id"`
	Alias        *string                               `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                 `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                 `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionSalesforceUpdateLeadParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionSalesforceUpdateLead) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionSalesforceUpdateLead) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionSalesforceUpdateLead) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionSalesforceUpdateLead) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionSalesforceUpdateLead) GetParams() *FlowActionSalesforceUpdateLeadParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionSalesforceUpdateLead) Type() string {
	return f.type_
}

func (f *FlowActionSalesforceUpdateLead) Action() string {
	return f.action
}

func (f *FlowActionSalesforceUpdateLead) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionSalesforceUpdateLead) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceUpdateLead) SetID(id string) {
	f.ID = id
	f.require(flowActionSalesforceUpdateLeadFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceUpdateLead) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionSalesforceUpdateLeadFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceUpdateLead) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionSalesforceUpdateLeadFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceUpdateLead) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionSalesforceUpdateLeadFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceUpdateLead) SetParams(params *FlowActionSalesforceUpdateLeadParams) {
	f.Params = params
	f.require(flowActionSalesforceUpdateLeadFieldParams)
}

func (f *FlowActionSalesforceUpdateLead) UnmarshalJSON(data []byte) error {
	type embed FlowActionSalesforceUpdateLead
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionSalesforceUpdateLead(unmarshaler.embed)
	if unmarshaler.Type != "SALESFORCE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SALESFORCE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "UPDATE_LEAD" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "UPDATE_LEAD", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionSalesforceUpdateLead) MarshalJSON() ([]byte, error) {
	type embed FlowActionSalesforceUpdateLead
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "SALESFORCE",
		Action: "UPDATE_LEAD",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionSalesforceUpdateLead) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionSalesforceUpdateLeadParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionSalesforceUpdateLeadParamsFieldLeadID       = big.NewInt(1 << 1)
	flowActionSalesforceUpdateLeadParamsFieldPayload      = big.NewInt(1 << 2)
)

type FlowActionSalesforceUpdateLeadParams struct {
	ConnectionID string                                       `json:"connection_id" url:"connection_id"`
	LeadID       string                                       `json:"lead_id" url:"lead_id"`
	Payload      *FlowActionSalesforceUpdateLeadParamsPayload `json:"payload,omitempty" url:"payload,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionSalesforceUpdateLeadParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionSalesforceUpdateLeadParams) GetLeadID() string {
	if f == nil {
		return ""
	}
	return f.LeadID
}

func (f *FlowActionSalesforceUpdateLeadParams) GetPayload() FlowActionSalesforceUpdateLeadParamsPayload {
	if f == nil || f.Payload == nil {
		return nil
	}
	return *f.Payload
}

func (f *FlowActionSalesforceUpdateLeadParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionSalesforceUpdateLeadParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceUpdateLeadParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionSalesforceUpdateLeadParamsFieldConnectionID)
}

// SetLeadID sets the LeadID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceUpdateLeadParams) SetLeadID(leadID string) {
	f.LeadID = leadID
	f.require(flowActionSalesforceUpdateLeadParamsFieldLeadID)
}

// SetPayload sets the Payload field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSalesforceUpdateLeadParams) SetPayload(payload *FlowActionSalesforceUpdateLeadParamsPayload) {
	f.Payload = payload
	f.require(flowActionSalesforceUpdateLeadParamsFieldPayload)
}

func (f *FlowActionSalesforceUpdateLeadParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionSalesforceUpdateLeadParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionSalesforceUpdateLeadParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionSalesforceUpdateLeadParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionSalesforceUpdateLeadParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionSalesforceUpdateLeadParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionSalesforceUpdateLeadParamsPayload = map[string]interface{}

type FlowActionSendgrid = *FlowActionSendgridSendEmail

var (
	flowActionSendgridSendEmailFieldID           = big.NewInt(1 << 0)
	flowActionSendgridSendEmailFieldAlias        = big.NewInt(1 << 1)
	flowActionSendgridSendEmailFieldAllowFailure = big.NewInt(1 << 2)
	flowActionSendgridSendEmailFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionSendgridSendEmailFieldParams       = big.NewInt(1 << 4)
)

type FlowActionSendgridSendEmail struct {
	ID           string                             `json:"id" url:"id"`
	Alias        *string                            `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                              `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                              `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionSendgridSendEmailParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionSendgridSendEmail) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionSendgridSendEmail) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionSendgridSendEmail) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionSendgridSendEmail) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionSendgridSendEmail) GetParams() *FlowActionSendgridSendEmailParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionSendgridSendEmail) Type() string {
	return f.type_
}

func (f *FlowActionSendgridSendEmail) Action() string {
	return f.action
}

func (f *FlowActionSendgridSendEmail) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionSendgridSendEmail) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSendgridSendEmail) SetID(id string) {
	f.ID = id
	f.require(flowActionSendgridSendEmailFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSendgridSendEmail) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionSendgridSendEmailFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSendgridSendEmail) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionSendgridSendEmailFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSendgridSendEmail) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionSendgridSendEmailFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSendgridSendEmail) SetParams(params *FlowActionSendgridSendEmailParams) {
	f.Params = params
	f.require(flowActionSendgridSendEmailFieldParams)
}

func (f *FlowActionSendgridSendEmail) UnmarshalJSON(data []byte) error {
	type embed FlowActionSendgridSendEmail
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionSendgridSendEmail(unmarshaler.embed)
	if unmarshaler.Type != "SENDGRID" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SENDGRID", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "SEND_EMAIL" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SEND_EMAIL", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionSendgridSendEmail) MarshalJSON() ([]byte, error) {
	type embed FlowActionSendgridSendEmail
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "SENDGRID",
		Action: "SEND_EMAIL",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionSendgridSendEmail) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionSendgridSendEmailParamsFieldConnectionID     = big.NewInt(1 << 0)
	flowActionSendgridSendEmailParamsFieldFrom             = big.NewInt(1 << 1)
	flowActionSendgridSendEmailParamsFieldPersonalizations = big.NewInt(1 << 2)
)

type FlowActionSendgridSendEmailParams struct {
	ConnectionID     string                                   `json:"connection_id" url:"connection_id"`
	From             *FlowActionSendgridSendEmailParamsPerson `json:"from" url:"from"`
	Personalizations []interface{}                            `json:"personalizations" url:"personalizations"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	ExtraProperties map[string]interface{} `json:"-" url:"-"`

	rawJSON json.RawMessage
}

func (f *FlowActionSendgridSendEmailParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionSendgridSendEmailParams) GetFrom() *FlowActionSendgridSendEmailParamsPerson {
	if f == nil {
		return nil
	}
	return f.From
}

func (f *FlowActionSendgridSendEmailParams) GetPersonalizations() []interface{} {
	if f == nil {
		return nil
	}
	return f.Personalizations
}

func (f *FlowActionSendgridSendEmailParams) GetExtraProperties() map[string]interface{} {
	return f.ExtraProperties
}

func (f *FlowActionSendgridSendEmailParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSendgridSendEmailParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionSendgridSendEmailParamsFieldConnectionID)
}

// SetFrom sets the From field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSendgridSendEmailParams) SetFrom(from *FlowActionSendgridSendEmailParamsPerson) {
	f.From = from
	f.require(flowActionSendgridSendEmailParamsFieldFrom)
}

// SetPersonalizations sets the Personalizations field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSendgridSendEmailParams) SetPersonalizations(personalizations []interface{}) {
	f.Personalizations = personalizations
	f.require(flowActionSendgridSendEmailParamsFieldPersonalizations)
}

func (f *FlowActionSendgridSendEmailParams) UnmarshalJSON(data []byte) error {
	type embed FlowActionSendgridSendEmailParams
	var unmarshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionSendgridSendEmailParams(unmarshaler.embed)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.ExtraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionSendgridSendEmailParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionSendgridSendEmailParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return internal.MarshalJSONWithExtraProperties(explicitMarshaler, f.ExtraProperties)
}

func (f *FlowActionSendgridSendEmailParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionSendgridSendEmailParamsPersonFieldName  = big.NewInt(1 << 0)
	flowActionSendgridSendEmailParamsPersonFieldEmail = big.NewInt(1 << 1)
)

type FlowActionSendgridSendEmailParamsPerson struct {
	Name  *string `json:"name,omitempty" url:"name,omitempty"`
	Email string  `json:"email" url:"email"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionSendgridSendEmailParamsPerson) GetName() string {
	if f == nil || f.Name == nil {
		return ""
	}
	return *f.Name
}

func (f *FlowActionSendgridSendEmailParamsPerson) GetEmail() string {
	if f == nil {
		return ""
	}
	return f.Email
}

func (f *FlowActionSendgridSendEmailParamsPerson) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionSendgridSendEmailParamsPerson) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetName sets the Name field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSendgridSendEmailParamsPerson) SetName(name *string) {
	f.Name = name
	f.require(flowActionSendgridSendEmailParamsPersonFieldName)
}

// SetEmail sets the Email field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSendgridSendEmailParamsPerson) SetEmail(email string) {
	f.Email = email
	f.require(flowActionSendgridSendEmailParamsPersonFieldEmail)
}

func (f *FlowActionSendgridSendEmailParamsPerson) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionSendgridSendEmailParamsPerson
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionSendgridSendEmailParamsPerson(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionSendgridSendEmailParamsPerson) MarshalJSON() ([]byte, error) {
	type embed FlowActionSendgridSendEmailParamsPerson
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionSendgridSendEmailParamsPerson) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionSlack = *FlowActionSlackPostMessage

var (
	flowActionSlackPostMessageFieldID           = big.NewInt(1 << 0)
	flowActionSlackPostMessageFieldAlias        = big.NewInt(1 << 1)
	flowActionSlackPostMessageFieldAllowFailure = big.NewInt(1 << 2)
	flowActionSlackPostMessageFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionSlackPostMessageFieldParams       = big.NewInt(1 << 4)
)

type FlowActionSlackPostMessage struct {
	ID           string                            `json:"id" url:"id"`
	Alias        *string                           `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                             `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                             `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionSlackPostMessageParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionSlackPostMessage) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionSlackPostMessage) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionSlackPostMessage) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionSlackPostMessage) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionSlackPostMessage) GetParams() *FlowActionSlackPostMessageParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionSlackPostMessage) Type() string {
	return f.type_
}

func (f *FlowActionSlackPostMessage) Action() string {
	return f.action
}

func (f *FlowActionSlackPostMessage) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionSlackPostMessage) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSlackPostMessage) SetID(id string) {
	f.ID = id
	f.require(flowActionSlackPostMessageFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSlackPostMessage) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionSlackPostMessageFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSlackPostMessage) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionSlackPostMessageFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSlackPostMessage) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionSlackPostMessageFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSlackPostMessage) SetParams(params *FlowActionSlackPostMessageParams) {
	f.Params = params
	f.require(flowActionSlackPostMessageFieldParams)
}

func (f *FlowActionSlackPostMessage) UnmarshalJSON(data []byte) error {
	type embed FlowActionSlackPostMessage
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionSlackPostMessage(unmarshaler.embed)
	if unmarshaler.Type != "SLACK" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SLACK", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "POST_MESSAGE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "POST_MESSAGE", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionSlackPostMessage) MarshalJSON() ([]byte, error) {
	type embed FlowActionSlackPostMessage
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "SLACK",
		Action: "POST_MESSAGE",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionSlackPostMessage) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionSlackPostMessageParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionSlackPostMessageParamsFieldText         = big.NewInt(1 << 1)
	flowActionSlackPostMessageParamsFieldAttachments  = big.NewInt(1 << 2)
)

type FlowActionSlackPostMessageParams struct {
	ConnectionID string                                        `json:"connection_id" url:"connection_id"`
	Text         *string                                       `json:"text,omitempty" url:"text,omitempty"`
	Attachments  []*FlowActionSlackPostMessageParamsAttachment `json:"attachments,omitempty" url:"attachments,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionSlackPostMessageParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionSlackPostMessageParams) GetText() string {
	if f == nil || f.Text == nil {
		return ""
	}
	return *f.Text
}

func (f *FlowActionSlackPostMessageParams) GetAttachments() []*FlowActionSlackPostMessageParamsAttachment {
	if f == nil || f.Attachments == nil {
		return nil
	}
	return f.Attachments
}

func (f *FlowActionSlackPostMessageParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionSlackPostMessageParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSlackPostMessageParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionSlackPostMessageParamsFieldConnectionID)
}

// SetText sets the Text field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSlackPostMessageParams) SetText(text *string) {
	f.Text = text
	f.require(flowActionSlackPostMessageParamsFieldText)
}

// SetAttachments sets the Attachments field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSlackPostMessageParams) SetAttachments(attachments []*FlowActionSlackPostMessageParamsAttachment) {
	f.Attachments = attachments
	f.require(flowActionSlackPostMessageParamsFieldAttachments)
}

func (f *FlowActionSlackPostMessageParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionSlackPostMessageParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionSlackPostMessageParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionSlackPostMessageParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionSlackPostMessageParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionSlackPostMessageParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionSlackPostMessageParamsAttachmentFieldColor   = big.NewInt(1 << 0)
	flowActionSlackPostMessageParamsAttachmentFieldPretext = big.NewInt(1 << 1)
	flowActionSlackPostMessageParamsAttachmentFieldText    = big.NewInt(1 << 2)
	flowActionSlackPostMessageParamsAttachmentFieldFields  = big.NewInt(1 << 3)
)

type FlowActionSlackPostMessageParamsAttachment struct {
	Color   *FlowActionSlackPostMessageParamsAttachmentColor   `json:"color,omitempty" url:"color,omitempty"`
	Pretext *string                                            `json:"pretext,omitempty" url:"pretext,omitempty"`
	Text    *string                                            `json:"text,omitempty" url:"text,omitempty"`
	Fields  []*FlowActionSlackPostMessageParamsAttachmentField `json:"fields,omitempty" url:"fields,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionSlackPostMessageParamsAttachment) GetColor() FlowActionSlackPostMessageParamsAttachmentColor {
	if f == nil || f.Color == nil {
		return ""
	}
	return *f.Color
}

func (f *FlowActionSlackPostMessageParamsAttachment) GetPretext() string {
	if f == nil || f.Pretext == nil {
		return ""
	}
	return *f.Pretext
}

func (f *FlowActionSlackPostMessageParamsAttachment) GetText() string {
	if f == nil || f.Text == nil {
		return ""
	}
	return *f.Text
}

func (f *FlowActionSlackPostMessageParamsAttachment) GetFields() []*FlowActionSlackPostMessageParamsAttachmentField {
	if f == nil || f.Fields == nil {
		return nil
	}
	return f.Fields
}

func (f *FlowActionSlackPostMessageParamsAttachment) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionSlackPostMessageParamsAttachment) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetColor sets the Color field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSlackPostMessageParamsAttachment) SetColor(color *FlowActionSlackPostMessageParamsAttachmentColor) {
	f.Color = color
	f.require(flowActionSlackPostMessageParamsAttachmentFieldColor)
}

// SetPretext sets the Pretext field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSlackPostMessageParamsAttachment) SetPretext(pretext *string) {
	f.Pretext = pretext
	f.require(flowActionSlackPostMessageParamsAttachmentFieldPretext)
}

// SetText sets the Text field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSlackPostMessageParamsAttachment) SetText(text *string) {
	f.Text = text
	f.require(flowActionSlackPostMessageParamsAttachmentFieldText)
}

// SetFields sets the Fields field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSlackPostMessageParamsAttachment) SetFields(fields []*FlowActionSlackPostMessageParamsAttachmentField) {
	f.Fields = fields
	f.require(flowActionSlackPostMessageParamsAttachmentFieldFields)
}

func (f *FlowActionSlackPostMessageParamsAttachment) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionSlackPostMessageParamsAttachment
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionSlackPostMessageParamsAttachment(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionSlackPostMessageParamsAttachment) MarshalJSON() ([]byte, error) {
	type embed FlowActionSlackPostMessageParamsAttachment
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionSlackPostMessageParamsAttachment) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionSlackPostMessageParamsAttachmentColor string

const (
	FlowActionSlackPostMessageParamsAttachmentColorGood    FlowActionSlackPostMessageParamsAttachmentColor = "GOOD"
	FlowActionSlackPostMessageParamsAttachmentColorWarning FlowActionSlackPostMessageParamsAttachmentColor = "WARNING"
	FlowActionSlackPostMessageParamsAttachmentColorDanger  FlowActionSlackPostMessageParamsAttachmentColor = "DANGER"
)

func NewFlowActionSlackPostMessageParamsAttachmentColorFromString(s string) (FlowActionSlackPostMessageParamsAttachmentColor, error) {
	switch s {
	case "GOOD":
		return FlowActionSlackPostMessageParamsAttachmentColorGood, nil
	case "WARNING":
		return FlowActionSlackPostMessageParamsAttachmentColorWarning, nil
	case "DANGER":
		return FlowActionSlackPostMessageParamsAttachmentColorDanger, nil
	}
	var t FlowActionSlackPostMessageParamsAttachmentColor
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (f FlowActionSlackPostMessageParamsAttachmentColor) Ptr() *FlowActionSlackPostMessageParamsAttachmentColor {
	return &f
}

var (
	flowActionSlackPostMessageParamsAttachmentFieldFieldTitle = big.NewInt(1 << 0)
	flowActionSlackPostMessageParamsAttachmentFieldFieldValue = big.NewInt(1 << 1)
	flowActionSlackPostMessageParamsAttachmentFieldFieldShort = big.NewInt(1 << 2)
)

type FlowActionSlackPostMessageParamsAttachmentField struct {
	Title string  `json:"title" url:"title"`
	Value *string `json:"value,omitempty" url:"value,omitempty"`
	Short *bool   `json:"short,omitempty" url:"short,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionSlackPostMessageParamsAttachmentField) GetTitle() string {
	if f == nil {
		return ""
	}
	return f.Title
}

func (f *FlowActionSlackPostMessageParamsAttachmentField) GetValue() string {
	if f == nil || f.Value == nil {
		return ""
	}
	return *f.Value
}

func (f *FlowActionSlackPostMessageParamsAttachmentField) GetShort() bool {
	if f == nil || f.Short == nil {
		return false
	}
	return *f.Short
}

func (f *FlowActionSlackPostMessageParamsAttachmentField) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionSlackPostMessageParamsAttachmentField) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetTitle sets the Title field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSlackPostMessageParamsAttachmentField) SetTitle(title string) {
	f.Title = title
	f.require(flowActionSlackPostMessageParamsAttachmentFieldFieldTitle)
}

// SetValue sets the Value field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSlackPostMessageParamsAttachmentField) SetValue(value *string) {
	f.Value = value
	f.require(flowActionSlackPostMessageParamsAttachmentFieldFieldValue)
}

// SetShort sets the Short field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionSlackPostMessageParamsAttachmentField) SetShort(short *bool) {
	f.Short = short
	f.require(flowActionSlackPostMessageParamsAttachmentFieldFieldShort)
}

func (f *FlowActionSlackPostMessageParamsAttachmentField) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionSlackPostMessageParamsAttachmentField
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionSlackPostMessageParamsAttachmentField(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionSlackPostMessageParamsAttachmentField) MarshalJSON() ([]byte, error) {
	type embed FlowActionSlackPostMessageParamsAttachmentField
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionSlackPostMessageParamsAttachmentField) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionStripe struct {
	FlowActionStripeAddTaxID            *FlowActionStripeAddTaxID
	FlowActionStripeCreateCustomer      *FlowActionStripeCreateCustomer
	FlowActionStripeCreatePortalSession *FlowActionStripeCreatePortalSession
	FlowActionStripeDeleteTaxID         *FlowActionStripeDeleteTaxID
	FlowActionStripeFindCustomers       *FlowActionStripeFindCustomers
	FlowActionStripeGetCustomer         *FlowActionStripeGetCustomer
	FlowActionStripeUpdateCustomer      *FlowActionStripeUpdateCustomer

	typ string
}

func (f *FlowActionStripe) GetFlowActionStripeAddTaxID() *FlowActionStripeAddTaxID {
	if f == nil {
		return nil
	}
	return f.FlowActionStripeAddTaxID
}

func (f *FlowActionStripe) GetFlowActionStripeCreateCustomer() *FlowActionStripeCreateCustomer {
	if f == nil {
		return nil
	}
	return f.FlowActionStripeCreateCustomer
}

func (f *FlowActionStripe) GetFlowActionStripeCreatePortalSession() *FlowActionStripeCreatePortalSession {
	if f == nil {
		return nil
	}
	return f.FlowActionStripeCreatePortalSession
}

func (f *FlowActionStripe) GetFlowActionStripeDeleteTaxID() *FlowActionStripeDeleteTaxID {
	if f == nil {
		return nil
	}
	return f.FlowActionStripeDeleteTaxID
}

func (f *FlowActionStripe) GetFlowActionStripeFindCustomers() *FlowActionStripeFindCustomers {
	if f == nil {
		return nil
	}
	return f.FlowActionStripeFindCustomers
}

func (f *FlowActionStripe) GetFlowActionStripeGetCustomer() *FlowActionStripeGetCustomer {
	if f == nil {
		return nil
	}
	return f.FlowActionStripeGetCustomer
}

func (f *FlowActionStripe) GetFlowActionStripeUpdateCustomer() *FlowActionStripeUpdateCustomer {
	if f == nil {
		return nil
	}
	return f.FlowActionStripeUpdateCustomer
}

func (f *FlowActionStripe) UnmarshalJSON(data []byte) error {
	valueFlowActionStripeAddTaxID := new(FlowActionStripeAddTaxID)
	if err := json.Unmarshal(data, &valueFlowActionStripeAddTaxID); err == nil {
		f.typ = "FlowActionStripeAddTaxID"
		f.FlowActionStripeAddTaxID = valueFlowActionStripeAddTaxID
		return nil
	}
	valueFlowActionStripeCreateCustomer := new(FlowActionStripeCreateCustomer)
	if err := json.Unmarshal(data, &valueFlowActionStripeCreateCustomer); err == nil {
		f.typ = "FlowActionStripeCreateCustomer"
		f.FlowActionStripeCreateCustomer = valueFlowActionStripeCreateCustomer
		return nil
	}
	valueFlowActionStripeCreatePortalSession := new(FlowActionStripeCreatePortalSession)
	if err := json.Unmarshal(data, &valueFlowActionStripeCreatePortalSession); err == nil {
		f.typ = "FlowActionStripeCreatePortalSession"
		f.FlowActionStripeCreatePortalSession = valueFlowActionStripeCreatePortalSession
		return nil
	}
	valueFlowActionStripeDeleteTaxID := new(FlowActionStripeDeleteTaxID)
	if err := json.Unmarshal(data, &valueFlowActionStripeDeleteTaxID); err == nil {
		f.typ = "FlowActionStripeDeleteTaxID"
		f.FlowActionStripeDeleteTaxID = valueFlowActionStripeDeleteTaxID
		return nil
	}
	valueFlowActionStripeFindCustomers := new(FlowActionStripeFindCustomers)
	if err := json.Unmarshal(data, &valueFlowActionStripeFindCustomers); err == nil {
		f.typ = "FlowActionStripeFindCustomers"
		f.FlowActionStripeFindCustomers = valueFlowActionStripeFindCustomers
		return nil
	}
	valueFlowActionStripeGetCustomer := new(FlowActionStripeGetCustomer)
	if err := json.Unmarshal(data, &valueFlowActionStripeGetCustomer); err == nil {
		f.typ = "FlowActionStripeGetCustomer"
		f.FlowActionStripeGetCustomer = valueFlowActionStripeGetCustomer
		return nil
	}
	valueFlowActionStripeUpdateCustomer := new(FlowActionStripeUpdateCustomer)
	if err := json.Unmarshal(data, &valueFlowActionStripeUpdateCustomer); err == nil {
		f.typ = "FlowActionStripeUpdateCustomer"
		f.FlowActionStripeUpdateCustomer = valueFlowActionStripeUpdateCustomer
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionStripe) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionStripeAddTaxID" || f.FlowActionStripeAddTaxID != nil {
		return json.Marshal(f.FlowActionStripeAddTaxID)
	}
	if f.typ == "FlowActionStripeCreateCustomer" || f.FlowActionStripeCreateCustomer != nil {
		return json.Marshal(f.FlowActionStripeCreateCustomer)
	}
	if f.typ == "FlowActionStripeCreatePortalSession" || f.FlowActionStripeCreatePortalSession != nil {
		return json.Marshal(f.FlowActionStripeCreatePortalSession)
	}
	if f.typ == "FlowActionStripeDeleteTaxID" || f.FlowActionStripeDeleteTaxID != nil {
		return json.Marshal(f.FlowActionStripeDeleteTaxID)
	}
	if f.typ == "FlowActionStripeFindCustomers" || f.FlowActionStripeFindCustomers != nil {
		return json.Marshal(f.FlowActionStripeFindCustomers)
	}
	if f.typ == "FlowActionStripeGetCustomer" || f.FlowActionStripeGetCustomer != nil {
		return json.Marshal(f.FlowActionStripeGetCustomer)
	}
	if f.typ == "FlowActionStripeUpdateCustomer" || f.FlowActionStripeUpdateCustomer != nil {
		return json.Marshal(f.FlowActionStripeUpdateCustomer)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionStripeVisitor interface {
	VisitFlowActionStripeAddTaxID(*FlowActionStripeAddTaxID) error
	VisitFlowActionStripeCreateCustomer(*FlowActionStripeCreateCustomer) error
	VisitFlowActionStripeCreatePortalSession(*FlowActionStripeCreatePortalSession) error
	VisitFlowActionStripeDeleteTaxID(*FlowActionStripeDeleteTaxID) error
	VisitFlowActionStripeFindCustomers(*FlowActionStripeFindCustomers) error
	VisitFlowActionStripeGetCustomer(*FlowActionStripeGetCustomer) error
	VisitFlowActionStripeUpdateCustomer(*FlowActionStripeUpdateCustomer) error
}

func (f *FlowActionStripe) Accept(visitor FlowActionStripeVisitor) error {
	if f.typ == "FlowActionStripeAddTaxID" || f.FlowActionStripeAddTaxID != nil {
		return visitor.VisitFlowActionStripeAddTaxID(f.FlowActionStripeAddTaxID)
	}
	if f.typ == "FlowActionStripeCreateCustomer" || f.FlowActionStripeCreateCustomer != nil {
		return visitor.VisitFlowActionStripeCreateCustomer(f.FlowActionStripeCreateCustomer)
	}
	if f.typ == "FlowActionStripeCreatePortalSession" || f.FlowActionStripeCreatePortalSession != nil {
		return visitor.VisitFlowActionStripeCreatePortalSession(f.FlowActionStripeCreatePortalSession)
	}
	if f.typ == "FlowActionStripeDeleteTaxID" || f.FlowActionStripeDeleteTaxID != nil {
		return visitor.VisitFlowActionStripeDeleteTaxID(f.FlowActionStripeDeleteTaxID)
	}
	if f.typ == "FlowActionStripeFindCustomers" || f.FlowActionStripeFindCustomers != nil {
		return visitor.VisitFlowActionStripeFindCustomers(f.FlowActionStripeFindCustomers)
	}
	if f.typ == "FlowActionStripeGetCustomer" || f.FlowActionStripeGetCustomer != nil {
		return visitor.VisitFlowActionStripeGetCustomer(f.FlowActionStripeGetCustomer)
	}
	if f.typ == "FlowActionStripeUpdateCustomer" || f.FlowActionStripeUpdateCustomer != nil {
		return visitor.VisitFlowActionStripeUpdateCustomer(f.FlowActionStripeUpdateCustomer)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionStripeAddTaxIDFieldID           = big.NewInt(1 << 0)
	flowActionStripeAddTaxIDFieldAlias        = big.NewInt(1 << 1)
	flowActionStripeAddTaxIDFieldAllowFailure = big.NewInt(1 << 2)
	flowActionStripeAddTaxIDFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionStripeAddTaxIDFieldParams       = big.NewInt(1 << 4)
)

type FlowActionStripeAddTaxID struct {
	ID           string                          `json:"id" url:"id"`
	Alias        *string                         `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                           `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                           `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionStripeAddTaxIDParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionStripeAddTaxID) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionStripeAddTaxID) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionStripeAddTaxID) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionStripeAddTaxID) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionStripeAddTaxID) GetParams() *FlowActionStripeAddTaxIDParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionStripeAddTaxID) Type() string {
	return f.type_
}

func (f *FlowActionStripeAddTaxID) Action() string {
	return f.action
}

func (f *FlowActionStripeAddTaxID) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionStripeAddTaxID) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeAddTaxID) SetID(id string) {
	f.ID = id
	f.require(flowActionStripeAddTaxIDFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeAddTaxID) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionStripeAddTaxIDFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeAddTaxID) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionStripeAddTaxIDFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeAddTaxID) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionStripeAddTaxIDFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeAddTaxID) SetParams(params *FlowActionStripeAddTaxIDParams) {
	f.Params = params
	f.require(flowActionStripeAddTaxIDFieldParams)
}

func (f *FlowActionStripeAddTaxID) UnmarshalJSON(data []byte) error {
	type embed FlowActionStripeAddTaxID
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionStripeAddTaxID(unmarshaler.embed)
	if unmarshaler.Type != "STRIPE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "STRIPE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "ADD_TAX_ID" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "ADD_TAX_ID", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionStripeAddTaxID) MarshalJSON() ([]byte, error) {
	type embed FlowActionStripeAddTaxID
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "STRIPE",
		Action: "ADD_TAX_ID",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionStripeAddTaxID) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionStripeAddTaxIDParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionStripeAddTaxIDParamsFieldCustomerID   = big.NewInt(1 << 1)
	flowActionStripeAddTaxIDParamsFieldType         = big.NewInt(1 << 2)
	flowActionStripeAddTaxIDParamsFieldValue        = big.NewInt(1 << 3)
)

type FlowActionStripeAddTaxIDParams struct {
	ConnectionID string `json:"connection_id" url:"connection_id"`
	CustomerID   string `json:"customer_id" url:"customer_id"`
	Type         string `json:"type" url:"type"`
	Value        string `json:"value" url:"value"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionStripeAddTaxIDParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionStripeAddTaxIDParams) GetCustomerID() string {
	if f == nil {
		return ""
	}
	return f.CustomerID
}

func (f *FlowActionStripeAddTaxIDParams) GetType() string {
	if f == nil {
		return ""
	}
	return f.Type
}

func (f *FlowActionStripeAddTaxIDParams) GetValue() string {
	if f == nil {
		return ""
	}
	return f.Value
}

func (f *FlowActionStripeAddTaxIDParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionStripeAddTaxIDParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeAddTaxIDParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionStripeAddTaxIDParamsFieldConnectionID)
}

// SetCustomerID sets the CustomerID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeAddTaxIDParams) SetCustomerID(customerID string) {
	f.CustomerID = customerID
	f.require(flowActionStripeAddTaxIDParamsFieldCustomerID)
}

// SetType sets the Type field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeAddTaxIDParams) SetType(type_ string) {
	f.Type = type_
	f.require(flowActionStripeAddTaxIDParamsFieldType)
}

// SetValue sets the Value field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeAddTaxIDParams) SetValue(value string) {
	f.Value = value
	f.require(flowActionStripeAddTaxIDParamsFieldValue)
}

func (f *FlowActionStripeAddTaxIDParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionStripeAddTaxIDParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionStripeAddTaxIDParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionStripeAddTaxIDParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionStripeAddTaxIDParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionStripeAddTaxIDParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionStripeAddressFieldLine1      = big.NewInt(1 << 0)
	flowActionStripeAddressFieldLine2      = big.NewInt(1 << 1)
	flowActionStripeAddressFieldPostalCode = big.NewInt(1 << 2)
	flowActionStripeAddressFieldCity       = big.NewInt(1 << 3)
	flowActionStripeAddressFieldState      = big.NewInt(1 << 4)
	flowActionStripeAddressFieldCountry    = big.NewInt(1 << 5)
)

type FlowActionStripeAddress struct {
	Line1      *string `json:"line1,omitempty" url:"line1,omitempty"`
	Line2      *string `json:"line2,omitempty" url:"line2,omitempty"`
	PostalCode *string `json:"postalCode,omitempty" url:"postalCode,omitempty"`
	City       *string `json:"city,omitempty" url:"city,omitempty"`
	State      *string `json:"state,omitempty" url:"state,omitempty"`
	Country    *string `json:"country,omitempty" url:"country,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionStripeAddress) GetLine1() string {
	if f == nil || f.Line1 == nil {
		return ""
	}
	return *f.Line1
}

func (f *FlowActionStripeAddress) GetLine2() string {
	if f == nil || f.Line2 == nil {
		return ""
	}
	return *f.Line2
}

func (f *FlowActionStripeAddress) GetPostalCode() string {
	if f == nil || f.PostalCode == nil {
		return ""
	}
	return *f.PostalCode
}

func (f *FlowActionStripeAddress) GetCity() string {
	if f == nil || f.City == nil {
		return ""
	}
	return *f.City
}

func (f *FlowActionStripeAddress) GetState() string {
	if f == nil || f.State == nil {
		return ""
	}
	return *f.State
}

func (f *FlowActionStripeAddress) GetCountry() string {
	if f == nil || f.Country == nil {
		return ""
	}
	return *f.Country
}

func (f *FlowActionStripeAddress) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionStripeAddress) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetLine1 sets the Line1 field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeAddress) SetLine1(line1 *string) {
	f.Line1 = line1
	f.require(flowActionStripeAddressFieldLine1)
}

// SetLine2 sets the Line2 field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeAddress) SetLine2(line2 *string) {
	f.Line2 = line2
	f.require(flowActionStripeAddressFieldLine2)
}

// SetPostalCode sets the PostalCode field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeAddress) SetPostalCode(postalCode *string) {
	f.PostalCode = postalCode
	f.require(flowActionStripeAddressFieldPostalCode)
}

// SetCity sets the City field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeAddress) SetCity(city *string) {
	f.City = city
	f.require(flowActionStripeAddressFieldCity)
}

// SetState sets the State field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeAddress) SetState(state *string) {
	f.State = state
	f.require(flowActionStripeAddressFieldState)
}

// SetCountry sets the Country field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeAddress) SetCountry(country *string) {
	f.Country = country
	f.require(flowActionStripeAddressFieldCountry)
}

func (f *FlowActionStripeAddress) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionStripeAddress
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionStripeAddress(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionStripeAddress) MarshalJSON() ([]byte, error) {
	type embed FlowActionStripeAddress
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionStripeAddress) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionStripeCreateCustomerFieldID           = big.NewInt(1 << 0)
	flowActionStripeCreateCustomerFieldAlias        = big.NewInt(1 << 1)
	flowActionStripeCreateCustomerFieldAllowFailure = big.NewInt(1 << 2)
	flowActionStripeCreateCustomerFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionStripeCreateCustomerFieldParams       = big.NewInt(1 << 4)
)

type FlowActionStripeCreateCustomer struct {
	ID           string                                `json:"id" url:"id"`
	Alias        *string                               `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                 `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                 `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionStripeCreateCustomerParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionStripeCreateCustomer) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionStripeCreateCustomer) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionStripeCreateCustomer) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionStripeCreateCustomer) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionStripeCreateCustomer) GetParams() *FlowActionStripeCreateCustomerParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionStripeCreateCustomer) Type() string {
	return f.type_
}

func (f *FlowActionStripeCreateCustomer) Action() string {
	return f.action
}

func (f *FlowActionStripeCreateCustomer) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionStripeCreateCustomer) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreateCustomer) SetID(id string) {
	f.ID = id
	f.require(flowActionStripeCreateCustomerFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreateCustomer) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionStripeCreateCustomerFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreateCustomer) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionStripeCreateCustomerFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreateCustomer) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionStripeCreateCustomerFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreateCustomer) SetParams(params *FlowActionStripeCreateCustomerParams) {
	f.Params = params
	f.require(flowActionStripeCreateCustomerFieldParams)
}

func (f *FlowActionStripeCreateCustomer) UnmarshalJSON(data []byte) error {
	type embed FlowActionStripeCreateCustomer
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionStripeCreateCustomer(unmarshaler.embed)
	if unmarshaler.Type != "STRIPE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "STRIPE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "CREATE_CUSTOMER" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "CREATE_CUSTOMER", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionStripeCreateCustomer) MarshalJSON() ([]byte, error) {
	type embed FlowActionStripeCreateCustomer
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "STRIPE",
		Action: "CREATE_CUSTOMER",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionStripeCreateCustomer) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionStripeCreateCustomerParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionStripeCreateCustomerParamsFieldTaxID        = big.NewInt(1 << 1)
	flowActionStripeCreateCustomerParamsFieldName         = big.NewInt(1 << 2)
	flowActionStripeCreateCustomerParamsFieldDescription  = big.NewInt(1 << 3)
	flowActionStripeCreateCustomerParamsFieldEmail        = big.NewInt(1 << 4)
	flowActionStripeCreateCustomerParamsFieldPhone        = big.NewInt(1 << 5)
	flowActionStripeCreateCustomerParamsFieldTaxExempt    = big.NewInt(1 << 6)
	flowActionStripeCreateCustomerParamsFieldAddress      = big.NewInt(1 << 7)
	flowActionStripeCreateCustomerParamsFieldMetadata     = big.NewInt(1 << 8)
)

type FlowActionStripeCreateCustomerParams struct {
	ConnectionID string                    `json:"connection_id" url:"connection_id"`
	TaxID        *FlowActionStripeTaxID    `json:"tax_id,omitempty" url:"tax_id,omitempty"`
	Name         *string                   `json:"name,omitempty" url:"name,omitempty"`
	Description  *string                   `json:"description,omitempty" url:"description,omitempty"`
	Email        *string                   `json:"email,omitempty" url:"email,omitempty"`
	Phone        *string                   `json:"phone,omitempty" url:"phone,omitempty"`
	TaxExempt    *string                   `json:"tax_exempt,omitempty" url:"tax_exempt,omitempty"`
	Address      *FlowActionStripeAddress  `json:"address,omitempty" url:"address,omitempty"`
	Metadata     *FlowActionStripeMetadata `json:"metadata,omitempty" url:"metadata,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionStripeCreateCustomerParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionStripeCreateCustomerParams) GetTaxID() FlowActionStripeTaxID {
	if f == nil || f.TaxID == nil {
		return FlowActionStripeTaxID{}
	}
	return *f.TaxID
}

func (f *FlowActionStripeCreateCustomerParams) GetName() string {
	if f == nil || f.Name == nil {
		return ""
	}
	return *f.Name
}

func (f *FlowActionStripeCreateCustomerParams) GetDescription() string {
	if f == nil || f.Description == nil {
		return ""
	}
	return *f.Description
}

func (f *FlowActionStripeCreateCustomerParams) GetEmail() string {
	if f == nil || f.Email == nil {
		return ""
	}
	return *f.Email
}

func (f *FlowActionStripeCreateCustomerParams) GetPhone() string {
	if f == nil || f.Phone == nil {
		return ""
	}
	return *f.Phone
}

func (f *FlowActionStripeCreateCustomerParams) GetTaxExempt() string {
	if f == nil || f.TaxExempt == nil {
		return ""
	}
	return *f.TaxExempt
}

func (f *FlowActionStripeCreateCustomerParams) GetAddress() FlowActionStripeAddress {
	if f == nil || f.Address == nil {
		return FlowActionStripeAddress{}
	}
	return *f.Address
}

func (f *FlowActionStripeCreateCustomerParams) GetMetadata() FlowActionStripeMetadata {
	if f == nil || f.Metadata == nil {
		return nil
	}
	return *f.Metadata
}

func (f *FlowActionStripeCreateCustomerParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionStripeCreateCustomerParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreateCustomerParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionStripeCreateCustomerParamsFieldConnectionID)
}

// SetTaxID sets the TaxID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreateCustomerParams) SetTaxID(taxID *FlowActionStripeTaxID) {
	f.TaxID = taxID
	f.require(flowActionStripeCreateCustomerParamsFieldTaxID)
}

// SetName sets the Name field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreateCustomerParams) SetName(name *string) {
	f.Name = name
	f.require(flowActionStripeCreateCustomerParamsFieldName)
}

// SetDescription sets the Description field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreateCustomerParams) SetDescription(description *string) {
	f.Description = description
	f.require(flowActionStripeCreateCustomerParamsFieldDescription)
}

// SetEmail sets the Email field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreateCustomerParams) SetEmail(email *string) {
	f.Email = email
	f.require(flowActionStripeCreateCustomerParamsFieldEmail)
}

// SetPhone sets the Phone field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreateCustomerParams) SetPhone(phone *string) {
	f.Phone = phone
	f.require(flowActionStripeCreateCustomerParamsFieldPhone)
}

// SetTaxExempt sets the TaxExempt field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreateCustomerParams) SetTaxExempt(taxExempt *string) {
	f.TaxExempt = taxExempt
	f.require(flowActionStripeCreateCustomerParamsFieldTaxExempt)
}

// SetAddress sets the Address field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreateCustomerParams) SetAddress(address *FlowActionStripeAddress) {
	f.Address = address
	f.require(flowActionStripeCreateCustomerParamsFieldAddress)
}

// SetMetadata sets the Metadata field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreateCustomerParams) SetMetadata(metadata *FlowActionStripeMetadata) {
	f.Metadata = metadata
	f.require(flowActionStripeCreateCustomerParamsFieldMetadata)
}

func (f *FlowActionStripeCreateCustomerParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionStripeCreateCustomerParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionStripeCreateCustomerParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionStripeCreateCustomerParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionStripeCreateCustomerParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionStripeCreateCustomerParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionStripeCreatePortalSessionFieldID           = big.NewInt(1 << 0)
	flowActionStripeCreatePortalSessionFieldAlias        = big.NewInt(1 << 1)
	flowActionStripeCreatePortalSessionFieldAllowFailure = big.NewInt(1 << 2)
	flowActionStripeCreatePortalSessionFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionStripeCreatePortalSessionFieldParams       = big.NewInt(1 << 4)
)

type FlowActionStripeCreatePortalSession struct {
	ID           string                                     `json:"id" url:"id"`
	Alias        *string                                    `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                      `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                      `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionStripeCreatePortalSessionParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionStripeCreatePortalSession) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionStripeCreatePortalSession) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionStripeCreatePortalSession) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionStripeCreatePortalSession) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionStripeCreatePortalSession) GetParams() *FlowActionStripeCreatePortalSessionParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionStripeCreatePortalSession) Type() string {
	return f.type_
}

func (f *FlowActionStripeCreatePortalSession) Action() string {
	return f.action
}

func (f *FlowActionStripeCreatePortalSession) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionStripeCreatePortalSession) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreatePortalSession) SetID(id string) {
	f.ID = id
	f.require(flowActionStripeCreatePortalSessionFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreatePortalSession) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionStripeCreatePortalSessionFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreatePortalSession) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionStripeCreatePortalSessionFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreatePortalSession) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionStripeCreatePortalSessionFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreatePortalSession) SetParams(params *FlowActionStripeCreatePortalSessionParams) {
	f.Params = params
	f.require(flowActionStripeCreatePortalSessionFieldParams)
}

func (f *FlowActionStripeCreatePortalSession) UnmarshalJSON(data []byte) error {
	type embed FlowActionStripeCreatePortalSession
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionStripeCreatePortalSession(unmarshaler.embed)
	if unmarshaler.Type != "STRIPE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "STRIPE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "CREATE_PORTAL_SESSION" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "CREATE_PORTAL_SESSION", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionStripeCreatePortalSession) MarshalJSON() ([]byte, error) {
	type embed FlowActionStripeCreatePortalSession
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "STRIPE",
		Action: "CREATE_PORTAL_SESSION",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionStripeCreatePortalSession) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionStripeCreatePortalSessionParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionStripeCreatePortalSessionParamsFieldCustomerID   = big.NewInt(1 << 1)
	flowActionStripeCreatePortalSessionParamsFieldReturnURL    = big.NewInt(1 << 2)
)

type FlowActionStripeCreatePortalSessionParams struct {
	ConnectionID string  `json:"connection_id" url:"connection_id"`
	CustomerID   string  `json:"customer_id" url:"customer_id"`
	ReturnURL    *string `json:"return_url,omitempty" url:"return_url,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionStripeCreatePortalSessionParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionStripeCreatePortalSessionParams) GetCustomerID() string {
	if f == nil {
		return ""
	}
	return f.CustomerID
}

func (f *FlowActionStripeCreatePortalSessionParams) GetReturnURL() string {
	if f == nil || f.ReturnURL == nil {
		return ""
	}
	return *f.ReturnURL
}

func (f *FlowActionStripeCreatePortalSessionParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionStripeCreatePortalSessionParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreatePortalSessionParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionStripeCreatePortalSessionParamsFieldConnectionID)
}

// SetCustomerID sets the CustomerID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreatePortalSessionParams) SetCustomerID(customerID string) {
	f.CustomerID = customerID
	f.require(flowActionStripeCreatePortalSessionParamsFieldCustomerID)
}

// SetReturnURL sets the ReturnURL field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeCreatePortalSessionParams) SetReturnURL(returnURL *string) {
	f.ReturnURL = returnURL
	f.require(flowActionStripeCreatePortalSessionParamsFieldReturnURL)
}

func (f *FlowActionStripeCreatePortalSessionParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionStripeCreatePortalSessionParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionStripeCreatePortalSessionParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionStripeCreatePortalSessionParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionStripeCreatePortalSessionParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionStripeCreatePortalSessionParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionStripeDeleteTaxIDFieldID           = big.NewInt(1 << 0)
	flowActionStripeDeleteTaxIDFieldAlias        = big.NewInt(1 << 1)
	flowActionStripeDeleteTaxIDFieldAllowFailure = big.NewInt(1 << 2)
	flowActionStripeDeleteTaxIDFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionStripeDeleteTaxIDFieldParams       = big.NewInt(1 << 4)
)

type FlowActionStripeDeleteTaxID struct {
	ID           string                             `json:"id" url:"id"`
	Alias        *string                            `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                              `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                              `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionStripeDeleteTaxIDParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionStripeDeleteTaxID) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionStripeDeleteTaxID) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionStripeDeleteTaxID) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionStripeDeleteTaxID) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionStripeDeleteTaxID) GetParams() *FlowActionStripeDeleteTaxIDParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionStripeDeleteTaxID) Type() string {
	return f.type_
}

func (f *FlowActionStripeDeleteTaxID) Action() string {
	return f.action
}

func (f *FlowActionStripeDeleteTaxID) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionStripeDeleteTaxID) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeDeleteTaxID) SetID(id string) {
	f.ID = id
	f.require(flowActionStripeDeleteTaxIDFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeDeleteTaxID) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionStripeDeleteTaxIDFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeDeleteTaxID) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionStripeDeleteTaxIDFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeDeleteTaxID) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionStripeDeleteTaxIDFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeDeleteTaxID) SetParams(params *FlowActionStripeDeleteTaxIDParams) {
	f.Params = params
	f.require(flowActionStripeDeleteTaxIDFieldParams)
}

func (f *FlowActionStripeDeleteTaxID) UnmarshalJSON(data []byte) error {
	type embed FlowActionStripeDeleteTaxID
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionStripeDeleteTaxID(unmarshaler.embed)
	if unmarshaler.Type != "STRIPE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "STRIPE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "DELETE_TAX_ID" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "DELETE_TAX_ID", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionStripeDeleteTaxID) MarshalJSON() ([]byte, error) {
	type embed FlowActionStripeDeleteTaxID
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "STRIPE",
		Action: "DELETE_TAX_ID",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionStripeDeleteTaxID) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionStripeDeleteTaxIDParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionStripeDeleteTaxIDParamsFieldCustomerID   = big.NewInt(1 << 1)
	flowActionStripeDeleteTaxIDParamsFieldID           = big.NewInt(1 << 2)
)

type FlowActionStripeDeleteTaxIDParams struct {
	ConnectionID string `json:"connection_id" url:"connection_id"`
	CustomerID   string `json:"customer_id" url:"customer_id"`
	ID           string `json:"id" url:"id"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionStripeDeleteTaxIDParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionStripeDeleteTaxIDParams) GetCustomerID() string {
	if f == nil {
		return ""
	}
	return f.CustomerID
}

func (f *FlowActionStripeDeleteTaxIDParams) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionStripeDeleteTaxIDParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionStripeDeleteTaxIDParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeDeleteTaxIDParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionStripeDeleteTaxIDParamsFieldConnectionID)
}

// SetCustomerID sets the CustomerID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeDeleteTaxIDParams) SetCustomerID(customerID string) {
	f.CustomerID = customerID
	f.require(flowActionStripeDeleteTaxIDParamsFieldCustomerID)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeDeleteTaxIDParams) SetID(id string) {
	f.ID = id
	f.require(flowActionStripeDeleteTaxIDParamsFieldID)
}

func (f *FlowActionStripeDeleteTaxIDParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionStripeDeleteTaxIDParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionStripeDeleteTaxIDParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionStripeDeleteTaxIDParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionStripeDeleteTaxIDParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionStripeDeleteTaxIDParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionStripeFindCustomersFieldID           = big.NewInt(1 << 0)
	flowActionStripeFindCustomersFieldAlias        = big.NewInt(1 << 1)
	flowActionStripeFindCustomersFieldAllowFailure = big.NewInt(1 << 2)
	flowActionStripeFindCustomersFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionStripeFindCustomersFieldParams       = big.NewInt(1 << 4)
)

type FlowActionStripeFindCustomers struct {
	ID           string                               `json:"id" url:"id"`
	Alias        *string                              `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionStripeFindCustomersParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionStripeFindCustomers) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionStripeFindCustomers) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionStripeFindCustomers) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionStripeFindCustomers) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionStripeFindCustomers) GetParams() *FlowActionStripeFindCustomersParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionStripeFindCustomers) Type() string {
	return f.type_
}

func (f *FlowActionStripeFindCustomers) Action() string {
	return f.action
}

func (f *FlowActionStripeFindCustomers) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionStripeFindCustomers) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeFindCustomers) SetID(id string) {
	f.ID = id
	f.require(flowActionStripeFindCustomersFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeFindCustomers) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionStripeFindCustomersFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeFindCustomers) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionStripeFindCustomersFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeFindCustomers) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionStripeFindCustomersFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeFindCustomers) SetParams(params *FlowActionStripeFindCustomersParams) {
	f.Params = params
	f.require(flowActionStripeFindCustomersFieldParams)
}

func (f *FlowActionStripeFindCustomers) UnmarshalJSON(data []byte) error {
	type embed FlowActionStripeFindCustomers
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionStripeFindCustomers(unmarshaler.embed)
	if unmarshaler.Type != "STRIPE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "STRIPE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "FIND_CUSTOMERS" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "FIND_CUSTOMERS", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionStripeFindCustomers) MarshalJSON() ([]byte, error) {
	type embed FlowActionStripeFindCustomers
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "STRIPE",
		Action: "FIND_CUSTOMERS",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionStripeFindCustomers) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionStripeFindCustomersParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionStripeFindCustomersParamsFieldEmail        = big.NewInt(1 << 1)
)

type FlowActionStripeFindCustomersParams struct {
	ConnectionID string `json:"connection_id" url:"connection_id"`
	Email        string `json:"email" url:"email"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionStripeFindCustomersParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionStripeFindCustomersParams) GetEmail() string {
	if f == nil {
		return ""
	}
	return f.Email
}

func (f *FlowActionStripeFindCustomersParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionStripeFindCustomersParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeFindCustomersParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionStripeFindCustomersParamsFieldConnectionID)
}

// SetEmail sets the Email field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeFindCustomersParams) SetEmail(email string) {
	f.Email = email
	f.require(flowActionStripeFindCustomersParamsFieldEmail)
}

func (f *FlowActionStripeFindCustomersParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionStripeFindCustomersParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionStripeFindCustomersParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionStripeFindCustomersParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionStripeFindCustomersParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionStripeFindCustomersParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionStripeGetCustomerFieldID           = big.NewInt(1 << 0)
	flowActionStripeGetCustomerFieldAlias        = big.NewInt(1 << 1)
	flowActionStripeGetCustomerFieldAllowFailure = big.NewInt(1 << 2)
	flowActionStripeGetCustomerFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionStripeGetCustomerFieldParams       = big.NewInt(1 << 4)
)

type FlowActionStripeGetCustomer struct {
	ID           string                             `json:"id" url:"id"`
	Alias        *string                            `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                              `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                              `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionStripeGetCustomerParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionStripeGetCustomer) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionStripeGetCustomer) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionStripeGetCustomer) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionStripeGetCustomer) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionStripeGetCustomer) GetParams() *FlowActionStripeGetCustomerParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionStripeGetCustomer) Type() string {
	return f.type_
}

func (f *FlowActionStripeGetCustomer) Action() string {
	return f.action
}

func (f *FlowActionStripeGetCustomer) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionStripeGetCustomer) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeGetCustomer) SetID(id string) {
	f.ID = id
	f.require(flowActionStripeGetCustomerFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeGetCustomer) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionStripeGetCustomerFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeGetCustomer) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionStripeGetCustomerFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeGetCustomer) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionStripeGetCustomerFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeGetCustomer) SetParams(params *FlowActionStripeGetCustomerParams) {
	f.Params = params
	f.require(flowActionStripeGetCustomerFieldParams)
}

func (f *FlowActionStripeGetCustomer) UnmarshalJSON(data []byte) error {
	type embed FlowActionStripeGetCustomer
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionStripeGetCustomer(unmarshaler.embed)
	if unmarshaler.Type != "STRIPE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "STRIPE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "GET_CUSTOMER" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "GET_CUSTOMER", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionStripeGetCustomer) MarshalJSON() ([]byte, error) {
	type embed FlowActionStripeGetCustomer
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "STRIPE",
		Action: "GET_CUSTOMER",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionStripeGetCustomer) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionStripeGetCustomerParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionStripeGetCustomerParamsFieldID           = big.NewInt(1 << 1)
)

type FlowActionStripeGetCustomerParams struct {
	ConnectionID string `json:"connection_id" url:"connection_id"`
	ID           string `json:"id" url:"id"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionStripeGetCustomerParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionStripeGetCustomerParams) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionStripeGetCustomerParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionStripeGetCustomerParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeGetCustomerParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionStripeGetCustomerParamsFieldConnectionID)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeGetCustomerParams) SetID(id string) {
	f.ID = id
	f.require(flowActionStripeGetCustomerParamsFieldID)
}

func (f *FlowActionStripeGetCustomerParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionStripeGetCustomerParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionStripeGetCustomerParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionStripeGetCustomerParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionStripeGetCustomerParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionStripeGetCustomerParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionStripeMetadata = map[string]string

var (
	flowActionStripeTaxIDFieldType  = big.NewInt(1 << 0)
	flowActionStripeTaxIDFieldValue = big.NewInt(1 << 1)
)

type FlowActionStripeTaxID struct {
	Type  string `json:"type" url:"type"`
	Value string `json:"value" url:"value"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionStripeTaxID) GetType() string {
	if f == nil {
		return ""
	}
	return f.Type
}

func (f *FlowActionStripeTaxID) GetValue() string {
	if f == nil {
		return ""
	}
	return f.Value
}

func (f *FlowActionStripeTaxID) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionStripeTaxID) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetType sets the Type field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeTaxID) SetType(type_ string) {
	f.Type = type_
	f.require(flowActionStripeTaxIDFieldType)
}

// SetValue sets the Value field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeTaxID) SetValue(value string) {
	f.Value = value
	f.require(flowActionStripeTaxIDFieldValue)
}

func (f *FlowActionStripeTaxID) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionStripeTaxID
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionStripeTaxID(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionStripeTaxID) MarshalJSON() ([]byte, error) {
	type embed FlowActionStripeTaxID
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionStripeTaxID) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionStripeUpdateCustomerFieldID           = big.NewInt(1 << 0)
	flowActionStripeUpdateCustomerFieldAlias        = big.NewInt(1 << 1)
	flowActionStripeUpdateCustomerFieldAllowFailure = big.NewInt(1 << 2)
	flowActionStripeUpdateCustomerFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionStripeUpdateCustomerFieldParams       = big.NewInt(1 << 4)
)

type FlowActionStripeUpdateCustomer struct {
	ID           string                                `json:"id" url:"id"`
	Alias        *string                               `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                 `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                 `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionStripeUpdateCustomerParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionStripeUpdateCustomer) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionStripeUpdateCustomer) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionStripeUpdateCustomer) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionStripeUpdateCustomer) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionStripeUpdateCustomer) GetParams() *FlowActionStripeUpdateCustomerParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionStripeUpdateCustomer) Type() string {
	return f.type_
}

func (f *FlowActionStripeUpdateCustomer) Action() string {
	return f.action
}

func (f *FlowActionStripeUpdateCustomer) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionStripeUpdateCustomer) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeUpdateCustomer) SetID(id string) {
	f.ID = id
	f.require(flowActionStripeUpdateCustomerFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeUpdateCustomer) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionStripeUpdateCustomerFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeUpdateCustomer) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionStripeUpdateCustomerFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeUpdateCustomer) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionStripeUpdateCustomerFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeUpdateCustomer) SetParams(params *FlowActionStripeUpdateCustomerParams) {
	f.Params = params
	f.require(flowActionStripeUpdateCustomerFieldParams)
}

func (f *FlowActionStripeUpdateCustomer) UnmarshalJSON(data []byte) error {
	type embed FlowActionStripeUpdateCustomer
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionStripeUpdateCustomer(unmarshaler.embed)
	if unmarshaler.Type != "STRIPE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "STRIPE", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "UPDATE_CUSTOMER" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "UPDATE_CUSTOMER", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionStripeUpdateCustomer) MarshalJSON() ([]byte, error) {
	type embed FlowActionStripeUpdateCustomer
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "STRIPE",
		Action: "UPDATE_CUSTOMER",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionStripeUpdateCustomer) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionStripeUpdateCustomerParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionStripeUpdateCustomerParamsFieldID           = big.NewInt(1 << 1)
	flowActionStripeUpdateCustomerParamsFieldName         = big.NewInt(1 << 2)
	flowActionStripeUpdateCustomerParamsFieldDescription  = big.NewInt(1 << 3)
	flowActionStripeUpdateCustomerParamsFieldEmail        = big.NewInt(1 << 4)
	flowActionStripeUpdateCustomerParamsFieldPhone        = big.NewInt(1 << 5)
	flowActionStripeUpdateCustomerParamsFieldTaxExempt    = big.NewInt(1 << 6)
	flowActionStripeUpdateCustomerParamsFieldAddress      = big.NewInt(1 << 7)
	flowActionStripeUpdateCustomerParamsFieldMetadata     = big.NewInt(1 << 8)
)

type FlowActionStripeUpdateCustomerParams struct {
	ConnectionID string                    `json:"connection_id" url:"connection_id"`
	ID           string                    `json:"id" url:"id"`
	Name         *string                   `json:"name,omitempty" url:"name,omitempty"`
	Description  *string                   `json:"description,omitempty" url:"description,omitempty"`
	Email        *string                   `json:"email,omitempty" url:"email,omitempty"`
	Phone        *string                   `json:"phone,omitempty" url:"phone,omitempty"`
	TaxExempt    *string                   `json:"tax_exempt,omitempty" url:"tax_exempt,omitempty"`
	Address      *FlowActionStripeAddress  `json:"address,omitempty" url:"address,omitempty"`
	Metadata     *FlowActionStripeMetadata `json:"metadata,omitempty" url:"metadata,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionStripeUpdateCustomerParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionStripeUpdateCustomerParams) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionStripeUpdateCustomerParams) GetName() string {
	if f == nil || f.Name == nil {
		return ""
	}
	return *f.Name
}

func (f *FlowActionStripeUpdateCustomerParams) GetDescription() string {
	if f == nil || f.Description == nil {
		return ""
	}
	return *f.Description
}

func (f *FlowActionStripeUpdateCustomerParams) GetEmail() string {
	if f == nil || f.Email == nil {
		return ""
	}
	return *f.Email
}

func (f *FlowActionStripeUpdateCustomerParams) GetPhone() string {
	if f == nil || f.Phone == nil {
		return ""
	}
	return *f.Phone
}

func (f *FlowActionStripeUpdateCustomerParams) GetTaxExempt() string {
	if f == nil || f.TaxExempt == nil {
		return ""
	}
	return *f.TaxExempt
}

func (f *FlowActionStripeUpdateCustomerParams) GetAddress() FlowActionStripeAddress {
	if f == nil || f.Address == nil {
		return FlowActionStripeAddress{}
	}
	return *f.Address
}

func (f *FlowActionStripeUpdateCustomerParams) GetMetadata() FlowActionStripeMetadata {
	if f == nil || f.Metadata == nil {
		return nil
	}
	return *f.Metadata
}

func (f *FlowActionStripeUpdateCustomerParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionStripeUpdateCustomerParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeUpdateCustomerParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionStripeUpdateCustomerParamsFieldConnectionID)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeUpdateCustomerParams) SetID(id string) {
	f.ID = id
	f.require(flowActionStripeUpdateCustomerParamsFieldID)
}

// SetName sets the Name field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeUpdateCustomerParams) SetName(name *string) {
	f.Name = name
	f.require(flowActionStripeUpdateCustomerParamsFieldName)
}

// SetDescription sets the Description field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeUpdateCustomerParams) SetDescription(description *string) {
	f.Description = description
	f.require(flowActionStripeUpdateCustomerParamsFieldDescription)
}

// SetEmail sets the Email field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeUpdateCustomerParams) SetEmail(email *string) {
	f.Email = email
	f.require(flowActionStripeUpdateCustomerParamsFieldEmail)
}

// SetPhone sets the Phone field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeUpdateCustomerParams) SetPhone(phone *string) {
	f.Phone = phone
	f.require(flowActionStripeUpdateCustomerParamsFieldPhone)
}

// SetTaxExempt sets the TaxExempt field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeUpdateCustomerParams) SetTaxExempt(taxExempt *string) {
	f.TaxExempt = taxExempt
	f.require(flowActionStripeUpdateCustomerParamsFieldTaxExempt)
}

// SetAddress sets the Address field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeUpdateCustomerParams) SetAddress(address *FlowActionStripeAddress) {
	f.Address = address
	f.require(flowActionStripeUpdateCustomerParamsFieldAddress)
}

// SetMetadata sets the Metadata field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionStripeUpdateCustomerParams) SetMetadata(metadata *FlowActionStripeMetadata) {
	f.Metadata = metadata
	f.require(flowActionStripeUpdateCustomerParamsFieldMetadata)
}

func (f *FlowActionStripeUpdateCustomerParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionStripeUpdateCustomerParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionStripeUpdateCustomerParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionStripeUpdateCustomerParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionStripeUpdateCustomerParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionStripeUpdateCustomerParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionTelegram = *FlowActionTelegramSendMessage

var (
	flowActionTelegramSendMessageFieldID           = big.NewInt(1 << 0)
	flowActionTelegramSendMessageFieldAlias        = big.NewInt(1 << 1)
	flowActionTelegramSendMessageFieldAllowFailure = big.NewInt(1 << 2)
	flowActionTelegramSendMessageFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionTelegramSendMessageFieldParams       = big.NewInt(1 << 4)
)

type FlowActionTelegramSendMessage struct {
	ID           string                               `json:"id" url:"id"`
	Alias        *string                              `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionTelegramSendMessageParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionTelegramSendMessage) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionTelegramSendMessage) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionTelegramSendMessage) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionTelegramSendMessage) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionTelegramSendMessage) GetParams() *FlowActionTelegramSendMessageParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionTelegramSendMessage) Type() string {
	return f.type_
}

func (f *FlowActionTelegramSendMessage) Action() string {
	return f.action
}

func (f *FlowActionTelegramSendMessage) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionTelegramSendMessage) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTelegramSendMessage) SetID(id string) {
	f.ID = id
	f.require(flowActionTelegramSendMessageFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTelegramSendMessage) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionTelegramSendMessageFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTelegramSendMessage) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionTelegramSendMessageFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTelegramSendMessage) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionTelegramSendMessageFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTelegramSendMessage) SetParams(params *FlowActionTelegramSendMessageParams) {
	f.Params = params
	f.require(flowActionTelegramSendMessageFieldParams)
}

func (f *FlowActionTelegramSendMessage) UnmarshalJSON(data []byte) error {
	type embed FlowActionTelegramSendMessage
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionTelegramSendMessage(unmarshaler.embed)
	if unmarshaler.Type != "TELEGRAM" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "TELEGRAM", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "SEND_MESSAGE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SEND_MESSAGE", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionTelegramSendMessage) MarshalJSON() ([]byte, error) {
	type embed FlowActionTelegramSendMessage
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "TELEGRAM",
		Action: "SEND_MESSAGE",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionTelegramSendMessage) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionTelegramSendMessageParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionTelegramSendMessageParamsFieldChatID       = big.NewInt(1 << 1)
	flowActionTelegramSendMessageParamsFieldText         = big.NewInt(1 << 2)
)

type FlowActionTelegramSendMessageParams struct {
	ConnectionID string `json:"connection_id" url:"connection_id"`
	ChatID       string `json:"chat_id" url:"chat_id"`
	Text         string `json:"text" url:"text"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionTelegramSendMessageParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionTelegramSendMessageParams) GetChatID() string {
	if f == nil {
		return ""
	}
	return f.ChatID
}

func (f *FlowActionTelegramSendMessageParams) GetText() string {
	if f == nil {
		return ""
	}
	return f.Text
}

func (f *FlowActionTelegramSendMessageParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionTelegramSendMessageParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTelegramSendMessageParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionTelegramSendMessageParamsFieldConnectionID)
}

// SetChatID sets the ChatID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTelegramSendMessageParams) SetChatID(chatID string) {
	f.ChatID = chatID
	f.require(flowActionTelegramSendMessageParamsFieldChatID)
}

// SetText sets the Text field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTelegramSendMessageParams) SetText(text string) {
	f.Text = text
	f.require(flowActionTelegramSendMessageParamsFieldText)
}

func (f *FlowActionTelegramSendMessageParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionTelegramSendMessageParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionTelegramSendMessageParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionTelegramSendMessageParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionTelegramSendMessageParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionTelegramSendMessageParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionTwilio struct {
	FlowActionTwilioMakeCall *FlowActionTwilioMakeCall
	FlowActionTwilioSendSms  *FlowActionTwilioSendSms

	typ string
}

func (f *FlowActionTwilio) GetFlowActionTwilioMakeCall() *FlowActionTwilioMakeCall {
	if f == nil {
		return nil
	}
	return f.FlowActionTwilioMakeCall
}

func (f *FlowActionTwilio) GetFlowActionTwilioSendSms() *FlowActionTwilioSendSms {
	if f == nil {
		return nil
	}
	return f.FlowActionTwilioSendSms
}

func (f *FlowActionTwilio) UnmarshalJSON(data []byte) error {
	valueFlowActionTwilioMakeCall := new(FlowActionTwilioMakeCall)
	if err := json.Unmarshal(data, &valueFlowActionTwilioMakeCall); err == nil {
		f.typ = "FlowActionTwilioMakeCall"
		f.FlowActionTwilioMakeCall = valueFlowActionTwilioMakeCall
		return nil
	}
	valueFlowActionTwilioSendSms := new(FlowActionTwilioSendSms)
	if err := json.Unmarshal(data, &valueFlowActionTwilioSendSms); err == nil {
		f.typ = "FlowActionTwilioSendSms"
		f.FlowActionTwilioSendSms = valueFlowActionTwilioSendSms
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionTwilio) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionTwilioMakeCall" || f.FlowActionTwilioMakeCall != nil {
		return json.Marshal(f.FlowActionTwilioMakeCall)
	}
	if f.typ == "FlowActionTwilioSendSms" || f.FlowActionTwilioSendSms != nil {
		return json.Marshal(f.FlowActionTwilioSendSms)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionTwilioVisitor interface {
	VisitFlowActionTwilioMakeCall(*FlowActionTwilioMakeCall) error
	VisitFlowActionTwilioSendSms(*FlowActionTwilioSendSms) error
}

func (f *FlowActionTwilio) Accept(visitor FlowActionTwilioVisitor) error {
	if f.typ == "FlowActionTwilioMakeCall" || f.FlowActionTwilioMakeCall != nil {
		return visitor.VisitFlowActionTwilioMakeCall(f.FlowActionTwilioMakeCall)
	}
	if f.typ == "FlowActionTwilioSendSms" || f.FlowActionTwilioSendSms != nil {
		return visitor.VisitFlowActionTwilioSendSms(f.FlowActionTwilioSendSms)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionTwilioMakeCallFieldID           = big.NewInt(1 << 0)
	flowActionTwilioMakeCallFieldAlias        = big.NewInt(1 << 1)
	flowActionTwilioMakeCallFieldAllowFailure = big.NewInt(1 << 2)
	flowActionTwilioMakeCallFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionTwilioMakeCallFieldParams       = big.NewInt(1 << 4)
)

type FlowActionTwilioMakeCall struct {
	ID           string                          `json:"id" url:"id"`
	Alias        *string                         `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                           `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                           `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionTwilioMakeCallParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionTwilioMakeCall) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionTwilioMakeCall) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionTwilioMakeCall) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionTwilioMakeCall) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionTwilioMakeCall) GetParams() *FlowActionTwilioMakeCallParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionTwilioMakeCall) Type() string {
	return f.type_
}

func (f *FlowActionTwilioMakeCall) Action() string {
	return f.action
}

func (f *FlowActionTwilioMakeCall) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionTwilioMakeCall) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioMakeCall) SetID(id string) {
	f.ID = id
	f.require(flowActionTwilioMakeCallFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioMakeCall) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionTwilioMakeCallFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioMakeCall) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionTwilioMakeCallFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioMakeCall) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionTwilioMakeCallFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioMakeCall) SetParams(params *FlowActionTwilioMakeCallParams) {
	f.Params = params
	f.require(flowActionTwilioMakeCallFieldParams)
}

func (f *FlowActionTwilioMakeCall) UnmarshalJSON(data []byte) error {
	type embed FlowActionTwilioMakeCall
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionTwilioMakeCall(unmarshaler.embed)
	if unmarshaler.Type != "TWILIO" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "TWILIO", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "MAKE_CALL" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "MAKE_CALL", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionTwilioMakeCall) MarshalJSON() ([]byte, error) {
	type embed FlowActionTwilioMakeCall
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "TWILIO",
		Action: "MAKE_CALL",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionTwilioMakeCall) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionTwilioMakeCallParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionTwilioMakeCallParamsFieldFrom         = big.NewInt(1 << 1)
	flowActionTwilioMakeCallParamsFieldTo           = big.NewInt(1 << 2)
	flowActionTwilioMakeCallParamsFieldPayload      = big.NewInt(1 << 3)
)

type FlowActionTwilioMakeCallParams struct {
	ConnectionID string `json:"connection_id" url:"connection_id"`
	From         string `json:"from" url:"from"`
	To           string `json:"to" url:"to"`
	Payload      string `json:"payload" url:"payload"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionTwilioMakeCallParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionTwilioMakeCallParams) GetFrom() string {
	if f == nil {
		return ""
	}
	return f.From
}

func (f *FlowActionTwilioMakeCallParams) GetTo() string {
	if f == nil {
		return ""
	}
	return f.To
}

func (f *FlowActionTwilioMakeCallParams) GetPayload() string {
	if f == nil {
		return ""
	}
	return f.Payload
}

func (f *FlowActionTwilioMakeCallParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionTwilioMakeCallParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioMakeCallParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionTwilioMakeCallParamsFieldConnectionID)
}

// SetFrom sets the From field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioMakeCallParams) SetFrom(from string) {
	f.From = from
	f.require(flowActionTwilioMakeCallParamsFieldFrom)
}

// SetTo sets the To field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioMakeCallParams) SetTo(to string) {
	f.To = to
	f.require(flowActionTwilioMakeCallParamsFieldTo)
}

// SetPayload sets the Payload field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioMakeCallParams) SetPayload(payload string) {
	f.Payload = payload
	f.require(flowActionTwilioMakeCallParamsFieldPayload)
}

func (f *FlowActionTwilioMakeCallParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionTwilioMakeCallParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionTwilioMakeCallParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionTwilioMakeCallParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionTwilioMakeCallParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionTwilioMakeCallParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionTwilioSendSmsFieldID           = big.NewInt(1 << 0)
	flowActionTwilioSendSmsFieldAlias        = big.NewInt(1 << 1)
	flowActionTwilioSendSmsFieldAllowFailure = big.NewInt(1 << 2)
	flowActionTwilioSendSmsFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionTwilioSendSmsFieldParams       = big.NewInt(1 << 4)
)

type FlowActionTwilioSendSms struct {
	ID           string                         `json:"id" url:"id"`
	Alias        *string                        `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                          `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                          `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionTwilioSendSmsParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionTwilioSendSms) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionTwilioSendSms) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionTwilioSendSms) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionTwilioSendSms) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionTwilioSendSms) GetParams() *FlowActionTwilioSendSmsParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionTwilioSendSms) Type() string {
	return f.type_
}

func (f *FlowActionTwilioSendSms) Action() string {
	return f.action
}

func (f *FlowActionTwilioSendSms) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionTwilioSendSms) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioSendSms) SetID(id string) {
	f.ID = id
	f.require(flowActionTwilioSendSmsFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioSendSms) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionTwilioSendSmsFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioSendSms) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionTwilioSendSmsFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioSendSms) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionTwilioSendSmsFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioSendSms) SetParams(params *FlowActionTwilioSendSmsParams) {
	f.Params = params
	f.require(flowActionTwilioSendSmsFieldParams)
}

func (f *FlowActionTwilioSendSms) UnmarshalJSON(data []byte) error {
	type embed FlowActionTwilioSendSms
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionTwilioSendSms(unmarshaler.embed)
	if unmarshaler.Type != "TWILIO" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "TWILIO", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "SEND_SMS" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SEND_SMS", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionTwilioSendSms) MarshalJSON() ([]byte, error) {
	type embed FlowActionTwilioSendSms
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "TWILIO",
		Action: "SEND_SMS",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionTwilioSendSms) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionTwilioSendSmsParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionTwilioSendSmsParamsFieldFrom         = big.NewInt(1 << 1)
	flowActionTwilioSendSmsParamsFieldTo           = big.NewInt(1 << 2)
	flowActionTwilioSendSmsParamsFieldMessage      = big.NewInt(1 << 3)
)

type FlowActionTwilioSendSmsParams struct {
	ConnectionID string `json:"connection_id" url:"connection_id"`
	From         string `json:"from" url:"from"`
	To           string `json:"to" url:"to"`
	Message      string `json:"message" url:"message"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionTwilioSendSmsParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionTwilioSendSmsParams) GetFrom() string {
	if f == nil {
		return ""
	}
	return f.From
}

func (f *FlowActionTwilioSendSmsParams) GetTo() string {
	if f == nil {
		return ""
	}
	return f.To
}

func (f *FlowActionTwilioSendSmsParams) GetMessage() string {
	if f == nil {
		return ""
	}
	return f.Message
}

func (f *FlowActionTwilioSendSmsParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionTwilioSendSmsParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioSendSmsParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionTwilioSendSmsParamsFieldConnectionID)
}

// SetFrom sets the From field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioSendSmsParams) SetFrom(from string) {
	f.From = from
	f.require(flowActionTwilioSendSmsParamsFieldFrom)
}

// SetTo sets the To field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioSendSmsParams) SetTo(to string) {
	f.To = to
	f.require(flowActionTwilioSendSmsParamsFieldTo)
}

// SetMessage sets the Message field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionTwilioSendSmsParams) SetMessage(message string) {
	f.Message = message
	f.require(flowActionTwilioSendSmsParamsFieldMessage)
}

func (f *FlowActionTwilioSendSmsParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionTwilioSendSmsParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionTwilioSendSmsParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionTwilioSendSmsParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionTwilioSendSmsParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionTwilioSendSmsParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionWhatsapp = *FlowActionWhatsappSendMessage

var (
	flowActionWhatsappSendMessageFieldID           = big.NewInt(1 << 0)
	flowActionWhatsappSendMessageFieldAlias        = big.NewInt(1 << 1)
	flowActionWhatsappSendMessageFieldAllowFailure = big.NewInt(1 << 2)
	flowActionWhatsappSendMessageFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionWhatsappSendMessageFieldParams       = big.NewInt(1 << 4)
)

type FlowActionWhatsappSendMessage struct {
	ID           string                               `json:"id" url:"id"`
	Alias        *string                              `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionWhatsappSendMessageParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionWhatsappSendMessage) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionWhatsappSendMessage) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionWhatsappSendMessage) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionWhatsappSendMessage) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionWhatsappSendMessage) GetParams() *FlowActionWhatsappSendMessageParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionWhatsappSendMessage) Type() string {
	return f.type_
}

func (f *FlowActionWhatsappSendMessage) Action() string {
	return f.action
}

func (f *FlowActionWhatsappSendMessage) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionWhatsappSendMessage) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionWhatsappSendMessage) SetID(id string) {
	f.ID = id
	f.require(flowActionWhatsappSendMessageFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionWhatsappSendMessage) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionWhatsappSendMessageFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionWhatsappSendMessage) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionWhatsappSendMessageFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionWhatsappSendMessage) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionWhatsappSendMessageFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionWhatsappSendMessage) SetParams(params *FlowActionWhatsappSendMessageParams) {
	f.Params = params
	f.require(flowActionWhatsappSendMessageFieldParams)
}

func (f *FlowActionWhatsappSendMessage) UnmarshalJSON(data []byte) error {
	type embed FlowActionWhatsappSendMessage
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionWhatsappSendMessage(unmarshaler.embed)
	if unmarshaler.Type != "WHATSAPP" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "WHATSAPP", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "SEND_MESSAGE" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SEND_MESSAGE", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionWhatsappSendMessage) MarshalJSON() ([]byte, error) {
	type embed FlowActionWhatsappSendMessage
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "WHATSAPP",
		Action: "SEND_MESSAGE",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionWhatsappSendMessage) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionWhatsappSendMessageParamsFieldConnectionID    = big.NewInt(1 << 0)
	flowActionWhatsappSendMessageParamsFieldSenderID        = big.NewInt(1 << 1)
	flowActionWhatsappSendMessageParamsFieldRecipientNumber = big.NewInt(1 << 2)
	flowActionWhatsappSendMessageParamsFieldType            = big.NewInt(1 << 3)
	flowActionWhatsappSendMessageParamsFieldPayload         = big.NewInt(1 << 4)
)

type FlowActionWhatsappSendMessageParams struct {
	ConnectionID    string                                      `json:"connection_id" url:"connection_id"`
	SenderID        string                                      `json:"sender_id" url:"sender_id"`
	RecipientNumber string                                      `json:"recipient_number" url:"recipient_number"`
	Type            FlowActionWhatsappSendMessageParamsType     `json:"type" url:"type"`
	Payload         *FlowActionWhatsappSendMessageParamsPayload `json:"payload" url:"payload"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionWhatsappSendMessageParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionWhatsappSendMessageParams) GetSenderID() string {
	if f == nil {
		return ""
	}
	return f.SenderID
}

func (f *FlowActionWhatsappSendMessageParams) GetRecipientNumber() string {
	if f == nil {
		return ""
	}
	return f.RecipientNumber
}

func (f *FlowActionWhatsappSendMessageParams) GetType() FlowActionWhatsappSendMessageParamsType {
	if f == nil {
		return ""
	}
	return f.Type
}

func (f *FlowActionWhatsappSendMessageParams) GetPayload() *FlowActionWhatsappSendMessageParamsPayload {
	if f == nil {
		return nil
	}
	return f.Payload
}

func (f *FlowActionWhatsappSendMessageParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionWhatsappSendMessageParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionWhatsappSendMessageParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionWhatsappSendMessageParamsFieldConnectionID)
}

// SetSenderID sets the SenderID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionWhatsappSendMessageParams) SetSenderID(senderID string) {
	f.SenderID = senderID
	f.require(flowActionWhatsappSendMessageParamsFieldSenderID)
}

// SetRecipientNumber sets the RecipientNumber field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionWhatsappSendMessageParams) SetRecipientNumber(recipientNumber string) {
	f.RecipientNumber = recipientNumber
	f.require(flowActionWhatsappSendMessageParamsFieldRecipientNumber)
}

// SetType sets the Type field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionWhatsappSendMessageParams) SetType(type_ FlowActionWhatsappSendMessageParamsType) {
	f.Type = type_
	f.require(flowActionWhatsappSendMessageParamsFieldType)
}

// SetPayload sets the Payload field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionWhatsappSendMessageParams) SetPayload(payload *FlowActionWhatsappSendMessageParamsPayload) {
	f.Payload = payload
	f.require(flowActionWhatsappSendMessageParamsFieldPayload)
}

func (f *FlowActionWhatsappSendMessageParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionWhatsappSendMessageParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionWhatsappSendMessageParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionWhatsappSendMessageParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionWhatsappSendMessageParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionWhatsappSendMessageParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionWhatsappSendMessageParamsPayload struct {
	FlowActionWhatsappSendMessageParamsPayloadObject FlowActionWhatsappSendMessageParamsPayloadObject
	String                                           string

	typ string
}

func (f *FlowActionWhatsappSendMessageParamsPayload) GetFlowActionWhatsappSendMessageParamsPayloadObject() FlowActionWhatsappSendMessageParamsPayloadObject {
	if f == nil {
		return nil
	}
	return f.FlowActionWhatsappSendMessageParamsPayloadObject
}

func (f *FlowActionWhatsappSendMessageParamsPayload) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionWhatsappSendMessageParamsPayload) UnmarshalJSON(data []byte) error {
	var valueFlowActionWhatsappSendMessageParamsPayloadObject FlowActionWhatsappSendMessageParamsPayloadObject
	if err := json.Unmarshal(data, &valueFlowActionWhatsappSendMessageParamsPayloadObject); err == nil {
		f.typ = "FlowActionWhatsappSendMessageParamsPayloadObject"
		f.FlowActionWhatsappSendMessageParamsPayloadObject = valueFlowActionWhatsappSendMessageParamsPayloadObject
		return nil
	}
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionWhatsappSendMessageParamsPayload) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionWhatsappSendMessageParamsPayloadObject" || f.FlowActionWhatsappSendMessageParamsPayloadObject != nil {
		return json.Marshal(f.FlowActionWhatsappSendMessageParamsPayloadObject)
	}
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionWhatsappSendMessageParamsPayloadVisitor interface {
	VisitFlowActionWhatsappSendMessageParamsPayloadObject(FlowActionWhatsappSendMessageParamsPayloadObject) error
	VisitString(string) error
}

func (f *FlowActionWhatsappSendMessageParamsPayload) Accept(visitor FlowActionWhatsappSendMessageParamsPayloadVisitor) error {
	if f.typ == "FlowActionWhatsappSendMessageParamsPayloadObject" || f.FlowActionWhatsappSendMessageParamsPayloadObject != nil {
		return visitor.VisitFlowActionWhatsappSendMessageParamsPayloadObject(f.FlowActionWhatsappSendMessageParamsPayloadObject)
	}
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionWhatsappSendMessageParamsPayloadObject = map[string]interface{}

type FlowActionWhatsappSendMessageParamsType string

const (
	FlowActionWhatsappSendMessageParamsTypeAudio       FlowActionWhatsappSendMessageParamsType = "AUDIO"
	FlowActionWhatsappSendMessageParamsTypeContacts    FlowActionWhatsappSendMessageParamsType = "CONTACTS"
	FlowActionWhatsappSendMessageParamsTypeDocument    FlowActionWhatsappSendMessageParamsType = "DOCUMENT"
	FlowActionWhatsappSendMessageParamsTypeImage       FlowActionWhatsappSendMessageParamsType = "IMAGE"
	FlowActionWhatsappSendMessageParamsTypeInteractive FlowActionWhatsappSendMessageParamsType = "INTERACTIVE"
	FlowActionWhatsappSendMessageParamsTypeLocation    FlowActionWhatsappSendMessageParamsType = "LOCATION"
	FlowActionWhatsappSendMessageParamsTypeSticker     FlowActionWhatsappSendMessageParamsType = "STICKER"
	FlowActionWhatsappSendMessageParamsTypeTemplate    FlowActionWhatsappSendMessageParamsType = "TEMPLATE"
	FlowActionWhatsappSendMessageParamsTypeText        FlowActionWhatsappSendMessageParamsType = "TEXT"
)

func NewFlowActionWhatsappSendMessageParamsTypeFromString(s string) (FlowActionWhatsappSendMessageParamsType, error) {
	switch s {
	case "AUDIO":
		return FlowActionWhatsappSendMessageParamsTypeAudio, nil
	case "CONTACTS":
		return FlowActionWhatsappSendMessageParamsTypeContacts, nil
	case "DOCUMENT":
		return FlowActionWhatsappSendMessageParamsTypeDocument, nil
	case "IMAGE":
		return FlowActionWhatsappSendMessageParamsTypeImage, nil
	case "INTERACTIVE":
		return FlowActionWhatsappSendMessageParamsTypeInteractive, nil
	case "LOCATION":
		return FlowActionWhatsappSendMessageParamsTypeLocation, nil
	case "STICKER":
		return FlowActionWhatsappSendMessageParamsTypeSticker, nil
	case "TEMPLATE":
		return FlowActionWhatsappSendMessageParamsTypeTemplate, nil
	case "TEXT":
		return FlowActionWhatsappSendMessageParamsTypeText, nil
	}
	var t FlowActionWhatsappSendMessageParamsType
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (f FlowActionWhatsappSendMessageParamsType) Ptr() *FlowActionWhatsappSendMessageParamsType {
	return &f
}

type FlowActionXML struct {
	FlowActionXMLParseXML     *FlowActionXMLParseXML
	FlowActionXMLSerializeXML *FlowActionXMLSerializeXML

	typ string
}

func (f *FlowActionXML) GetFlowActionXMLParseXML() *FlowActionXMLParseXML {
	if f == nil {
		return nil
	}
	return f.FlowActionXMLParseXML
}

func (f *FlowActionXML) GetFlowActionXMLSerializeXML() *FlowActionXMLSerializeXML {
	if f == nil {
		return nil
	}
	return f.FlowActionXMLSerializeXML
}

func (f *FlowActionXML) UnmarshalJSON(data []byte) error {
	valueFlowActionXMLParseXML := new(FlowActionXMLParseXML)
	if err := json.Unmarshal(data, &valueFlowActionXMLParseXML); err == nil {
		f.typ = "FlowActionXMLParseXML"
		f.FlowActionXMLParseXML = valueFlowActionXMLParseXML
		return nil
	}
	valueFlowActionXMLSerializeXML := new(FlowActionXMLSerializeXML)
	if err := json.Unmarshal(data, &valueFlowActionXMLSerializeXML); err == nil {
		f.typ = "FlowActionXMLSerializeXML"
		f.FlowActionXMLSerializeXML = valueFlowActionXMLSerializeXML
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionXML) MarshalJSON() ([]byte, error) {
	if f.typ == "FlowActionXMLParseXML" || f.FlowActionXMLParseXML != nil {
		return json.Marshal(f.FlowActionXMLParseXML)
	}
	if f.typ == "FlowActionXMLSerializeXML" || f.FlowActionXMLSerializeXML != nil {
		return json.Marshal(f.FlowActionXMLSerializeXML)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionXMLVisitor interface {
	VisitFlowActionXMLParseXML(*FlowActionXMLParseXML) error
	VisitFlowActionXMLSerializeXML(*FlowActionXMLSerializeXML) error
}

func (f *FlowActionXML) Accept(visitor FlowActionXMLVisitor) error {
	if f.typ == "FlowActionXMLParseXML" || f.FlowActionXMLParseXML != nil {
		return visitor.VisitFlowActionXMLParseXML(f.FlowActionXMLParseXML)
	}
	if f.typ == "FlowActionXMLSerializeXML" || f.FlowActionXMLSerializeXML != nil {
		return visitor.VisitFlowActionXMLSerializeXML(f.FlowActionXMLSerializeXML)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

var (
	flowActionXMLParseXMLFieldID           = big.NewInt(1 << 0)
	flowActionXMLParseXMLFieldAlias        = big.NewInt(1 << 1)
	flowActionXMLParseXMLFieldAllowFailure = big.NewInt(1 << 2)
	flowActionXMLParseXMLFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionXMLParseXMLFieldParams       = big.NewInt(1 << 4)
)

type FlowActionXMLParseXML struct {
	ID           string                       `json:"id" url:"id"`
	Alias        *string                      `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                        `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                        `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionXMLParseXMLParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionXMLParseXML) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionXMLParseXML) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionXMLParseXML) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionXMLParseXML) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionXMLParseXML) GetParams() *FlowActionXMLParseXMLParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionXMLParseXML) Type() string {
	return f.type_
}

func (f *FlowActionXMLParseXML) Action() string {
	return f.action
}

func (f *FlowActionXMLParseXML) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionXMLParseXML) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionXMLParseXML) SetID(id string) {
	f.ID = id
	f.require(flowActionXMLParseXMLFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionXMLParseXML) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionXMLParseXMLFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionXMLParseXML) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionXMLParseXMLFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionXMLParseXML) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionXMLParseXMLFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionXMLParseXML) SetParams(params *FlowActionXMLParseXMLParams) {
	f.Params = params
	f.require(flowActionXMLParseXMLFieldParams)
}

func (f *FlowActionXMLParseXML) UnmarshalJSON(data []byte) error {
	type embed FlowActionXMLParseXML
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionXMLParseXML(unmarshaler.embed)
	if unmarshaler.Type != "XML" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "XML", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "PARSE_XML" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "PARSE_XML", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionXMLParseXML) MarshalJSON() ([]byte, error) {
	type embed FlowActionXMLParseXML
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "XML",
		Action: "PARSE_XML",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionXMLParseXML) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionXMLParseXMLParamsFieldXML = big.NewInt(1 << 0)
)

type FlowActionXMLParseXMLParams struct {
	XML string `json:"xml" url:"xml"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionXMLParseXMLParams) GetXML() string {
	if f == nil {
		return ""
	}
	return f.XML
}

func (f *FlowActionXMLParseXMLParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionXMLParseXMLParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetXML sets the XML field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionXMLParseXMLParams) SetXML(xml string) {
	f.XML = xml
	f.require(flowActionXMLParseXMLParamsFieldXML)
}

func (f *FlowActionXMLParseXMLParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionXMLParseXMLParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionXMLParseXMLParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionXMLParseXMLParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionXMLParseXMLParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionXMLParseXMLParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionXMLSerializeXMLFieldID           = big.NewInt(1 << 0)
	flowActionXMLSerializeXMLFieldAlias        = big.NewInt(1 << 1)
	flowActionXMLSerializeXMLFieldAllowFailure = big.NewInt(1 << 2)
	flowActionXMLSerializeXMLFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionXMLSerializeXMLFieldParams       = big.NewInt(1 << 4)
)

type FlowActionXMLSerializeXML struct {
	ID           string                           `json:"id" url:"id"`
	Alias        *string                          `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                            `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                            `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionXMLSerializeXMLParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionXMLSerializeXML) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionXMLSerializeXML) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionXMLSerializeXML) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionXMLSerializeXML) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionXMLSerializeXML) GetParams() *FlowActionXMLSerializeXMLParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionXMLSerializeXML) Type() string {
	return f.type_
}

func (f *FlowActionXMLSerializeXML) Action() string {
	return f.action
}

func (f *FlowActionXMLSerializeXML) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionXMLSerializeXML) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionXMLSerializeXML) SetID(id string) {
	f.ID = id
	f.require(flowActionXMLSerializeXMLFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionXMLSerializeXML) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionXMLSerializeXMLFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionXMLSerializeXML) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionXMLSerializeXMLFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionXMLSerializeXML) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionXMLSerializeXMLFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionXMLSerializeXML) SetParams(params *FlowActionXMLSerializeXMLParams) {
	f.Params = params
	f.require(flowActionXMLSerializeXMLFieldParams)
}

func (f *FlowActionXMLSerializeXML) UnmarshalJSON(data []byte) error {
	type embed FlowActionXMLSerializeXML
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionXMLSerializeXML(unmarshaler.embed)
	if unmarshaler.Type != "XML" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "XML", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "SERIALIZE_XML" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "SERIALIZE_XML", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionXMLSerializeXML) MarshalJSON() ([]byte, error) {
	type embed FlowActionXMLSerializeXML
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "XML",
		Action: "SERIALIZE_XML",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionXMLSerializeXML) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionXMLSerializeXMLParamsFieldObject = big.NewInt(1 << 0)
)

type FlowActionXMLSerializeXMLParams struct {
	Object *FlowActionXMLSerializeXMLParamsObject `json:"object" url:"object"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionXMLSerializeXMLParams) GetObject() *FlowActionXMLSerializeXMLParamsObject {
	if f == nil {
		return nil
	}
	return f.Object
}

func (f *FlowActionXMLSerializeXMLParams) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionXMLSerializeXMLParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetObject sets the Object field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionXMLSerializeXMLParams) SetObject(object *FlowActionXMLSerializeXMLParamsObject) {
	f.Object = object
	f.require(flowActionXMLSerializeXMLParamsFieldObject)
}

func (f *FlowActionXMLSerializeXMLParams) UnmarshalJSON(data []byte) error {
	type unmarshaler FlowActionXMLSerializeXMLParams
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*f = FlowActionXMLSerializeXMLParams(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionXMLSerializeXMLParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionXMLSerializeXMLParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionXMLSerializeXMLParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionXMLSerializeXMLParamsObject struct {
	String                                      string
	FlowActionXMLSerializeXMLParamsObjectObject FlowActionXMLSerializeXMLParamsObjectObject

	typ string
}

func (f *FlowActionXMLSerializeXMLParamsObject) GetString() string {
	if f == nil {
		return ""
	}
	return f.String
}

func (f *FlowActionXMLSerializeXMLParamsObject) GetFlowActionXMLSerializeXMLParamsObjectObject() FlowActionXMLSerializeXMLParamsObjectObject {
	if f == nil {
		return nil
	}
	return f.FlowActionXMLSerializeXMLParamsObjectObject
}

func (f *FlowActionXMLSerializeXMLParamsObject) UnmarshalJSON(data []byte) error {
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		f.typ = "String"
		f.String = valueString
		return nil
	}
	var valueFlowActionXMLSerializeXMLParamsObjectObject FlowActionXMLSerializeXMLParamsObjectObject
	if err := json.Unmarshal(data, &valueFlowActionXMLSerializeXMLParamsObjectObject); err == nil {
		f.typ = "FlowActionXMLSerializeXMLParamsObjectObject"
		f.FlowActionXMLSerializeXMLParamsObjectObject = valueFlowActionXMLSerializeXMLParamsObjectObject
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, f)
}

func (f FlowActionXMLSerializeXMLParamsObject) MarshalJSON() ([]byte, error) {
	if f.typ == "String" || f.String != "" {
		return json.Marshal(f.String)
	}
	if f.typ == "FlowActionXMLSerializeXMLParamsObjectObject" || f.FlowActionXMLSerializeXMLParamsObjectObject != nil {
		return json.Marshal(f.FlowActionXMLSerializeXMLParamsObjectObject)
	}
	return nil, fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionXMLSerializeXMLParamsObjectVisitor interface {
	VisitString(string) error
	VisitFlowActionXMLSerializeXMLParamsObjectObject(FlowActionXMLSerializeXMLParamsObjectObject) error
}

func (f *FlowActionXMLSerializeXMLParamsObject) Accept(visitor FlowActionXMLSerializeXMLParamsObjectVisitor) error {
	if f.typ == "String" || f.String != "" {
		return visitor.VisitString(f.String)
	}
	if f.typ == "FlowActionXMLSerializeXMLParamsObjectObject" || f.FlowActionXMLSerializeXMLParamsObjectObject != nil {
		return visitor.VisitFlowActionXMLSerializeXMLParamsObjectObject(f.FlowActionXMLSerializeXMLParamsObjectObject)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", f)
}

type FlowActionXMLSerializeXMLParamsObjectObject = map[string]interface{}

type FlowActionZapier = *FlowActionZapierTriggerWebhook

var (
	flowActionZapierTriggerWebhookFieldID           = big.NewInt(1 << 0)
	flowActionZapierTriggerWebhookFieldAlias        = big.NewInt(1 << 1)
	flowActionZapierTriggerWebhookFieldAllowFailure = big.NewInt(1 << 2)
	flowActionZapierTriggerWebhookFieldMaskOutput   = big.NewInt(1 << 3)
	flowActionZapierTriggerWebhookFieldParams       = big.NewInt(1 << 4)
)

type FlowActionZapierTriggerWebhook struct {
	ID           string                                `json:"id" url:"id"`
	Alias        *string                               `json:"alias,omitempty" url:"alias,omitempty"`
	AllowFailure *bool                                 `json:"allow_failure,omitempty" url:"allow_failure,omitempty"`
	MaskOutput   *bool                                 `json:"mask_output,omitempty" url:"mask_output,omitempty"`
	Params       *FlowActionZapierTriggerWebhookParams `json:"params" url:"params"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`
	type_          string
	action         string

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowActionZapierTriggerWebhook) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowActionZapierTriggerWebhook) GetAlias() string {
	if f == nil || f.Alias == nil {
		return ""
	}
	return *f.Alias
}

func (f *FlowActionZapierTriggerWebhook) GetAllowFailure() bool {
	if f == nil || f.AllowFailure == nil {
		return false
	}
	return *f.AllowFailure
}

func (f *FlowActionZapierTriggerWebhook) GetMaskOutput() bool {
	if f == nil || f.MaskOutput == nil {
		return false
	}
	return *f.MaskOutput
}

func (f *FlowActionZapierTriggerWebhook) GetParams() *FlowActionZapierTriggerWebhookParams {
	if f == nil {
		return nil
	}
	return f.Params
}

func (f *FlowActionZapierTriggerWebhook) Type() string {
	return f.type_
}

func (f *FlowActionZapierTriggerWebhook) Action() string {
	return f.action
}

func (f *FlowActionZapierTriggerWebhook) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowActionZapierTriggerWebhook) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionZapierTriggerWebhook) SetID(id string) {
	f.ID = id
	f.require(flowActionZapierTriggerWebhookFieldID)
}

// SetAlias sets the Alias field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionZapierTriggerWebhook) SetAlias(alias *string) {
	f.Alias = alias
	f.require(flowActionZapierTriggerWebhookFieldAlias)
}

// SetAllowFailure sets the AllowFailure field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionZapierTriggerWebhook) SetAllowFailure(allowFailure *bool) {
	f.AllowFailure = allowFailure
	f.require(flowActionZapierTriggerWebhookFieldAllowFailure)
}

// SetMaskOutput sets the MaskOutput field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionZapierTriggerWebhook) SetMaskOutput(maskOutput *bool) {
	f.MaskOutput = maskOutput
	f.require(flowActionZapierTriggerWebhookFieldMaskOutput)
}

// SetParams sets the Params field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionZapierTriggerWebhook) SetParams(params *FlowActionZapierTriggerWebhookParams) {
	f.Params = params
	f.require(flowActionZapierTriggerWebhookFieldParams)
}

func (f *FlowActionZapierTriggerWebhook) UnmarshalJSON(data []byte) error {
	type embed FlowActionZapierTriggerWebhook
	var unmarshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionZapierTriggerWebhook(unmarshaler.embed)
	if unmarshaler.Type != "ZAPIER" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "ZAPIER", unmarshaler.Type)
	}
	f.type_ = unmarshaler.Type
	if unmarshaler.Action != "TRIGGER_WEBHOOK" {
		return fmt.Errorf("unexpected value for literal on type %T; expected %v got %v", f, "TRIGGER_WEBHOOK", unmarshaler.Action)
	}
	f.action = unmarshaler.Action
	extraProperties, err := internal.ExtractExtraProperties(data, *f, "type", "action")
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionZapierTriggerWebhook) MarshalJSON() ([]byte, error) {
	type embed FlowActionZapierTriggerWebhook
	var marshaler = struct {
		embed
		Type   string `json:"type"`
		Action string `json:"action"`
	}{
		embed:  embed(*f),
		Type:   "ZAPIER",
		Action: "TRIGGER_WEBHOOK",
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowActionZapierTriggerWebhook) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

var (
	flowActionZapierTriggerWebhookParamsFieldConnectionID = big.NewInt(1 << 0)
	flowActionZapierTriggerWebhookParamsFieldMethod       = big.NewInt(1 << 1)
)

type FlowActionZapierTriggerWebhookParams struct {
	ConnectionID string                                      `json:"connection_id" url:"connection_id"`
	Method       *FlowActionZapierTriggerWebhookParamsMethod `json:"method,omitempty" url:"method,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	ExtraProperties map[string]interface{} `json:"-" url:"-"`

	rawJSON json.RawMessage
}

func (f *FlowActionZapierTriggerWebhookParams) GetConnectionID() string {
	if f == nil {
		return ""
	}
	return f.ConnectionID
}

func (f *FlowActionZapierTriggerWebhookParams) GetMethod() FlowActionZapierTriggerWebhookParamsMethod {
	if f == nil || f.Method == nil {
		return ""
	}
	return *f.Method
}

func (f *FlowActionZapierTriggerWebhookParams) GetExtraProperties() map[string]interface{} {
	return f.ExtraProperties
}

func (f *FlowActionZapierTriggerWebhookParams) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetConnectionID sets the ConnectionID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionZapierTriggerWebhookParams) SetConnectionID(connectionID string) {
	f.ConnectionID = connectionID
	f.require(flowActionZapierTriggerWebhookParamsFieldConnectionID)
}

// SetMethod sets the Method field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowActionZapierTriggerWebhookParams) SetMethod(method *FlowActionZapierTriggerWebhookParamsMethod) {
	f.Method = method
	f.require(flowActionZapierTriggerWebhookParamsFieldMethod)
}

func (f *FlowActionZapierTriggerWebhookParams) UnmarshalJSON(data []byte) error {
	type embed FlowActionZapierTriggerWebhookParams
	var unmarshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowActionZapierTriggerWebhookParams(unmarshaler.embed)
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.ExtraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowActionZapierTriggerWebhookParams) MarshalJSON() ([]byte, error) {
	type embed FlowActionZapierTriggerWebhookParams
	var marshaler = struct {
		embed
	}{
		embed: embed(*f),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return internal.MarshalJSONWithExtraProperties(explicitMarshaler, f.ExtraProperties)
}

func (f *FlowActionZapierTriggerWebhookParams) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type FlowActionZapierTriggerWebhookParamsMethod string

const (
	FlowActionZapierTriggerWebhookParamsMethodGet  FlowActionZapierTriggerWebhookParamsMethod = "GET"
	FlowActionZapierTriggerWebhookParamsMethodPost FlowActionZapierTriggerWebhookParamsMethod = "POST"
	FlowActionZapierTriggerWebhookParamsMethodPut  FlowActionZapierTriggerWebhookParamsMethod = "PUT"
)

func NewFlowActionZapierTriggerWebhookParamsMethodFromString(s string) (FlowActionZapierTriggerWebhookParamsMethod, error) {
	switch s {
	case "GET":
		return FlowActionZapierTriggerWebhookParamsMethodGet, nil
	case "POST":
		return FlowActionZapierTriggerWebhookParamsMethodPost, nil
	case "PUT":
		return FlowActionZapierTriggerWebhookParamsMethodPut, nil
	}
	var t FlowActionZapierTriggerWebhookParamsMethod
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (f FlowActionZapierTriggerWebhookParamsMethod) Ptr() *FlowActionZapierTriggerWebhookParamsMethod {
	return &f
}

var (
	flowSummaryFieldID         = big.NewInt(1 << 0)
	flowSummaryFieldName       = big.NewInt(1 << 1)
	flowSummaryFieldCreatedAt  = big.NewInt(1 << 2)
	flowSummaryFieldUpdatedAt  = big.NewInt(1 << 3)
	flowSummaryFieldExecutedAt = big.NewInt(1 << 4)
)

type FlowSummary struct {
	ID         string    `json:"id" url:"id"`
	Name       string    `json:"name" url:"name"`
	CreatedAt  time.Time `json:"created_at" url:"created_at"`
	UpdatedAt  time.Time `json:"updated_at" url:"updated_at"`
	ExecutedAt *string   `json:"executed_at,omitempty" url:"executed_at,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (f *FlowSummary) GetID() string {
	if f == nil {
		return ""
	}
	return f.ID
}

func (f *FlowSummary) GetName() string {
	if f == nil {
		return ""
	}
	return f.Name
}

func (f *FlowSummary) GetCreatedAt() time.Time {
	if f == nil {
		return time.Time{}
	}
	return f.CreatedAt
}

func (f *FlowSummary) GetUpdatedAt() time.Time {
	if f == nil {
		return time.Time{}
	}
	return f.UpdatedAt
}

func (f *FlowSummary) GetExecutedAt() string {
	if f == nil || f.ExecutedAt == nil {
		return ""
	}
	return *f.ExecutedAt
}

func (f *FlowSummary) GetExtraProperties() map[string]interface{} {
	return f.extraProperties
}

func (f *FlowSummary) require(field *big.Int) {
	if f.explicitFields == nil {
		f.explicitFields = big.NewInt(0)
	}
	f.explicitFields.Or(f.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowSummary) SetID(id string) {
	f.ID = id
	f.require(flowSummaryFieldID)
}

// SetName sets the Name field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowSummary) SetName(name string) {
	f.Name = name
	f.require(flowSummaryFieldName)
}

// SetCreatedAt sets the CreatedAt field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowSummary) SetCreatedAt(createdAt time.Time) {
	f.CreatedAt = createdAt
	f.require(flowSummaryFieldCreatedAt)
}

// SetUpdatedAt sets the UpdatedAt field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowSummary) SetUpdatedAt(updatedAt time.Time) {
	f.UpdatedAt = updatedAt
	f.require(flowSummaryFieldUpdatedAt)
}

// SetExecutedAt sets the ExecutedAt field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (f *FlowSummary) SetExecutedAt(executedAt *string) {
	f.ExecutedAt = executedAt
	f.require(flowSummaryFieldExecutedAt)
}

func (f *FlowSummary) UnmarshalJSON(data []byte) error {
	type embed FlowSummary
	var unmarshaler = struct {
		embed
		CreatedAt *internal.DateTime `json:"created_at"`
		UpdatedAt *internal.DateTime `json:"updated_at"`
	}{
		embed: embed(*f),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*f = FlowSummary(unmarshaler.embed)
	f.CreatedAt = unmarshaler.CreatedAt.Time()
	f.UpdatedAt = unmarshaler.UpdatedAt.Time()
	extraProperties, err := internal.ExtractExtraProperties(data, *f)
	if err != nil {
		return err
	}
	f.extraProperties = extraProperties
	f.rawJSON = json.RawMessage(data)
	return nil
}

func (f *FlowSummary) MarshalJSON() ([]byte, error) {
	type embed FlowSummary
	var marshaler = struct {
		embed
		CreatedAt *internal.DateTime `json:"created_at"`
		UpdatedAt *internal.DateTime `json:"updated_at"`
	}{
		embed:     embed(*f),
		CreatedAt: internal.NewDateTime(f.CreatedAt),
		UpdatedAt: internal.NewDateTime(f.UpdatedAt),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, f.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (f *FlowSummary) String() string {
	if len(f.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(f.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(f); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", f)
}

type GetFlowRequestParametersHydrateEnum string

const (
	GetFlowRequestParametersHydrateEnumFormCount GetFlowRequestParametersHydrateEnum = "form_count"
	GetFlowRequestParametersHydrateEnumForms     GetFlowRequestParametersHydrateEnum = "forms"
)

func NewGetFlowRequestParametersHydrateEnumFromString(s string) (GetFlowRequestParametersHydrateEnum, error) {
	switch s {
	case "form_count":
		return GetFlowRequestParametersHydrateEnumFormCount, nil
	case "forms":
		return GetFlowRequestParametersHydrateEnumForms, nil
	}
	var t GetFlowRequestParametersHydrateEnum
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (g GetFlowRequestParametersHydrateEnum) Ptr() *GetFlowRequestParametersHydrateEnum {
	return &g
}

var (
	getFlowResponseContentFieldID         = big.NewInt(1 << 0)
	getFlowResponseContentFieldName       = big.NewInt(1 << 1)
	getFlowResponseContentFieldActions    = big.NewInt(1 << 2)
	getFlowResponseContentFieldCreatedAt  = big.NewInt(1 << 3)
	getFlowResponseContentFieldUpdatedAt  = big.NewInt(1 << 4)
	getFlowResponseContentFieldExecutedAt = big.NewInt(1 << 5)
)

type GetFlowResponseContent struct {
	ID         string        `json:"id" url:"id"`
	Name       string        `json:"name" url:"name"`
	Actions    []*FlowAction `json:"actions,omitempty" url:"actions,omitempty"`
	CreatedAt  time.Time     `json:"created_at" url:"created_at"`
	UpdatedAt  time.Time     `json:"updated_at" url:"updated_at"`
	ExecutedAt *string       `json:"executed_at,omitempty" url:"executed_at,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (g *GetFlowResponseContent) GetID() string {
	if g == nil {
		return ""
	}
	return g.ID
}

func (g *GetFlowResponseContent) GetName() string {
	if g == nil {
		return ""
	}
	return g.Name
}

func (g *GetFlowResponseContent) GetActions() []*FlowAction {
	if g == nil || g.Actions == nil {
		return nil
	}
	return g.Actions
}

func (g *GetFlowResponseContent) GetCreatedAt() time.Time {
	if g == nil {
		return time.Time{}
	}
	return g.CreatedAt
}

func (g *GetFlowResponseContent) GetUpdatedAt() time.Time {
	if g == nil {
		return time.Time{}
	}
	return g.UpdatedAt
}

func (g *GetFlowResponseContent) GetExecutedAt() string {
	if g == nil || g.ExecutedAt == nil {
		return ""
	}
	return *g.ExecutedAt
}

func (g *GetFlowResponseContent) GetExtraProperties() map[string]interface{} {
	return g.extraProperties
}

func (g *GetFlowResponseContent) require(field *big.Int) {
	if g.explicitFields == nil {
		g.explicitFields = big.NewInt(0)
	}
	g.explicitFields.Or(g.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetFlowResponseContent) SetID(id string) {
	g.ID = id
	g.require(getFlowResponseContentFieldID)
}

// SetName sets the Name field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetFlowResponseContent) SetName(name string) {
	g.Name = name
	g.require(getFlowResponseContentFieldName)
}

// SetActions sets the Actions field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetFlowResponseContent) SetActions(actions []*FlowAction) {
	g.Actions = actions
	g.require(getFlowResponseContentFieldActions)
}

// SetCreatedAt sets the CreatedAt field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetFlowResponseContent) SetCreatedAt(createdAt time.Time) {
	g.CreatedAt = createdAt
	g.require(getFlowResponseContentFieldCreatedAt)
}

// SetUpdatedAt sets the UpdatedAt field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetFlowResponseContent) SetUpdatedAt(updatedAt time.Time) {
	g.UpdatedAt = updatedAt
	g.require(getFlowResponseContentFieldUpdatedAt)
}

// SetExecutedAt sets the ExecutedAt field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetFlowResponseContent) SetExecutedAt(executedAt *string) {
	g.ExecutedAt = executedAt
	g.require(getFlowResponseContentFieldExecutedAt)
}

func (g *GetFlowResponseContent) UnmarshalJSON(data []byte) error {
	type embed GetFlowResponseContent
	var unmarshaler = struct {
		embed
		CreatedAt *internal.DateTime `json:"created_at"`
		UpdatedAt *internal.DateTime `json:"updated_at"`
	}{
		embed: embed(*g),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*g = GetFlowResponseContent(unmarshaler.embed)
	g.CreatedAt = unmarshaler.CreatedAt.Time()
	g.UpdatedAt = unmarshaler.UpdatedAt.Time()
	extraProperties, err := internal.ExtractExtraProperties(data, *g)
	if err != nil {
		return err
	}
	g.extraProperties = extraProperties
	g.rawJSON = json.RawMessage(data)
	return nil
}

func (g *GetFlowResponseContent) MarshalJSON() ([]byte, error) {
	type embed GetFlowResponseContent
	var marshaler = struct {
		embed
		CreatedAt *internal.DateTime `json:"created_at"`
		UpdatedAt *internal.DateTime `json:"updated_at"`
	}{
		embed:     embed(*g),
		CreatedAt: internal.NewDateTime(g.CreatedAt),
		UpdatedAt: internal.NewDateTime(g.UpdatedAt),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, g.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (g *GetFlowResponseContent) String() string {
	if len(g.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(g.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(g); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", g)
}

var (
	listFlowsOffsetPaginatedResponseContentFieldStart = big.NewInt(1 << 0)
	listFlowsOffsetPaginatedResponseContentFieldLimit = big.NewInt(1 << 1)
	listFlowsOffsetPaginatedResponseContentFieldTotal = big.NewInt(1 << 2)
	listFlowsOffsetPaginatedResponseContentFieldFlows = big.NewInt(1 << 3)
)

type ListFlowsOffsetPaginatedResponseContent struct {
	Start *float64       `json:"start,omitempty" url:"start,omitempty"`
	Limit *float64       `json:"limit,omitempty" url:"limit,omitempty"`
	Total *float64       `json:"total,omitempty" url:"total,omitempty"`
	Flows []*FlowSummary `json:"flows,omitempty" url:"flows,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (l *ListFlowsOffsetPaginatedResponseContent) GetStart() float64 {
	if l == nil || l.Start == nil {
		return 0
	}
	return *l.Start
}

func (l *ListFlowsOffsetPaginatedResponseContent) GetLimit() float64 {
	if l == nil || l.Limit == nil {
		return 0
	}
	return *l.Limit
}

func (l *ListFlowsOffsetPaginatedResponseContent) GetTotal() float64 {
	if l == nil || l.Total == nil {
		return 0
	}
	return *l.Total
}

func (l *ListFlowsOffsetPaginatedResponseContent) GetFlows() []*FlowSummary {
	if l == nil || l.Flows == nil {
		return nil
	}
	return l.Flows
}

func (l *ListFlowsOffsetPaginatedResponseContent) GetExtraProperties() map[string]interface{} {
	return l.extraProperties
}

func (l *ListFlowsOffsetPaginatedResponseContent) require(field *big.Int) {
	if l.explicitFields == nil {
		l.explicitFields = big.NewInt(0)
	}
	l.explicitFields.Or(l.explicitFields, field)
}

// SetStart sets the Start field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (l *ListFlowsOffsetPaginatedResponseContent) SetStart(start *float64) {
	l.Start = start
	l.require(listFlowsOffsetPaginatedResponseContentFieldStart)
}

// SetLimit sets the Limit field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (l *ListFlowsOffsetPaginatedResponseContent) SetLimit(limit *float64) {
	l.Limit = limit
	l.require(listFlowsOffsetPaginatedResponseContentFieldLimit)
}

// SetTotal sets the Total field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (l *ListFlowsOffsetPaginatedResponseContent) SetTotal(total *float64) {
	l.Total = total
	l.require(listFlowsOffsetPaginatedResponseContentFieldTotal)
}

// SetFlows sets the Flows field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (l *ListFlowsOffsetPaginatedResponseContent) SetFlows(flows []*FlowSummary) {
	l.Flows = flows
	l.require(listFlowsOffsetPaginatedResponseContentFieldFlows)
}

func (l *ListFlowsOffsetPaginatedResponseContent) UnmarshalJSON(data []byte) error {
	type unmarshaler ListFlowsOffsetPaginatedResponseContent
	var value unmarshaler
	if err := json.Unmarshal(data, &value); err != nil {
		return err
	}
	*l = ListFlowsOffsetPaginatedResponseContent(value)
	extraProperties, err := internal.ExtractExtraProperties(data, *l)
	if err != nil {
		return err
	}
	l.extraProperties = extraProperties
	l.rawJSON = json.RawMessage(data)
	return nil
}

func (l *ListFlowsOffsetPaginatedResponseContent) MarshalJSON() ([]byte, error) {
	type embed ListFlowsOffsetPaginatedResponseContent
	var marshaler = struct {
		embed
	}{
		embed: embed(*l),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, l.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (l *ListFlowsOffsetPaginatedResponseContent) String() string {
	if len(l.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(l.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(l); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", l)
}

var (
	updateFlowResponseContentFieldID         = big.NewInt(1 << 0)
	updateFlowResponseContentFieldName       = big.NewInt(1 << 1)
	updateFlowResponseContentFieldActions    = big.NewInt(1 << 2)
	updateFlowResponseContentFieldCreatedAt  = big.NewInt(1 << 3)
	updateFlowResponseContentFieldUpdatedAt  = big.NewInt(1 << 4)
	updateFlowResponseContentFieldExecutedAt = big.NewInt(1 << 5)
)

type UpdateFlowResponseContent struct {
	ID         string        `json:"id" url:"id"`
	Name       string        `json:"name" url:"name"`
	Actions    []*FlowAction `json:"actions,omitempty" url:"actions,omitempty"`
	CreatedAt  time.Time     `json:"created_at" url:"created_at"`
	UpdatedAt  time.Time     `json:"updated_at" url:"updated_at"`
	ExecutedAt *string       `json:"executed_at,omitempty" url:"executed_at,omitempty"`

	// Private bitmask of fields set to an explicit value and therefore not to be omitted
	explicitFields *big.Int `json:"-" url:"-"`

	extraProperties map[string]interface{}
	rawJSON         json.RawMessage
}

func (u *UpdateFlowResponseContent) GetID() string {
	if u == nil {
		return ""
	}
	return u.ID
}

func (u *UpdateFlowResponseContent) GetName() string {
	if u == nil {
		return ""
	}
	return u.Name
}

func (u *UpdateFlowResponseContent) GetActions() []*FlowAction {
	if u == nil || u.Actions == nil {
		return nil
	}
	return u.Actions
}

func (u *UpdateFlowResponseContent) GetCreatedAt() time.Time {
	if u == nil {
		return time.Time{}
	}
	return u.CreatedAt
}

func (u *UpdateFlowResponseContent) GetUpdatedAt() time.Time {
	if u == nil {
		return time.Time{}
	}
	return u.UpdatedAt
}

func (u *UpdateFlowResponseContent) GetExecutedAt() string {
	if u == nil || u.ExecutedAt == nil {
		return ""
	}
	return *u.ExecutedAt
}

func (u *UpdateFlowResponseContent) GetExtraProperties() map[string]interface{} {
	return u.extraProperties
}

func (u *UpdateFlowResponseContent) require(field *big.Int) {
	if u.explicitFields == nil {
		u.explicitFields = big.NewInt(0)
	}
	u.explicitFields.Or(u.explicitFields, field)
}

// SetID sets the ID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateFlowResponseContent) SetID(id string) {
	u.ID = id
	u.require(updateFlowResponseContentFieldID)
}

// SetName sets the Name field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateFlowResponseContent) SetName(name string) {
	u.Name = name
	u.require(updateFlowResponseContentFieldName)
}

// SetActions sets the Actions field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateFlowResponseContent) SetActions(actions []*FlowAction) {
	u.Actions = actions
	u.require(updateFlowResponseContentFieldActions)
}

// SetCreatedAt sets the CreatedAt field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateFlowResponseContent) SetCreatedAt(createdAt time.Time) {
	u.CreatedAt = createdAt
	u.require(updateFlowResponseContentFieldCreatedAt)
}

// SetUpdatedAt sets the UpdatedAt field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateFlowResponseContent) SetUpdatedAt(updatedAt time.Time) {
	u.UpdatedAt = updatedAt
	u.require(updateFlowResponseContentFieldUpdatedAt)
}

// SetExecutedAt sets the ExecutedAt field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateFlowResponseContent) SetExecutedAt(executedAt *string) {
	u.ExecutedAt = executedAt
	u.require(updateFlowResponseContentFieldExecutedAt)
}

func (u *UpdateFlowResponseContent) UnmarshalJSON(data []byte) error {
	type embed UpdateFlowResponseContent
	var unmarshaler = struct {
		embed
		CreatedAt *internal.DateTime `json:"created_at"`
		UpdatedAt *internal.DateTime `json:"updated_at"`
	}{
		embed: embed(*u),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*u = UpdateFlowResponseContent(unmarshaler.embed)
	u.CreatedAt = unmarshaler.CreatedAt.Time()
	u.UpdatedAt = unmarshaler.UpdatedAt.Time()
	extraProperties, err := internal.ExtractExtraProperties(data, *u)
	if err != nil {
		return err
	}
	u.extraProperties = extraProperties
	u.rawJSON = json.RawMessage(data)
	return nil
}

func (u *UpdateFlowResponseContent) MarshalJSON() ([]byte, error) {
	type embed UpdateFlowResponseContent
	var marshaler = struct {
		embed
		CreatedAt *internal.DateTime `json:"created_at"`
		UpdatedAt *internal.DateTime `json:"updated_at"`
	}{
		embed:     embed(*u),
		CreatedAt: internal.NewDateTime(u.CreatedAt),
		UpdatedAt: internal.NewDateTime(u.UpdatedAt),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields)
	return json.Marshal(explicitMarshaler)
}

func (u *UpdateFlowResponseContent) String() string {
	if len(u.rawJSON) > 0 {
		if value, err := internal.StringifyJSON(u.rawJSON); err == nil {
			return value
		}
	}
	if value, err := internal.StringifyJSON(u); err == nil {
		return value
	}
	return fmt.Sprintf("%#v", u)
}
