// 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 (
	createUserAttributeProfileResponseContentFieldID             = big.NewInt(1 << 0)
	createUserAttributeProfileResponseContentFieldName           = big.NewInt(1 << 1)
	createUserAttributeProfileResponseContentFieldUserID         = big.NewInt(1 << 2)
	createUserAttributeProfileResponseContentFieldUserAttributes = big.NewInt(1 << 3)
)

type CreateUserAttributeProfileResponseContent struct {
	ID             *UserAttributeProfileID             `json:"id,omitempty" url:"id,omitempty"`
	Name           *UserAttributeProfileName           `json:"name,omitempty" url:"name,omitempty"`
	UserID         *UserAttributeProfileUserID         `json:"user_id,omitempty" url:"user_id,omitempty"`
	UserAttributes *UserAttributeProfileUserAttributes `json:"user_attributes,omitempty" url:"user_attributes,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 *CreateUserAttributeProfileResponseContent) GetID() UserAttributeProfileID {
	if c == nil || c.ID == nil {
		return ""
	}
	return *c.ID
}

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

func (c *CreateUserAttributeProfileResponseContent) GetUserID() UserAttributeProfileUserID {
	if c == nil || c.UserID == nil {
		return UserAttributeProfileUserID{}
	}
	return *c.UserID
}

func (c *CreateUserAttributeProfileResponseContent) GetUserAttributes() UserAttributeProfileUserAttributes {
	if c == nil || c.UserAttributes == nil {
		return nil
	}
	return *c.UserAttributes
}

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

func (c *CreateUserAttributeProfileResponseContent) 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 *CreateUserAttributeProfileResponseContent) SetID(id *UserAttributeProfileID) {
	c.ID = id
	c.require(createUserAttributeProfileResponseContentFieldID)
}

// 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 *CreateUserAttributeProfileResponseContent) SetName(name *UserAttributeProfileName) {
	c.Name = name
	c.require(createUserAttributeProfileResponseContentFieldName)
}

// 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 (c *CreateUserAttributeProfileResponseContent) SetUserID(userID *UserAttributeProfileUserID) {
	c.UserID = userID
	c.require(createUserAttributeProfileResponseContentFieldUserID)
}

// SetUserAttributes sets the UserAttributes field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserAttributeProfileResponseContent) SetUserAttributes(userAttributes *UserAttributeProfileUserAttributes) {
	c.UserAttributes = userAttributes
	c.require(createUserAttributeProfileResponseContentFieldUserAttributes)
}

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

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

func (c *CreateUserAttributeProfileResponseContent) 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 (
	getUserAttributeProfileResponseContentFieldID             = big.NewInt(1 << 0)
	getUserAttributeProfileResponseContentFieldName           = big.NewInt(1 << 1)
	getUserAttributeProfileResponseContentFieldUserID         = big.NewInt(1 << 2)
	getUserAttributeProfileResponseContentFieldUserAttributes = big.NewInt(1 << 3)
)

type GetUserAttributeProfileResponseContent struct {
	ID             *UserAttributeProfileID             `json:"id,omitempty" url:"id,omitempty"`
	Name           *UserAttributeProfileName           `json:"name,omitempty" url:"name,omitempty"`
	UserID         *UserAttributeProfileUserID         `json:"user_id,omitempty" url:"user_id,omitempty"`
	UserAttributes *UserAttributeProfileUserAttributes `json:"user_attributes,omitempty" url:"user_attributes,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 *GetUserAttributeProfileResponseContent) GetID() UserAttributeProfileID {
	if g == nil || g.ID == nil {
		return ""
	}
	return *g.ID
}

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

func (g *GetUserAttributeProfileResponseContent) GetUserID() UserAttributeProfileUserID {
	if g == nil || g.UserID == nil {
		return UserAttributeProfileUserID{}
	}
	return *g.UserID
}

func (g *GetUserAttributeProfileResponseContent) GetUserAttributes() UserAttributeProfileUserAttributes {
	if g == nil || g.UserAttributes == nil {
		return nil
	}
	return *g.UserAttributes
}

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

func (g *GetUserAttributeProfileResponseContent) 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 *GetUserAttributeProfileResponseContent) SetID(id *UserAttributeProfileID) {
	g.ID = id
	g.require(getUserAttributeProfileResponseContentFieldID)
}

// 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 *GetUserAttributeProfileResponseContent) SetName(name *UserAttributeProfileName) {
	g.Name = name
	g.require(getUserAttributeProfileResponseContentFieldName)
}

// 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 (g *GetUserAttributeProfileResponseContent) SetUserID(userID *UserAttributeProfileUserID) {
	g.UserID = userID
	g.require(getUserAttributeProfileResponseContentFieldUserID)
}

// SetUserAttributes sets the UserAttributes field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserAttributeProfileResponseContent) SetUserAttributes(userAttributes *UserAttributeProfileUserAttributes) {
	g.UserAttributes = userAttributes
	g.require(getUserAttributeProfileResponseContentFieldUserAttributes)
}

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

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

func (g *GetUserAttributeProfileResponseContent) 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 (
	getUserAttributeProfileTemplateResponseContentFieldID          = big.NewInt(1 << 0)
	getUserAttributeProfileTemplateResponseContentFieldDisplayName = big.NewInt(1 << 1)
	getUserAttributeProfileTemplateResponseContentFieldTemplate    = big.NewInt(1 << 2)
)

