// 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"
)

var (
	createHookResponseContentFieldTriggerID    = big.NewInt(1 << 0)
	createHookResponseContentFieldID           = big.NewInt(1 << 1)
	createHookResponseContentFieldName         = big.NewInt(1 << 2)
	createHookResponseContentFieldEnabled      = big.NewInt(1 << 3)
	createHookResponseContentFieldScript       = big.NewInt(1 << 4)
	createHookResponseContentFieldDependencies = big.NewInt(1 << 5)
)

type CreateHookResponseContent struct {
	// Trigger ID
	TriggerID *string `json:"triggerId,omitempty" url:"triggerId,omitempty"`
	// ID of this hook.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// Name of this hook.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Whether this hook will be executed (true) or ignored (false).
	Enabled *bool `json:"enabled,omitempty" url:"enabled,omitempty"`
	// Code to be executed when this hook runs.
	Script       *string           `json:"script,omitempty" url:"script,omitempty"`
	Dependencies *HookDependencies `json:"dependencies,omitempty" url:"dependencies,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 *CreateHookResponseContent) GetTriggerID() string {
	if c == nil || c.TriggerID == nil {
		return ""
	}
	return *c.TriggerID
}

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

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

func (c *CreateHookResponseContent) GetEnabled() bool {
	if c == nil || c.Enabled == nil {
		return false
	}
	return *c.Enabled
}

func (c *CreateHookResponseContent) GetScript() string {
	if c == nil || c.Script == nil {
		return ""
	}
	return *c.Script
}

func (c *CreateHookResponseContent) GetDependencies() HookDependencies {
	if c == nil || c.Dependencies == nil {
		return nil
	}
	return *c.Dependencies
}

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

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

// SetTriggerID sets the TriggerID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateHookResponseContent) SetTriggerID(triggerID *string) {
	c.TriggerID = triggerID
	c.require(createHookResponseContentFieldTriggerID)
}

// 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 *CreateHookResponseContent) SetID(id *string) {
	c.ID = id
	c.require(createHookResponseContentFieldID)
}

// 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 *CreateHookResponseContent) SetName(name *string) {
	c.Name = name
	c.require(createHookResponseContentFieldName)
}

// SetEnabled sets the Enabled field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateHookResponseContent) SetEnabled(enabled *bool) {
	c.Enabled = enabled
	c.require(createHookResponseContentFieldEnabled)
}

// SetScript sets the Script field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateHookResponseContent) SetScript(script *string) {
	c.Script = script
	c.require(createHookResponseContentFieldScript)
}

// SetDependencies sets the Dependencies field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateHookResponseContent) SetDependencies(dependencies *HookDependencies) {
	c.Dependencies = dependencies
	c.require(createHookResponseContentFieldDependencies)
}

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

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

func (c *CreateHookResponseContent) 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)
}

var (
	getHookResponseContentFieldTriggerID    = big.NewInt(1 << 0)
	getHookResponseContentFieldID           = big.NewInt(1 << 1)
	getHookResponseContentFieldName         = big.NewInt(1 << 2)
	getHookResponseContentFieldEnabled      = big.NewInt(1 << 3)
	getHookResponseContentFieldScript       = big.NewInt(1 << 4)
	getHookResponseContentFieldDependencies = big.NewInt(1 << 5)
)

type GetHookResponseContent struct {
	// Trigger ID
	TriggerID *string `json:"triggerId,omitempty" url:"triggerId,omitempty"`
	// ID of this hook.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// Name of this hook.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Whether this hook will be executed (true) or ignored (false).
	Enabled *bool `json:"enabled,omitempty" url:"enabled,omitempty"`
	// Code to be executed when this hook runs.
	Script       *string           `json:"script,omitempty" url:"script,omitempty"`
	Dependencies *HookDependencies `json:"dependencies,omitempty" url:"dependencies,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 *GetHookResponseContent) GetTriggerID() string {
	if g == nil || g.TriggerID == nil {
		return ""
	}
	return *g.TriggerID
}