type GetUserAttributeProfileTemplateResponseContent struct {
	// The id of the template.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The user-friendly name of the template displayed in the UI.
	DisplayName *string                       `json:"display_name,omitempty" url:"display_name,omitempty"`
	Template    *UserAttributeProfileTemplate `json:"template,omitempty" url:"template,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 *GetUserAttributeProfileTemplateResponseContent) GetID() string {
	if g == nil || g.ID == nil {
		return ""
	}
	return *g.ID
}

func (g *GetUserAttributeProfileTemplateResponseContent) GetDisplayName() string {
	if g == nil || g.DisplayName == nil {
		return ""
	}
	return *g.DisplayName
}

func (g *GetUserAttributeProfileTemplateResponseContent) GetTemplate() UserAttributeProfileTemplate {
	if g == nil || g.Template == nil {
		return UserAttributeProfileTemplate{}
	}
	return *g.Template
}

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

func (g *GetUserAttributeProfileTemplateResponseContent) 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 *GetUserAttributeProfileTemplateResponseContent) SetID(id *string) {
	g.ID = id
	g.require(getUserAttributeProfileTemplateResponseContentFieldID)
}

// SetDisplayName sets the DisplayName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserAttributeProfileTemplateResponseContent) SetDisplayName(displayName *string) {
	g.DisplayName = displayName
	g.require(getUserAttributeProfileTemplateResponseContentFieldDisplayName)
}

// SetTemplate sets the Template field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserAttributeProfileTemplateResponseContent) SetTemplate(template *UserAttributeProfileTemplate) {
	g.Template = template
	g.require(getUserAttributeProfileTemplateResponseContentFieldTemplate)
}

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

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

func (g *GetUserAttributeProfileTemplateResponseContent) 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 (
	listUserAttributeProfileTemplateResponseContentFieldUserAttributeProfileTemplates = big.NewInt(1 << 0)
)

type ListUserAttributeProfileTemplateResponseContent struct {
	UserAttributeProfileTemplates []*UserAttributeProfileTemplateItem `json:"user_attribute_profile_templates,omitempty" url:"user_attribute_profile_templates,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 *ListUserAttributeProfileTemplateResponseContent) GetUserAttributeProfileTemplates() []*UserAttributeProfileTemplateItem {
	if l == nil || l.UserAttributeProfileTemplates == nil {
		return nil
	}
	return l.UserAttributeProfileTemplates
}

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

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

// SetUserAttributeProfileTemplates sets the UserAttributeProfileTemplates field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (l *ListUserAttributeProfileTemplateResponseContent) SetUserAttributeProfileTemplates(userAttributeProfileTemplates []*UserAttributeProfileTemplateItem) {
	l.UserAttributeProfileTemplates = userAttributeProfileTemplates
	l.require(listUserAttributeProfileTemplateResponseContentFieldUserAttributeProfileTemplates)
}

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

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

func (l *ListUserAttributeProfileTemplateResponseContent) 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 (
	listUserAttributeProfilesPaginatedResponseContentFieldNext                  = big.NewInt(1 << 0)
	listUserAttributeProfilesPaginatedResponseContentFieldUserAttributeProfiles = big.NewInt(1 << 1)
)

type ListUserAttributeProfilesPaginatedResponseContent struct {
	// A cursor to be used as the "from" query parameter for the next page of results.
	Next                  *string                 `json:"next,omitempty" url:"next,omitempty"`
	UserAttributeProfiles []*UserAttributeProfile `json:"user_attribute_profiles,omitempty" url:"user_attribute_profiles,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 *ListUserAttributeProfilesPaginatedResponseContent) GetNext() string {
	if l == nil || l.Next == nil {
		return ""
	}
	return *l.Next
}

func (l *ListUserAttributeProfilesPaginatedResponseContent) GetUserAttributeProfiles() []*UserAttributeProfile {
	if l == nil || l.UserAttributeProfiles == nil {
		return nil
	}
	return l.UserAttributeProfiles
}

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

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

// SetNext sets the Next field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (l *ListUserAttributeProfilesPaginatedResponseContent) SetNext(next *string) {
	l.Next = next
	l.require(listUserAttributeProfilesPaginatedResponseContentFieldNext)
}

// SetUserAttributeProfiles sets the UserAttributeProfiles field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (l *ListUserAttributeProfilesPaginatedResponseContent) SetUserAttributeProfiles(userAttributeProfiles []*UserAttributeProfile) {
	l.UserAttributeProfiles = userAttributeProfiles
	l.require(listUserAttributeProfilesPaginatedResponseContentFieldUserAttributeProfiles)
}

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

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

func (l *ListUserAttributeProfilesPaginatedResponseContent) 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 (
	updateUserAttributeProfileResponseContentFieldID             = big.NewInt(1 << 0)
	updateUserAttributeProfileResponseContentFieldName           = big.NewInt(1 << 1)
	updateUserAttributeProfileResponseContentFieldUserID         = big.NewInt(1 << 2)
	updateUserAttributeProfileResponseContentFieldUserAttributes = big.NewInt(1 << 3)
)

type UpdateUserAttributeProfileResponseContent struct {
	ID             *UserAttributeProfileID             `json:"id,omitempty" url:"id,omitempty"`
	Name           *UserAttributeProfileName           `json:"name,omitempty" url:"name,omitempty"`
	UserID         *UserAttributeProfileUserID         `json:"user_id,omitempty" url:"user_id,omitempty"`
	UserAttributes *UserAttributeProfileUserAttributes `json:"user_attributes,omitempty" url:"user_attributes,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 *UpdateUserAttributeProfileResponseContent) GetID() UserAttributeProfileID {
	if u == nil || u.ID == nil {
		return ""
	}
	return *u.ID
}

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

func (u *UpdateUserAttributeProfileResponseContent) GetUserID() UserAttributeProfileUserID {
	if u == nil || u.UserID == nil {
		return UserAttributeProfileUserID{}
	}
	return *u.UserID
}

func (u *UpdateUserAttributeProfileResponseContent) GetUserAttributes() UserAttributeProfileUserAttributes {
	if u == nil || u.UserAttributes == nil {
		return nil
	}
	return *u.UserAttributes
}

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

func (u *UpdateUserAttributeProfileResponseContent) 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 *UpdateUserAttributeProfileResponseContent) SetID(id *UserAttributeProfileID) {
	u.ID = id
	u.require(updateUserAttributeProfileResponseContentFieldID)
}

// 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 *UpdateUserAttributeProfileResponseContent) SetName(name *UserAttributeProfileName) {
	u.Name = name
	u.require(updateUserAttributeProfileResponseContentFieldName)
}

// 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 (u *UpdateUserAttributeProfileResponseContent) SetUserID(userID *UserAttributeProfileUserID) {
	u.UserID = userID
	u.require(updateUserAttributeProfileResponseContentFieldUserID)
}