func (g *GetHookResponseContent) GetID() string {
	if g == nil || g.ID == nil {
		return ""
	}
	return *g.ID
}

func (g *GetHookResponseContent) GetName() string {
	if g == nil || g.Name == nil {
		return ""
	}
	return *g.Name
}

func (g *GetHookResponseContent) GetEnabled() bool {
	if g == nil || g.Enabled == nil {
		return false
	}
	return *g.Enabled
}

func (g *GetHookResponseContent) GetScript() string {
	if g == nil || g.Script == nil {
		return ""
	}
	return *g.Script
}

func (g *GetHookResponseContent) GetDependencies() HookDependencies {
	if g == nil || g.Dependencies == nil {
		return nil
	}
	return *g.Dependencies
}

func (g *GetHookResponseContent) GetExtraProperties() map[string]interface{} {
	return g.extraProperties
}

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

// SetTriggerID sets the TriggerID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetHookResponseContent) SetTriggerID(triggerID *string) {
	g.TriggerID = triggerID
	g.require(getHookResponseContentFieldTriggerID)
}

// 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 *GetHookResponseContent) SetID(id *string) {
	g.ID = id
	g.require(getHookResponseContentFieldID)
}

// 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 *GetHookResponseContent) SetName(name *string) {
	g.Name = name
	g.require(getHookResponseContentFieldName)
}

// SetEnabled sets the Enabled field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetHookResponseContent) SetEnabled(enabled *bool) {
	g.Enabled = enabled
	g.require(getHookResponseContentFieldEnabled)
}

// SetScript sets the Script field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetHookResponseContent) SetScript(script *string) {
	g.Script = script
	g.require(getHookResponseContentFieldScript)
}

// SetDependencies sets the Dependencies field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetHookResponseContent) SetDependencies(dependencies *HookDependencies) {
	g.Dependencies = dependencies
	g.require(getHookResponseContentFieldDependencies)
}

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

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

func (g *GetHookResponseContent) 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 (
	hookFieldTriggerID    = big.NewInt(1 << 0)
	hookFieldID           = big.NewInt(1 << 1)
	hookFieldName         = big.NewInt(1 << 2)
	hookFieldEnabled      = big.NewInt(1 << 3)
	hookFieldScript       = big.NewInt(1 << 4)
	hookFieldDependencies = big.NewInt(1 << 5)
)