// SetUserAttributes sets the UserAttributes field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserAttributeProfileResponseContent) SetUserAttributes(userAttributes *UserAttributeProfileUserAttributes) {
	u.UserAttributes = userAttributes
	u.require(updateUserAttributeProfileResponseContentFieldUserAttributes)
}

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

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

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

var (
	userAttributeProfileFieldID             = big.NewInt(1 << 0)
	userAttributeProfileFieldName           = big.NewInt(1 << 1)
	userAttributeProfileFieldUserID         = big.NewInt(1 << 2)
	userAttributeProfileFieldUserAttributes = big.NewInt(1 << 3)
)

type UserAttributeProfile struct {
	ID             *UserAttributeProfileID             `json:"id,omitempty" url:"id,omitempty"`
	Name           *UserAttributeProfileName           `json:"name,omitempty" url:"name,omitempty"`
	UserID         *UserAttributeProfileUserID         `json:"user_id,omitempty" url:"user_id,omitempty"`
	UserAttributes *UserAttributeProfileUserAttributes `json:"user_attributes,omitempty" url:"user_attributes,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 *UserAttributeProfile) GetID() UserAttributeProfileID {
	if u == nil || u.ID == nil {
		return ""
	}
	return *u.ID
}

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

func (u *UserAttributeProfile) GetUserID() UserAttributeProfileUserID {
	if u == nil || u.UserID == nil {
		return UserAttributeProfileUserID{}
	}
	return *u.UserID
}

func (u *UserAttributeProfile) GetUserAttributes() UserAttributeProfileUserAttributes {
	if u == nil || u.UserAttributes == nil {
		return nil
	}
	return *u.UserAttributes
}

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

func (u *UserAttributeProfile) 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 *UserAttributeProfile) SetID(id *UserAttributeProfileID) {
	u.ID = id
	u.require(userAttributeProfileFieldID)
}

// 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 *UserAttributeProfile) SetName(name *UserAttributeProfileName) {
	u.Name = name
	u.require(userAttributeProfileFieldName)
}

// 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 (u *UserAttributeProfile) SetUserID(userID *UserAttributeProfileUserID) {
	u.UserID = userID
	u.require(userAttributeProfileFieldUserID)
}

// SetUserAttributes sets the UserAttributes field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfile) SetUserAttributes(userAttributes *UserAttributeProfileUserAttributes) {
	u.UserAttributes = userAttributes
	u.require(userAttributeProfileFieldUserAttributes)
}

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

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

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

// User Attribute Profile identifier.
type UserAttributeProfileID = string

// The name of the user attribute profile.
type UserAttributeProfileName = string

// OIDC mapping for this attribute
var (
	userAttributeProfileOidcMappingFieldMapping     = big.NewInt(1 << 0)
	userAttributeProfileOidcMappingFieldDisplayName = big.NewInt(1 << 1)
)

type UserAttributeProfileOidcMapping struct {
	// OIDC mapping field
	Mapping string `json:"mapping" url:"mapping"`
	// Display name for the OIDC mapping
	DisplayName *string `json:"display_name,omitempty" url:"display_name,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 *UserAttributeProfileOidcMapping) GetMapping() string {
	if u == nil {
		return ""
	}
	return u.Mapping
}

func (u *UserAttributeProfileOidcMapping) GetDisplayName() string {
	if u == nil || u.DisplayName == nil {
		return ""
	}
	return *u.DisplayName
}

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

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

// SetMapping sets the Mapping field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileOidcMapping) SetMapping(mapping string) {
	u.Mapping = mapping
	u.require(userAttributeProfileOidcMappingFieldMapping)
}

// SetDisplayName sets the DisplayName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileOidcMapping) SetDisplayName(displayName *string) {
	u.DisplayName = displayName
	u.require(userAttributeProfileOidcMappingFieldDisplayName)
}

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

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

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

type UserAttributeProfilePatchUserID = *UserAttributeProfileUserID

// SAML mapping override for this strategy
type UserAttributeProfileSAMLMapping = []string

// Strategy-specific overrides for this attribute
var (
	userAttributeProfileStrategyOverridesFieldPingfederate = big.NewInt(1 << 0)
	userAttributeProfileStrategyOverridesFieldAd           = big.NewInt(1 << 1)
	userAttributeProfileStrategyOverridesFieldAdfs         = big.NewInt(1 << 2)
	userAttributeProfileStrategyOverridesFieldWaad         = big.NewInt(1 << 3)
	userAttributeProfileStrategyOverridesFieldGoogleApps   = big.NewInt(1 << 4)
	userAttributeProfileStrategyOverridesFieldOkta         = big.NewInt(1 << 5)
	userAttributeProfileStrategyOverridesFieldOidc         = big.NewInt(1 << 6)
	userAttributeProfileStrategyOverridesFieldSamlp        = big.NewInt(1 << 7)
)

type UserAttributeProfileStrategyOverrides struct {
	Pingfederate *UserAttributeProfileStrategyOverridesMapping `json:"pingfederate,omitempty" url:"pingfederate,omitempty"`
	Ad           *UserAttributeProfileStrategyOverridesMapping `json:"ad,omitempty" url:"ad,omitempty"`
	Adfs         *UserAttributeProfileStrategyOverridesMapping `json:"adfs,omitempty" url:"adfs,omitempty"`
	Waad         *UserAttributeProfileStrategyOverridesMapping `json:"waad,omitempty" url:"waad,omitempty"`
	GoogleApps   *UserAttributeProfileStrategyOverridesMapping `json:"google-apps,omitempty" url:"google-apps,omitempty"`
	Okta         *UserAttributeProfileStrategyOverridesMapping `json:"okta,omitempty" url:"okta,omitempty"`
	Oidc         *UserAttributeProfileStrategyOverridesMapping `json:"oidc,omitempty" url:"oidc,omitempty"`
	Samlp        *UserAttributeProfileStrategyOverridesMapping `json:"samlp,omitempty" url:"samlp,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 *UserAttributeProfileStrategyOverrides) GetPingfederate() UserAttributeProfileStrategyOverridesMapping {
	if u == nil || u.Pingfederate == nil {
		return UserAttributeProfileStrategyOverridesMapping{}
	}
	return *u.Pingfederate
}

func (u *UserAttributeProfileStrategyOverrides) GetAd() UserAttributeProfileStrategyOverridesMapping {
	if u == nil || u.Ad == nil {
		return UserAttributeProfileStrategyOverridesMapping{}
	}
	return *u.Ad
}

func (u *UserAttributeProfileStrategyOverrides) GetAdfs() UserAttributeProfileStrategyOverridesMapping {
	if u == nil || u.Adfs == nil {
		return UserAttributeProfileStrategyOverridesMapping{}
	}
	return *u.Adfs
}

func (u *UserAttributeProfileStrategyOverrides) GetWaad() UserAttributeProfileStrategyOverridesMapping {
	if u == nil || u.Waad == nil {
		return UserAttributeProfileStrategyOverridesMapping{}
	}
	return *u.Waad
}

func (u *UserAttributeProfileStrategyOverrides) GetGoogleApps() UserAttributeProfileStrategyOverridesMapping {
	if u == nil || u.GoogleApps == nil {
		return UserAttributeProfileStrategyOverridesMapping{}
	}
	return *u.GoogleApps
}

func (u *UserAttributeProfileStrategyOverrides) GetOkta() UserAttributeProfileStrategyOverridesMapping {
	if u == nil || u.Okta == nil {
		return UserAttributeProfileStrategyOverridesMapping{}
	}
	return *u.Okta
}

func (u *UserAttributeProfileStrategyOverrides) GetOidc() UserAttributeProfileStrategyOverridesMapping {
	if u == nil || u.Oidc == nil {
		return UserAttributeProfileStrategyOverridesMapping{}
	}
	return *u.Oidc
}

func (u *UserAttributeProfileStrategyOverrides) GetSamlp() UserAttributeProfileStrategyOverridesMapping {
	if u == nil || u.Samlp == nil {
		return UserAttributeProfileStrategyOverridesMapping{}
	}
	return *u.Samlp
}

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

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

// SetPingfederate sets the Pingfederate field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverrides) SetPingfederate(pingfederate *UserAttributeProfileStrategyOverridesMapping) {
	u.Pingfederate = pingfederate
	u.require(userAttributeProfileStrategyOverridesFieldPingfederate)
}

// SetAd sets the Ad field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverrides) SetAd(ad *UserAttributeProfileStrategyOverridesMapping) {
	u.Ad = ad
	u.require(userAttributeProfileStrategyOverridesFieldAd)
}

// SetAdfs sets the Adfs field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverrides) SetAdfs(adfs *UserAttributeProfileStrategyOverridesMapping) {
	u.Adfs = adfs
	u.require(userAttributeProfileStrategyOverridesFieldAdfs)
}

// SetWaad sets the Waad field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverrides) SetWaad(waad *UserAttributeProfileStrategyOverridesMapping) {
	u.Waad = waad
	u.require(userAttributeProfileStrategyOverridesFieldWaad)
}

// SetGoogleApps sets the GoogleApps field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverrides) SetGoogleApps(googleApps *UserAttributeProfileStrategyOverridesMapping) {
	u.GoogleApps = googleApps
	u.require(userAttributeProfileStrategyOverridesFieldGoogleApps)
}

// SetOkta sets the Okta field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverrides) SetOkta(okta *UserAttributeProfileStrategyOverridesMapping) {
	u.Okta = okta
	u.require(userAttributeProfileStrategyOverridesFieldOkta)
}

// SetOidc sets the Oidc field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverrides) SetOidc(oidc *UserAttributeProfileStrategyOverridesMapping) {
	u.Oidc = oidc
	u.require(userAttributeProfileStrategyOverridesFieldOidc)
}

// SetSamlp sets the Samlp field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverrides) SetSamlp(samlp *UserAttributeProfileStrategyOverridesMapping) {
	u.Samlp = samlp
	u.require(userAttributeProfileStrategyOverridesFieldSamlp)
}

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

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

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

var (
	userAttributeProfileStrategyOverridesMappingFieldOidcMapping = big.NewInt(1 << 0)
	userAttributeProfileStrategyOverridesMappingFieldSAMLMapping = big.NewInt(1 << 1)
	userAttributeProfileStrategyOverridesMappingFieldSCIMMapping = big.NewInt(1 << 2)
)

type UserAttributeProfileStrategyOverridesMapping struct {
	OidcMapping *UserAttributeProfileOidcMapping `json:"oidc_mapping,omitempty" url:"oidc_mapping,omitempty"`
	SAMLMapping *UserAttributeProfileSAMLMapping `json:"saml_mapping,omitempty" url:"saml_mapping,omitempty"`
	// SCIM mapping override for this strategy
	SCIMMapping *string `json:"scim_mapping,omitempty" url:"scim_mapping,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 *UserAttributeProfileStrategyOverridesMapping) GetOidcMapping() UserAttributeProfileOidcMapping {
	if u == nil || u.OidcMapping == nil {
		return UserAttributeProfileOidcMapping{}
	}
	return *u.OidcMapping
}

func (u *UserAttributeProfileStrategyOverridesMapping) GetSAMLMapping() UserAttributeProfileSAMLMapping {
	if u == nil || u.SAMLMapping == nil {
		return nil
	}
	return *u.SAMLMapping
}

func (u *UserAttributeProfileStrategyOverridesMapping) GetSCIMMapping() string {
	if u == nil || u.SCIMMapping == nil {
		return ""
	}
	return *u.SCIMMapping
}

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

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

// SetOidcMapping sets the OidcMapping field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverridesMapping) SetOidcMapping(oidcMapping *UserAttributeProfileOidcMapping) {
	u.OidcMapping = oidcMapping
	u.require(userAttributeProfileStrategyOverridesMappingFieldOidcMapping)
}

// SetSAMLMapping sets the SAMLMapping field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverridesMapping) SetSAMLMapping(samlMapping *UserAttributeProfileSAMLMapping) {
	u.SAMLMapping = samlMapping
	u.require(userAttributeProfileStrategyOverridesMappingFieldSAMLMapping)
}