type Hook struct {
	// Trigger ID
	TriggerID *string `json:"triggerId,omitempty" url:"triggerId,omitempty"`
	// ID of this hook.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// Name of this hook.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Whether this hook will be executed (true) or ignored (false).
	Enabled *bool `json:"enabled,omitempty" url:"enabled,omitempty"`
	// Code to be executed when this hook runs.
	Script       *string           `json:"script,omitempty" url:"script,omitempty"`
	Dependencies *HookDependencies `json:"dependencies,omitempty" url:"dependencies,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 (h *Hook) GetTriggerID() string {
	if h == nil || h.TriggerID == nil {
		return ""
	}
	return *h.TriggerID
}

func (h *Hook) GetID() string {
	if h == nil || h.ID == nil {
		return ""
	}
	return *h.ID
}

func (h *Hook) GetName() string {
	if h == nil || h.Name == nil {
		return ""
	}
	return *h.Name
}

func (h *Hook) GetEnabled() bool {
	if h == nil || h.Enabled == nil {
		return false
	}
	return *h.Enabled
}

func (h *Hook) GetScript() string {
	if h == nil || h.Script == nil {
		return ""
	}
	return *h.Script
}

func (h *Hook) GetDependencies() HookDependencies {
	if h == nil || h.Dependencies == nil {
		return nil
	}
	return *h.Dependencies
}

func (h *Hook) GetExtraProperties() map[string]interface{} {
	return h.extraProperties
}

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

// SetTriggerID sets the TriggerID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (h *Hook) SetTriggerID(triggerID *string) {
	h.TriggerID = triggerID
	h.require(hookFieldTriggerID)
}

// 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 (h *Hook) SetID(id *string) {
	h.ID = id
	h.require(hookFieldID)
}

// 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 (h *Hook) SetName(name *string) {
	h.Name = name
	h.require(hookFieldName)
}

// SetEnabled sets the Enabled field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (h *Hook) SetEnabled(enabled *bool) {
	h.Enabled = enabled
	h.require(hookFieldEnabled)
}

// SetScript sets the Script field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (h *Hook) SetScript(script *string) {
	h.Script = script
	h.require(hookFieldScript)
}

// SetDependencies sets the Dependencies field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (h *Hook) SetDependencies(dependencies *HookDependencies) {
	h.Dependencies = dependencies
	h.require(hookFieldDependencies)
}

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

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

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

// Dependencies of this hook used by webtask server.
type HookDependencies = map[string]string

// Retrieves hooks that match the trigger
type HookTriggerIDEnum string

const (
	HookTriggerIDEnumCredentialsExchange  HookTriggerIDEnum = "credentials-exchange"
	HookTriggerIDEnumPreUserRegistration  HookTriggerIDEnum = "pre-user-registration"
	HookTriggerIDEnumPostUserRegistration HookTriggerIDEnum = "post-user-registration"
	HookTriggerIDEnumPostChangePassword   HookTriggerIDEnum = "post-change-password"
	HookTriggerIDEnumSendPhoneMessage     HookTriggerIDEnum = "send-phone-message"
)

func NewHookTriggerIDEnumFromString(s string) (HookTriggerIDEnum, error) {
	switch s {
	case "credentials-exchange":
		return HookTriggerIDEnumCredentialsExchange, nil
	case "pre-user-registration":
		return HookTriggerIDEnumPreUserRegistration, nil
	case "post-user-registration":
		return HookTriggerIDEnumPostUserRegistration, nil
	case "post-change-password":
		return HookTriggerIDEnumPostChangePassword, nil
	case "send-phone-message":
		return HookTriggerIDEnumSendPhoneMessage, nil
	}
	var t HookTriggerIDEnum
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (h HookTriggerIDEnum) Ptr() *HookTriggerIDEnum {
	return &h
}

var (
	listHooksOffsetPaginatedResponseContentFieldStart = big.NewInt(1 << 0)
	listHooksOffsetPaginatedResponseContentFieldLimit = big.NewInt(1 << 1)
	listHooksOffsetPaginatedResponseContentFieldTotal = big.NewInt(1 << 2)
	listHooksOffsetPaginatedResponseContentFieldHooks = big.NewInt(1 << 3)
)

type ListHooksOffsetPaginatedResponseContent 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"`
	Hooks []*Hook  `json:"hooks,omitempty" url:"hooks,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 *ListHooksOffsetPaginatedResponseContent) GetStart() float64 {
	if l == nil || l.Start == nil {
		return 0
	}
	return *l.Start
}

func (l *ListHooksOffsetPaginatedResponseContent) GetLimit() float64 {
	if l == nil || l.Limit == nil {
		return 0
	}
	return *l.Limit
}

func (l *ListHooksOffsetPaginatedResponseContent) GetTotal() float64 {
	if l == nil || l.Total == nil {
		return 0
	}
	return *l.Total
}

func (l *ListHooksOffsetPaginatedResponseContent) GetHooks() []*Hook {
	if l == nil || l.Hooks == nil {
		return nil
	}
	return l.Hooks
}

func (l *ListHooksOffsetPaginatedResponseContent) GetExtraProperties() map[string]interface{} {
	return l.extraProperties
}

func (l *ListHooksOffsetPaginatedResponseContent) 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 *ListHooksOffsetPaginatedResponseContent) SetStart(start *float64) {
	l.Start = start
	l.require(listHooksOffsetPaginatedResponseContentFieldStart)
}

// 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 *ListHooksOffsetPaginatedResponseContent) SetLimit(limit *float64) {
	l.Limit = limit
	l.require(listHooksOffsetPaginatedResponseContentFieldLimit)
}

// 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 *ListHooksOffsetPaginatedResponseContent) SetTotal(total *float64) {
	l.Total = total
	l.require(listHooksOffsetPaginatedResponseContentFieldTotal)
}

// SetHooks sets the Hooks field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (l *ListHooksOffsetPaginatedResponseContent) SetHooks(hooks []*Hook) {
	l.Hooks = hooks
	l.require(listHooksOffsetPaginatedResponseContentFieldHooks)
}

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

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

func (l *ListHooksOffsetPaginatedResponseContent) 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 (
	updateHookResponseContentFieldTriggerID    = big.NewInt(1 << 0)
	updateHookResponseContentFieldID           = big.NewInt(1 << 1)
	updateHookResponseContentFieldName         = big.NewInt(1 << 2)
	updateHookResponseContentFieldEnabled      = big.NewInt(1 << 3)
	updateHookResponseContentFieldScript       = big.NewInt(1 << 4)
	updateHookResponseContentFieldDependencies = big.NewInt(1 << 5)
)

type UpdateHookResponseContent struct {
	// Trigger ID
	TriggerID *string `json:"triggerId,omitempty" url:"triggerId,omitempty"`
	// ID of this hook.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// Name of this hook.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Whether this hook will be executed (true) or ignored (false).
	Enabled *bool `json:"enabled,omitempty" url:"enabled,omitempty"`
	// Code to be executed when this hook runs.
	Script       *string           `json:"script,omitempty" url:"script,omitempty"`
	Dependencies *HookDependencies `json:"dependencies,omitempty" url:"dependencies,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 *UpdateHookResponseContent) GetTriggerID() string {
	if u == nil || u.TriggerID == nil {
		return ""
	}
	return *u.TriggerID
}