// SetSCIMMapping sets the SCIMMapping field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverridesMapping) SetSCIMMapping(scimMapping *string) {
	u.SCIMMapping = scimMapping
	u.require(userAttributeProfileStrategyOverridesMappingFieldSCIMMapping)
}

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

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

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

// Strategy-specific overrides for user ID
var (
	userAttributeProfileStrategyOverridesUserIDFieldPingfederate = big.NewInt(1 << 0)
	userAttributeProfileStrategyOverridesUserIDFieldAd           = big.NewInt(1 << 1)
	userAttributeProfileStrategyOverridesUserIDFieldAdfs         = big.NewInt(1 << 2)
	userAttributeProfileStrategyOverridesUserIDFieldWaad         = big.NewInt(1 << 3)
	userAttributeProfileStrategyOverridesUserIDFieldGoogleApps   = big.NewInt(1 << 4)
	userAttributeProfileStrategyOverridesUserIDFieldOkta         = big.NewInt(1 << 5)
	userAttributeProfileStrategyOverridesUserIDFieldOidc         = big.NewInt(1 << 6)
	userAttributeProfileStrategyOverridesUserIDFieldSamlp        = big.NewInt(1 << 7)
)

type UserAttributeProfileStrategyOverridesUserID struct {
	Pingfederate *UserAttributeProfileStrategyOverridesUserIDMapping `json:"pingfederate,omitempty" url:"pingfederate,omitempty"`
	Ad           *UserAttributeProfileStrategyOverridesUserIDMapping `json:"ad,omitempty" url:"ad,omitempty"`
	Adfs         *UserAttributeProfileStrategyOverridesUserIDMapping `json:"adfs,omitempty" url:"adfs,omitempty"`
	Waad         *UserAttributeProfileStrategyOverridesUserIDMapping `json:"waad,omitempty" url:"waad,omitempty"`
	GoogleApps   *UserAttributeProfileStrategyOverridesUserIDMapping `json:"google-apps,omitempty" url:"google-apps,omitempty"`
	Okta         *UserAttributeProfileStrategyOverridesUserIDMapping `json:"okta,omitempty" url:"okta,omitempty"`
	Oidc         *UserAttributeProfileStrategyOverridesUserIDMapping `json:"oidc,omitempty" url:"oidc,omitempty"`
	Samlp        *UserAttributeProfileStrategyOverridesUserIDMapping `json:"samlp,omitempty" url:"samlp,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 *UserAttributeProfileStrategyOverridesUserID) GetPingfederate() UserAttributeProfileStrategyOverridesUserIDMapping {
	if u == nil || u.Pingfederate == nil {
		return UserAttributeProfileStrategyOverridesUserIDMapping{}
	}
	return *u.Pingfederate
}

func (u *UserAttributeProfileStrategyOverridesUserID) GetAd() UserAttributeProfileStrategyOverridesUserIDMapping {
	if u == nil || u.Ad == nil {
		return UserAttributeProfileStrategyOverridesUserIDMapping{}
	}
	return *u.Ad
}

func (u *UserAttributeProfileStrategyOverridesUserID) GetAdfs() UserAttributeProfileStrategyOverridesUserIDMapping {
	if u == nil || u.Adfs == nil {
		return UserAttributeProfileStrategyOverridesUserIDMapping{}
	}
	return *u.Adfs
}

func (u *UserAttributeProfileStrategyOverridesUserID) GetWaad() UserAttributeProfileStrategyOverridesUserIDMapping {
	if u == nil || u.Waad == nil {
		return UserAttributeProfileStrategyOverridesUserIDMapping{}
	}
	return *u.Waad
}

func (u *UserAttributeProfileStrategyOverridesUserID) GetGoogleApps() UserAttributeProfileStrategyOverridesUserIDMapping {
	if u == nil || u.GoogleApps == nil {
		return UserAttributeProfileStrategyOverridesUserIDMapping{}
	}
	return *u.GoogleApps
}

func (u *UserAttributeProfileStrategyOverridesUserID) GetOkta() UserAttributeProfileStrategyOverridesUserIDMapping {
	if u == nil || u.Okta == nil {
		return UserAttributeProfileStrategyOverridesUserIDMapping{}
	}
	return *u.Okta
}

func (u *UserAttributeProfileStrategyOverridesUserID) GetOidc() UserAttributeProfileStrategyOverridesUserIDMapping {
	if u == nil || u.Oidc == nil {
		return UserAttributeProfileStrategyOverridesUserIDMapping{}
	}
	return *u.Oidc
}

func (u *UserAttributeProfileStrategyOverridesUserID) GetSamlp() UserAttributeProfileStrategyOverridesUserIDMapping {
	if u == nil || u.Samlp == nil {
		return UserAttributeProfileStrategyOverridesUserIDMapping{}
	}
	return *u.Samlp
}

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

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

// SetPingfederate sets the Pingfederate field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverridesUserID) SetPingfederate(pingfederate *UserAttributeProfileStrategyOverridesUserIDMapping) {
	u.Pingfederate = pingfederate
	u.require(userAttributeProfileStrategyOverridesUserIDFieldPingfederate)
}

// SetAd sets the Ad field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverridesUserID) SetAd(ad *UserAttributeProfileStrategyOverridesUserIDMapping) {
	u.Ad = ad
	u.require(userAttributeProfileStrategyOverridesUserIDFieldAd)
}

// SetAdfs sets the Adfs field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverridesUserID) SetAdfs(adfs *UserAttributeProfileStrategyOverridesUserIDMapping) {
	u.Adfs = adfs
	u.require(userAttributeProfileStrategyOverridesUserIDFieldAdfs)
}

// SetWaad sets the Waad field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverridesUserID) SetWaad(waad *UserAttributeProfileStrategyOverridesUserIDMapping) {
	u.Waad = waad
	u.require(userAttributeProfileStrategyOverridesUserIDFieldWaad)
}

// SetGoogleApps sets the GoogleApps field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverridesUserID) SetGoogleApps(googleApps *UserAttributeProfileStrategyOverridesUserIDMapping) {
	u.GoogleApps = googleApps
	u.require(userAttributeProfileStrategyOverridesUserIDFieldGoogleApps)
}

// SetOkta sets the Okta field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverridesUserID) SetOkta(okta *UserAttributeProfileStrategyOverridesUserIDMapping) {
	u.Okta = okta
	u.require(userAttributeProfileStrategyOverridesUserIDFieldOkta)
}

// SetOidc sets the Oidc field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverridesUserID) SetOidc(oidc *UserAttributeProfileStrategyOverridesUserIDMapping) {
	u.Oidc = oidc
	u.require(userAttributeProfileStrategyOverridesUserIDFieldOidc)
}

// SetSamlp sets the Samlp field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverridesUserID) SetSamlp(samlp *UserAttributeProfileStrategyOverridesUserIDMapping) {
	u.Samlp = samlp
	u.require(userAttributeProfileStrategyOverridesUserIDFieldSamlp)
}

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

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

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

var (
	userAttributeProfileStrategyOverridesUserIDMappingFieldOidcMapping = big.NewInt(1 << 0)
	userAttributeProfileStrategyOverridesUserIDMappingFieldSAMLMapping = big.NewInt(1 << 1)
	userAttributeProfileStrategyOverridesUserIDMappingFieldSCIMMapping = big.NewInt(1 << 2)
)

type UserAttributeProfileStrategyOverridesUserIDMapping struct {
	OidcMapping *UserAttributeProfileUserIDOidcStrategyOverrideMapping `json:"oidc_mapping,omitempty" url:"oidc_mapping,omitempty"`
	SAMLMapping *UserAttributeProfileSAMLMapping                       `json:"saml_mapping,omitempty" url:"saml_mapping,omitempty"`
	// SCIM mapping override for this strategy
	SCIMMapping *string `json:"scim_mapping,omitempty" url:"scim_mapping,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 *UserAttributeProfileStrategyOverridesUserIDMapping) GetOidcMapping() UserAttributeProfileUserIDOidcStrategyOverrideMapping {
	if u == nil || u.OidcMapping == nil {
		return ""
	}
	return *u.OidcMapping
}

func (u *UserAttributeProfileStrategyOverridesUserIDMapping) GetSAMLMapping() UserAttributeProfileSAMLMapping {
	if u == nil || u.SAMLMapping == nil {
		return nil
	}
	return *u.SAMLMapping
}

func (u *UserAttributeProfileStrategyOverridesUserIDMapping) GetSCIMMapping() string {
	if u == nil || u.SCIMMapping == nil {
		return ""
	}
	return *u.SCIMMapping
}

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

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

// SetOidcMapping sets the OidcMapping field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverridesUserIDMapping) SetOidcMapping(oidcMapping *UserAttributeProfileUserIDOidcStrategyOverrideMapping) {
	u.OidcMapping = oidcMapping
	u.require(userAttributeProfileStrategyOverridesUserIDMappingFieldOidcMapping)
}

// SetSAMLMapping sets the SAMLMapping field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverridesUserIDMapping) SetSAMLMapping(samlMapping *UserAttributeProfileSAMLMapping) {
	u.SAMLMapping = samlMapping
	u.require(userAttributeProfileStrategyOverridesUserIDMappingFieldSAMLMapping)
}

// SetSCIMMapping sets the SCIMMapping field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileStrategyOverridesUserIDMapping) SetSCIMMapping(scimMapping *string) {
	u.SCIMMapping = scimMapping
	u.require(userAttributeProfileStrategyOverridesUserIDMappingFieldSCIMMapping)
}

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

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

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

// The structure of the template, which can be used as the payload for creating or updating a User Attribute Profile.
var (
	userAttributeProfileTemplateFieldName           = big.NewInt(1 << 0)
	userAttributeProfileTemplateFieldUserID         = big.NewInt(1 << 1)
	userAttributeProfileTemplateFieldUserAttributes = big.NewInt(1 << 2)
)

type UserAttributeProfileTemplate struct {
	Name           *UserAttributeProfileName           `json:"name,omitempty" url:"name,omitempty"`
	UserID         *UserAttributeProfileUserID         `json:"user_id,omitempty" url:"user_id,omitempty"`
	UserAttributes *UserAttributeProfileUserAttributes `json:"user_attributes,omitempty" url:"user_attributes,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 *UserAttributeProfileTemplate) GetName() UserAttributeProfileName {
	if u == nil || u.Name == nil {
		return ""
	}
	return *u.Name
}

func (u *UserAttributeProfileTemplate) GetUserID() UserAttributeProfileUserID {
	if u == nil || u.UserID == nil {
		return UserAttributeProfileUserID{}
	}
	return *u.UserID
}

func (u *UserAttributeProfileTemplate) GetUserAttributes() UserAttributeProfileUserAttributes {
	if u == nil || u.UserAttributes == nil {
		return nil
	}
	return *u.UserAttributes
}

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

func (u *UserAttributeProfileTemplate) require(field *big.Int) {
	if u.explicitFields == nil {
		u.explicitFields = big.NewInt(0)
	}
	u.explicitFields.Or(u.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 (u *UserAttributeProfileTemplate) SetName(name *UserAttributeProfileName) {
	u.Name = name
	u.require(userAttributeProfileTemplateFieldName)
}

// 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 (u *UserAttributeProfileTemplate) SetUserID(userID *UserAttributeProfileUserID) {
	u.UserID = userID
	u.require(userAttributeProfileTemplateFieldUserID)
}

// SetUserAttributes sets the UserAttributes field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileTemplate) SetUserAttributes(userAttributes *UserAttributeProfileUserAttributes) {
	u.UserAttributes = userAttributes
	u.require(userAttributeProfileTemplateFieldUserAttributes)
}

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

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

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

var (
	userAttributeProfileTemplateItemFieldID          = big.NewInt(1 << 0)
	userAttributeProfileTemplateItemFieldDisplayName = big.NewInt(1 << 1)
	userAttributeProfileTemplateItemFieldTemplate    = big.NewInt(1 << 2)
)

type UserAttributeProfileTemplateItem struct {
	// The id of the template.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The user-friendly name of the template displayed in the UI.
	DisplayName *string                       `json:"display_name,omitempty" url:"display_name,omitempty"`
	Template    *UserAttributeProfileTemplate `json:"template,omitempty" url:"template,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 *UserAttributeProfileTemplateItem) GetID() string {
	if u == nil || u.ID == nil {
		return ""
	}
	return *u.ID
}