func (u *UpdateHookResponseContent) GetID() string {
	if u == nil || u.ID == nil {
		return ""
	}
	return *u.ID
}

func (u *UpdateHookResponseContent) GetName() string {
	if u == nil || u.Name == nil {
		return ""
	}
	return *u.Name
}

func (u *UpdateHookResponseContent) GetEnabled() bool {
	if u == nil || u.Enabled == nil {
		return false
	}
	return *u.Enabled
}

func (u *UpdateHookResponseContent) GetScript() string {
	if u == nil || u.Script == nil {
		return ""
	}
	return *u.Script
}

func (u *UpdateHookResponseContent) GetDependencies() HookDependencies {
	if u == nil || u.Dependencies == nil {
		return nil
	}
	return *u.Dependencies
}

func (u *UpdateHookResponseContent) GetExtraProperties() map[string]interface{} {
	return u.extraProperties
}

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

// SetTriggerID sets the TriggerID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateHookResponseContent) SetTriggerID(triggerID *string) {
	u.TriggerID = triggerID
	u.require(updateHookResponseContentFieldTriggerID)
}

// 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 *UpdateHookResponseContent) SetID(id *string) {
	u.ID = id
	u.require(updateHookResponseContentFieldID)
}

// 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 *UpdateHookResponseContent) SetName(name *string) {
	u.Name = name
	u.require(updateHookResponseContentFieldName)
}

// SetEnabled sets the Enabled field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateHookResponseContent) SetEnabled(enabled *bool) {
	u.Enabled = enabled
	u.require(updateHookResponseContentFieldEnabled)
}

// SetScript sets the Script field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateHookResponseContent) SetScript(script *string) {
	u.Script = script
	u.require(updateHookResponseContentFieldScript)
}

// SetDependencies sets the Dependencies field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateHookResponseContent) SetDependencies(dependencies *HookDependencies) {
	u.Dependencies = dependencies
	u.require(updateHookResponseContentFieldDependencies)
}

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

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

func (u *UpdateHookResponseContent) 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)
}