func (u *UserAttributeProfileTemplateItem) GetDisplayName() string {
	if u == nil || u.DisplayName == nil {
		return ""
	}
	return *u.DisplayName
}

func (u *UserAttributeProfileTemplateItem) GetTemplate() UserAttributeProfileTemplate {
	if u == nil || u.Template == nil {
		return UserAttributeProfileTemplate{}
	}
	return *u.Template
}

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

func (u *UserAttributeProfileTemplateItem) 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 *UserAttributeProfileTemplateItem) SetID(id *string) {
	u.ID = id
	u.require(userAttributeProfileTemplateItemFieldID)
}

// SetDisplayName sets the DisplayName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileTemplateItem) SetDisplayName(displayName *string) {
	u.DisplayName = displayName
	u.require(userAttributeProfileTemplateItemFieldDisplayName)
}

// SetTemplate sets the Template field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileTemplateItem) SetTemplate(template *UserAttributeProfileTemplate) {
	u.Template = template
	u.require(userAttributeProfileTemplateItemFieldTemplate)
}

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

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

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

var (
	userAttributeProfileUserAttributeAdditionalPropertiesFieldDescription       = big.NewInt(1 << 0)
	userAttributeProfileUserAttributeAdditionalPropertiesFieldLabel             = big.NewInt(1 << 1)
	userAttributeProfileUserAttributeAdditionalPropertiesFieldProfileRequired   = big.NewInt(1 << 2)
	userAttributeProfileUserAttributeAdditionalPropertiesFieldAuth0Mapping      = big.NewInt(1 << 3)
	userAttributeProfileUserAttributeAdditionalPropertiesFieldOidcMapping       = big.NewInt(1 << 4)
	userAttributeProfileUserAttributeAdditionalPropertiesFieldSAMLMapping       = big.NewInt(1 << 5)
	userAttributeProfileUserAttributeAdditionalPropertiesFieldSCIMMapping       = big.NewInt(1 << 6)
	userAttributeProfileUserAttributeAdditionalPropertiesFieldStrategyOverrides = big.NewInt(1 << 7)
)

type UserAttributeProfileUserAttributeAdditionalProperties struct {
	// Description of this attribute
	Description string `json:"description" url:"description"`
	// Display label for this attribute
	Label string `json:"label" url:"label"`
	// Whether this attribute is required in the profile
	ProfileRequired bool `json:"profile_required" url:"profile_required"`
	// Auth0 mapping for this attribute
	Auth0Mapping string                           `json:"auth0_mapping" url:"auth0_mapping"`
	OidcMapping  *UserAttributeProfileOidcMapping `json:"oidc_mapping,omitempty" url:"oidc_mapping,omitempty"`
	SAMLMapping  *UserAttributeProfileSAMLMapping `json:"saml_mapping,omitempty" url:"saml_mapping,omitempty"`
	// SCIM mapping for this attribute
	SCIMMapping       *string                                `json:"scim_mapping,omitempty" url:"scim_mapping,omitempty"`
	StrategyOverrides *UserAttributeProfileStrategyOverrides `json:"strategy_overrides,omitempty" url:"strategy_overrides,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 *UserAttributeProfileUserAttributeAdditionalProperties) GetDescription() string {
	if u == nil {
		return ""
	}
	return u.Description
}

func (u *UserAttributeProfileUserAttributeAdditionalProperties) GetLabel() string {
	if u == nil {
		return ""
	}
	return u.Label
}

func (u *UserAttributeProfileUserAttributeAdditionalProperties) GetProfileRequired() bool {
	if u == nil {
		return false
	}
	return u.ProfileRequired
}

func (u *UserAttributeProfileUserAttributeAdditionalProperties) GetAuth0Mapping() string {
	if u == nil {
		return ""
	}
	return u.Auth0Mapping
}

func (u *UserAttributeProfileUserAttributeAdditionalProperties) GetOidcMapping() UserAttributeProfileOidcMapping {
	if u == nil || u.OidcMapping == nil {
		return UserAttributeProfileOidcMapping{}
	}
	return *u.OidcMapping
}

func (u *UserAttributeProfileUserAttributeAdditionalProperties) GetSAMLMapping() UserAttributeProfileSAMLMapping {
	if u == nil || u.SAMLMapping == nil {
		return nil
	}
	return *u.SAMLMapping
}

func (u *UserAttributeProfileUserAttributeAdditionalProperties) GetSCIMMapping() string {
	if u == nil || u.SCIMMapping == nil {
		return ""
	}
	return *u.SCIMMapping
}

func (u *UserAttributeProfileUserAttributeAdditionalProperties) GetStrategyOverrides() UserAttributeProfileStrategyOverrides {
	if u == nil || u.StrategyOverrides == nil {
		return UserAttributeProfileStrategyOverrides{}
	}
	return *u.StrategyOverrides
}

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

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

// 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 (u *UserAttributeProfileUserAttributeAdditionalProperties) SetDescription(description string) {
	u.Description = description
	u.require(userAttributeProfileUserAttributeAdditionalPropertiesFieldDescription)
}

// SetLabel sets the Label field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileUserAttributeAdditionalProperties) SetLabel(label string) {
	u.Label = label
	u.require(userAttributeProfileUserAttributeAdditionalPropertiesFieldLabel)
}

// SetProfileRequired sets the ProfileRequired field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileUserAttributeAdditionalProperties) SetProfileRequired(profileRequired bool) {
	u.ProfileRequired = profileRequired
	u.require(userAttributeProfileUserAttributeAdditionalPropertiesFieldProfileRequired)
}

// SetAuth0Mapping sets the Auth0Mapping field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileUserAttributeAdditionalProperties) SetAuth0Mapping(auth0Mapping string) {
	u.Auth0Mapping = auth0Mapping
	u.require(userAttributeProfileUserAttributeAdditionalPropertiesFieldAuth0Mapping)
}

// SetOidcMapping sets the OidcMapping field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileUserAttributeAdditionalProperties) SetOidcMapping(oidcMapping *UserAttributeProfileOidcMapping) {
	u.OidcMapping = oidcMapping
	u.require(userAttributeProfileUserAttributeAdditionalPropertiesFieldOidcMapping)
}

// SetSAMLMapping sets the SAMLMapping field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileUserAttributeAdditionalProperties) SetSAMLMapping(samlMapping *UserAttributeProfileSAMLMapping) {
	u.SAMLMapping = samlMapping
	u.require(userAttributeProfileUserAttributeAdditionalPropertiesFieldSAMLMapping)
}

// SetSCIMMapping sets the SCIMMapping field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileUserAttributeAdditionalProperties) SetSCIMMapping(scimMapping *string) {
	u.SCIMMapping = scimMapping
	u.require(userAttributeProfileUserAttributeAdditionalPropertiesFieldSCIMMapping)
}

// SetStrategyOverrides sets the StrategyOverrides field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileUserAttributeAdditionalProperties) SetStrategyOverrides(strategyOverrides *UserAttributeProfileStrategyOverrides) {
	u.StrategyOverrides = strategyOverrides
	u.require(userAttributeProfileUserAttributeAdditionalPropertiesFieldStrategyOverrides)
}

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

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

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

// User attributes configuration map. Keys are attribute names, values are the mapping configuration for each attribute.
type UserAttributeProfileUserAttributes = map[string]*UserAttributeProfileUserAttributeAdditionalProperties

// User ID mapping configuration
var (
	userAttributeProfileUserIDFieldOidcMapping       = big.NewInt(1 << 0)
	userAttributeProfileUserIDFieldSAMLMapping       = big.NewInt(1 << 1)
	userAttributeProfileUserIDFieldSCIMMapping       = big.NewInt(1 << 2)
	userAttributeProfileUserIDFieldStrategyOverrides = big.NewInt(1 << 3)
)

type UserAttributeProfileUserID struct {
	OidcMapping *UserAttributeProfileUserIDOidcMappingEnum `json:"oidc_mapping,omitempty" url:"oidc_mapping,omitempty"`
	SAMLMapping *UserAttributeProfileUserIdSamlMapping     `json:"saml_mapping,omitempty" url:"saml_mapping,omitempty"`
	// SCIM mapping for user ID
	SCIMMapping       *string                                      `json:"scim_mapping,omitempty" url:"scim_mapping,omitempty"`
	StrategyOverrides *UserAttributeProfileStrategyOverridesUserID `json:"strategy_overrides,omitempty" url:"strategy_overrides,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 *UserAttributeProfileUserID) GetSAMLMapping() UserAttributeProfileUserIdSamlMapping {
	if u == nil || u.SAMLMapping == nil {
		return nil
	}
	return *u.SAMLMapping
}

func (u *UserAttributeProfileUserID) GetSCIMMapping() string {
	if u == nil || u.SCIMMapping == nil {
		return ""
	}
	return *u.SCIMMapping
}

func (u *UserAttributeProfileUserID) GetStrategyOverrides() UserAttributeProfileStrategyOverridesUserID {
	if u == nil || u.StrategyOverrides == nil {
		return UserAttributeProfileStrategyOverridesUserID{}
	}
	return *u.StrategyOverrides
}

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

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

// SetOidcMapping sets the OidcMapping field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileUserID) SetOidcMapping(oidcMapping *UserAttributeProfileUserIDOidcMappingEnum) {
	u.OidcMapping = oidcMapping
	u.require(userAttributeProfileUserIDFieldOidcMapping)
}

// SetSAMLMapping sets the SAMLMapping field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileUserID) SetSAMLMapping(samlMapping *UserAttributeProfileUserIdSamlMapping) {
	u.SAMLMapping = samlMapping
	u.require(userAttributeProfileUserIDFieldSAMLMapping)
}

// SetSCIMMapping sets the SCIMMapping field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileUserID) SetSCIMMapping(scimMapping *string) {
	u.SCIMMapping = scimMapping
	u.require(userAttributeProfileUserIDFieldSCIMMapping)
}

// SetStrategyOverrides sets the StrategyOverrides field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserAttributeProfileUserID) SetStrategyOverrides(strategyOverrides *UserAttributeProfileStrategyOverridesUserID) {
	u.StrategyOverrides = strategyOverrides
	u.require(userAttributeProfileUserIDFieldStrategyOverrides)
}

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

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

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

// OIDC mapping for user ID
type UserAttributeProfileUserIDOidcMappingEnum = string

// OIDC mapping override for this strategy
type UserAttributeProfileUserIDOidcStrategyOverrideMapping string

const (
	UserAttributeProfileUserIDOidcStrategyOverrideMappingSub   UserAttributeProfileUserIDOidcStrategyOverrideMapping = "sub"
	UserAttributeProfileUserIDOidcStrategyOverrideMappingOid   UserAttributeProfileUserIDOidcStrategyOverrideMapping = "oid"
	UserAttributeProfileUserIDOidcStrategyOverrideMappingEmail UserAttributeProfileUserIDOidcStrategyOverrideMapping = "email"
)

func NewUserAttributeProfileUserIDOidcStrategyOverrideMappingFromString(s string) (UserAttributeProfileUserIDOidcStrategyOverrideMapping, error) {
	switch s {
	case "sub":
		return UserAttributeProfileUserIDOidcStrategyOverrideMappingSub, nil
	case "oid":
		return UserAttributeProfileUserIDOidcStrategyOverrideMappingOid, nil
	case "email":
		return UserAttributeProfileUserIDOidcStrategyOverrideMappingEmail, nil
	}
	var t UserAttributeProfileUserIDOidcStrategyOverrideMapping
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (u UserAttributeProfileUserIDOidcStrategyOverrideMapping) Ptr() *UserAttributeProfileUserIDOidcStrategyOverrideMapping {
	return &u
}

// SAML mapping for user ID
type UserAttributeProfileUserIdSamlMapping = []string
