// Code generated by Fern. DO NOT EDIT.

package management

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

var (
	createSelfServiceProfileResponseContentFieldID                     = big.NewInt(1 << 0)
	createSelfServiceProfileResponseContentFieldName                   = big.NewInt(1 << 1)
	createSelfServiceProfileResponseContentFieldDescription            = big.NewInt(1 << 2)
	createSelfServiceProfileResponseContentFieldUserAttributes         = big.NewInt(1 << 3)
	createSelfServiceProfileResponseContentFieldCreatedAt              = big.NewInt(1 << 4)
	createSelfServiceProfileResponseContentFieldUpdatedAt              = big.NewInt(1 << 5)
	createSelfServiceProfileResponseContentFieldBranding               = big.NewInt(1 << 6)
	createSelfServiceProfileResponseContentFieldAllowedStrategies      = big.NewInt(1 << 7)
	createSelfServiceProfileResponseContentFieldUserAttributeProfileID = big.NewInt(1 << 8)
)

type CreateSelfServiceProfileResponseContent struct {
	// The unique ID of the self-service Profile.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The name of the self-service Profile.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The description of the self-service Profile.
	Description *string `json:"description,omitempty" url:"description,omitempty"`
	// List of attributes to be mapped that will be shown to the user during the SS-SSO flow.
	UserAttributes []*SelfServiceProfileUserAttribute `json:"user_attributes,omitempty" url:"user_attributes,omitempty"`
	// The time when this self-service Profile was created.
	CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The time when this self-service Profile was updated.
	UpdatedAt *time.Time                            `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	Branding  *SelfServiceProfileBrandingProperties `json:"branding,omitempty" url:"branding,omitempty"`
	// List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `keycloak-samlp`, `pingfederate`]
	AllowedStrategies []SelfServiceProfileAllowedStrategyEnum `json:"allowed_strategies,omitempty" url:"allowed_strategies,omitempty"`
	// ID of the user-attribute-profile to associate with this self-service profile.
	UserAttributeProfileID *string `json:"user_attribute_profile_id,omitempty" url:"user_attribute_profile_id,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 *CreateSelfServiceProfileResponseContent) GetID() string {
	if c == nil || c.ID == nil {
		return ""
	}
	return *c.ID
}

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

func (c *CreateSelfServiceProfileResponseContent) GetDescription() string {
	if c == nil || c.Description == nil {
		return ""
	}
	return *c.Description
}

func (c *CreateSelfServiceProfileResponseContent) GetUserAttributes() []*SelfServiceProfileUserAttribute {
	if c == nil || c.UserAttributes == nil {
		return nil
	}
	return c.UserAttributes
}

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

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

func (c *CreateSelfServiceProfileResponseContent) GetBranding() SelfServiceProfileBrandingProperties {
	if c == nil || c.Branding == nil {
		return SelfServiceProfileBrandingProperties{}
	}
	return *c.Branding
}

func (c *CreateSelfServiceProfileResponseContent) GetAllowedStrategies() []SelfServiceProfileAllowedStrategyEnum {
	if c == nil || c.AllowedStrategies == nil {
		return nil
	}
	return c.AllowedStrategies
}

func (c *CreateSelfServiceProfileResponseContent) GetUserAttributeProfileID() string {
	if c == nil || c.UserAttributeProfileID == nil {
		return ""
	}
	return *c.UserAttributeProfileID
}

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

func (c *CreateSelfServiceProfileResponseContent) 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 *CreateSelfServiceProfileResponseContent) SetID(id *string) {
	c.ID = id
	c.require(createSelfServiceProfileResponseContentFieldID)
}

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

// 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 (c *CreateSelfServiceProfileResponseContent) SetDescription(description *string) {
	c.Description = description
	c.require(createSelfServiceProfileResponseContentFieldDescription)
}

// 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 *CreateSelfServiceProfileResponseContent) SetUserAttributes(userAttributes []*SelfServiceProfileUserAttribute) {
	c.UserAttributes = userAttributes
	c.require(createSelfServiceProfileResponseContentFieldUserAttributes)
}

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

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

// SetBranding sets the Branding field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateSelfServiceProfileResponseContent) SetBranding(branding *SelfServiceProfileBrandingProperties) {
	c.Branding = branding
	c.require(createSelfServiceProfileResponseContentFieldBranding)
}

// SetAllowedStrategies sets the AllowedStrategies field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateSelfServiceProfileResponseContent) SetAllowedStrategies(allowedStrategies []SelfServiceProfileAllowedStrategyEnum) {
	c.AllowedStrategies = allowedStrategies
	c.require(createSelfServiceProfileResponseContentFieldAllowedStrategies)
}

// SetUserAttributeProfileID sets the UserAttributeProfileID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateSelfServiceProfileResponseContent) SetUserAttributeProfileID(userAttributeProfileID *string) {
	c.UserAttributeProfileID = userAttributeProfileID
	c.require(createSelfServiceProfileResponseContentFieldUserAttributeProfileID)
}

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

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

func (c *CreateSelfServiceProfileResponseContent) 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 (
	getSelfServiceProfileResponseContentFieldID                     = big.NewInt(1 << 0)
	getSelfServiceProfileResponseContentFieldName                   = big.NewInt(1 << 1)
	getSelfServiceProfileResponseContentFieldDescription            = big.NewInt(1 << 2)
	getSelfServiceProfileResponseContentFieldUserAttributes         = big.NewInt(1 << 3)
	getSelfServiceProfileResponseContentFieldCreatedAt              = big.NewInt(1 << 4)
	getSelfServiceProfileResponseContentFieldUpdatedAt              = big.NewInt(1 << 5)
	getSelfServiceProfileResponseContentFieldBranding               = big.NewInt(1 << 6)
	getSelfServiceProfileResponseContentFieldAllowedStrategies      = big.NewInt(1 << 7)
	getSelfServiceProfileResponseContentFieldUserAttributeProfileID = big.NewInt(1 << 8)
)

type GetSelfServiceProfileResponseContent struct {
	// The unique ID of the self-service Profile.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The name of the self-service Profile.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The description of the self-service Profile.
	Description *string `json:"description,omitempty" url:"description,omitempty"`
	// List of attributes to be mapped that will be shown to the user during the SS-SSO flow.
	UserAttributes []*SelfServiceProfileUserAttribute `json:"user_attributes,omitempty" url:"user_attributes,omitempty"`
	// The time when this self-service Profile was created.
	CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The time when this self-service Profile was updated.
	UpdatedAt *time.Time                            `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	Branding  *SelfServiceProfileBrandingProperties `json:"branding,omitempty" url:"branding,omitempty"`
	// List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `keycloak-samlp`, `pingfederate`]
	AllowedStrategies []SelfServiceProfileAllowedStrategyEnum `json:"allowed_strategies,omitempty" url:"allowed_strategies,omitempty"`
	// ID of the user-attribute-profile to associate with this self-service profile.
	UserAttributeProfileID *string `json:"user_attribute_profile_id,omitempty" url:"user_attribute_profile_id,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 *GetSelfServiceProfileResponseContent) GetID() string {
	if g == nil || g.ID == nil {
		return ""
	}
	return *g.ID
}

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

func (g *GetSelfServiceProfileResponseContent) GetDescription() string {
	if g == nil || g.Description == nil {
		return ""
	}
	return *g.Description
}

func (g *GetSelfServiceProfileResponseContent) GetUserAttributes() []*SelfServiceProfileUserAttribute {
	if g == nil || g.UserAttributes == nil {
		return nil
	}
	return g.UserAttributes
}

func (g *GetSelfServiceProfileResponseContent) GetCreatedAt() time.Time {
	if g == nil || g.CreatedAt == nil {
		return time.Time{}
	}
	return *g.CreatedAt
}

func (g *GetSelfServiceProfileResponseContent) GetUpdatedAt() time.Time {
	if g == nil || g.UpdatedAt == nil {
		return time.Time{}
	}
	return *g.UpdatedAt
}

func (g *GetSelfServiceProfileResponseContent) GetBranding() SelfServiceProfileBrandingProperties {
	if g == nil || g.Branding == nil {
		return SelfServiceProfileBrandingProperties{}
	}
	return *g.Branding
}

func (g *GetSelfServiceProfileResponseContent) GetAllowedStrategies() []SelfServiceProfileAllowedStrategyEnum {
	if g == nil || g.AllowedStrategies == nil {
		return nil
	}
	return g.AllowedStrategies
}

func (g *GetSelfServiceProfileResponseContent) GetUserAttributeProfileID() string {
	if g == nil || g.UserAttributeProfileID == nil {
		return ""
	}
	return *g.UserAttributeProfileID
}

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

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

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

// 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 (g *GetSelfServiceProfileResponseContent) SetDescription(description *string) {
	g.Description = description
	g.require(getSelfServiceProfileResponseContentFieldDescription)
}

// 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 *GetSelfServiceProfileResponseContent) SetUserAttributes(userAttributes []*SelfServiceProfileUserAttribute) {
	g.UserAttributes = userAttributes
	g.require(getSelfServiceProfileResponseContentFieldUserAttributes)
}

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

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

// SetBranding sets the Branding field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetSelfServiceProfileResponseContent) SetBranding(branding *SelfServiceProfileBrandingProperties) {
	g.Branding = branding
	g.require(getSelfServiceProfileResponseContentFieldBranding)
}

// SetAllowedStrategies sets the AllowedStrategies field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetSelfServiceProfileResponseContent) SetAllowedStrategies(allowedStrategies []SelfServiceProfileAllowedStrategyEnum) {
	g.AllowedStrategies = allowedStrategies
	g.require(getSelfServiceProfileResponseContentFieldAllowedStrategies)
}

// SetUserAttributeProfileID sets the UserAttributeProfileID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetSelfServiceProfileResponseContent) SetUserAttributeProfileID(userAttributeProfileID *string) {
	g.UserAttributeProfileID = userAttributeProfileID
	g.require(getSelfServiceProfileResponseContentFieldUserAttributeProfileID)
}

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

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

func (g *GetSelfServiceProfileResponseContent) 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 (
	listSelfServiceProfilesPaginatedResponseContentFieldStart               = big.NewInt(1 << 0)
	listSelfServiceProfilesPaginatedResponseContentFieldLimit               = big.NewInt(1 << 1)
	listSelfServiceProfilesPaginatedResponseContentFieldTotal               = big.NewInt(1 << 2)
	listSelfServiceProfilesPaginatedResponseContentFieldSelfServiceProfiles = big.NewInt(1 << 3)
)

type ListSelfServiceProfilesPaginatedResponseContent 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"`
	SelfServiceProfiles []*SelfServiceProfile `json:"self_service_profiles,omitempty" url:"self_service_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 *ListSelfServiceProfilesPaginatedResponseContent) GetStart() float64 {
	if l == nil || l.Start == nil {
		return 0
	}
	return *l.Start
}

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

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

func (l *ListSelfServiceProfilesPaginatedResponseContent) GetSelfServiceProfiles() []*SelfServiceProfile {
	if l == nil || l.SelfServiceProfiles == nil {
		return nil
	}
	return l.SelfServiceProfiles
}

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

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

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

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

// SetSelfServiceProfiles sets the SelfServiceProfiles field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (l *ListSelfServiceProfilesPaginatedResponseContent) SetSelfServiceProfiles(selfServiceProfiles []*SelfServiceProfile) {
	l.SelfServiceProfiles = selfServiceProfiles
	l.require(listSelfServiceProfilesPaginatedResponseContentFieldSelfServiceProfiles)
}

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

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

func (l *ListSelfServiceProfilesPaginatedResponseContent) 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 (
	selfServiceProfileFieldID                     = big.NewInt(1 << 0)
	selfServiceProfileFieldName                   = big.NewInt(1 << 1)
	selfServiceProfileFieldDescription            = big.NewInt(1 << 2)
	selfServiceProfileFieldUserAttributes         = big.NewInt(1 << 3)
	selfServiceProfileFieldCreatedAt              = big.NewInt(1 << 4)
	selfServiceProfileFieldUpdatedAt              = big.NewInt(1 << 5)
	selfServiceProfileFieldBranding               = big.NewInt(1 << 6)
	selfServiceProfileFieldAllowedStrategies      = big.NewInt(1 << 7)
	selfServiceProfileFieldUserAttributeProfileID = big.NewInt(1 << 8)
)

type SelfServiceProfile struct {
	// The unique ID of the self-service Profile.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The name of the self-service Profile.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The description of the self-service Profile.
	Description *string `json:"description,omitempty" url:"description,omitempty"`
	// List of attributes to be mapped that will be shown to the user during the SS-SSO flow.
	UserAttributes []*SelfServiceProfileUserAttribute `json:"user_attributes,omitempty" url:"user_attributes,omitempty"`
	// The time when this self-service Profile was created.
	CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The time when this self-service Profile was updated.
	UpdatedAt *time.Time                            `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	Branding  *SelfServiceProfileBrandingProperties `json:"branding,omitempty" url:"branding,omitempty"`
	// List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `keycloak-samlp`, `pingfederate`]
	AllowedStrategies []SelfServiceProfileAllowedStrategyEnum `json:"allowed_strategies,omitempty" url:"allowed_strategies,omitempty"`
	// ID of the user-attribute-profile to associate with this self-service profile.
	UserAttributeProfileID *string `json:"user_attribute_profile_id,omitempty" url:"user_attribute_profile_id,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 (s *SelfServiceProfile) GetID() string {
	if s == nil || s.ID == nil {
		return ""
	}
	return *s.ID
}

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

func (s *SelfServiceProfile) GetDescription() string {
	if s == nil || s.Description == nil {
		return ""
	}
	return *s.Description
}

func (s *SelfServiceProfile) GetUserAttributes() []*SelfServiceProfileUserAttribute {
	if s == nil || s.UserAttributes == nil {
		return nil
	}
	return s.UserAttributes
}

func (s *SelfServiceProfile) GetCreatedAt() time.Time {
	if s == nil || s.CreatedAt == nil {
		return time.Time{}
	}
	return *s.CreatedAt
}

func (s *SelfServiceProfile) GetUpdatedAt() time.Time {
	if s == nil || s.UpdatedAt == nil {
		return time.Time{}
	}
	return *s.UpdatedAt
}

func (s *SelfServiceProfile) GetBranding() SelfServiceProfileBrandingProperties {
	if s == nil || s.Branding == nil {
		return SelfServiceProfileBrandingProperties{}
	}
	return *s.Branding
}

func (s *SelfServiceProfile) GetAllowedStrategies() []SelfServiceProfileAllowedStrategyEnum {
	if s == nil || s.AllowedStrategies == nil {
		return nil
	}
	return s.AllowedStrategies
}

func (s *SelfServiceProfile) GetUserAttributeProfileID() string {
	if s == nil || s.UserAttributeProfileID == nil {
		return ""
	}
	return *s.UserAttributeProfileID
}

func (s *SelfServiceProfile) GetExtraProperties() map[string]interface{} {
	return s.extraProperties
}

func (s *SelfServiceProfile) require(field *big.Int) {
	if s.explicitFields == nil {
		s.explicitFields = big.NewInt(0)
	}
	s.explicitFields.Or(s.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 (s *SelfServiceProfile) SetID(id *string) {
	s.ID = id
	s.require(selfServiceProfileFieldID)
}

// 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 (s *SelfServiceProfile) SetName(name *string) {
	s.Name = name
	s.require(selfServiceProfileFieldName)
}

// 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 (s *SelfServiceProfile) SetDescription(description *string) {
	s.Description = description
	s.require(selfServiceProfileFieldDescription)
}

// 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 (s *SelfServiceProfile) SetUserAttributes(userAttributes []*SelfServiceProfileUserAttribute) {
	s.UserAttributes = userAttributes
	s.require(selfServiceProfileFieldUserAttributes)
}

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

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

// SetBranding sets the Branding field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (s *SelfServiceProfile) SetBranding(branding *SelfServiceProfileBrandingProperties) {
	s.Branding = branding
	s.require(selfServiceProfileFieldBranding)
}

// SetAllowedStrategies sets the AllowedStrategies field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (s *SelfServiceProfile) SetAllowedStrategies(allowedStrategies []SelfServiceProfileAllowedStrategyEnum) {
	s.AllowedStrategies = allowedStrategies
	s.require(selfServiceProfileFieldAllowedStrategies)
}

// SetUserAttributeProfileID sets the UserAttributeProfileID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (s *SelfServiceProfile) SetUserAttributeProfileID(userAttributeProfileID *string) {
	s.UserAttributeProfileID = userAttributeProfileID
	s.require(selfServiceProfileFieldUserAttributeProfileID)
}

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

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

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

type SelfServiceProfileAllowedStrategyEnum string

const (
	SelfServiceProfileAllowedStrategyEnumOidc          SelfServiceProfileAllowedStrategyEnum = "oidc"
	SelfServiceProfileAllowedStrategyEnumSamlp         SelfServiceProfileAllowedStrategyEnum = "samlp"
	SelfServiceProfileAllowedStrategyEnumWaad          SelfServiceProfileAllowedStrategyEnum = "waad"
	SelfServiceProfileAllowedStrategyEnumGoogleApps    SelfServiceProfileAllowedStrategyEnum = "google-apps"
	SelfServiceProfileAllowedStrategyEnumAdfs          SelfServiceProfileAllowedStrategyEnum = "adfs"
	SelfServiceProfileAllowedStrategyEnumOkta          SelfServiceProfileAllowedStrategyEnum = "okta"
	SelfServiceProfileAllowedStrategyEnumKeycloakSamlp SelfServiceProfileAllowedStrategyEnum = "keycloak-samlp"
	SelfServiceProfileAllowedStrategyEnumPingfederate  SelfServiceProfileAllowedStrategyEnum = "pingfederate"
)

func NewSelfServiceProfileAllowedStrategyEnumFromString(s string) (SelfServiceProfileAllowedStrategyEnum, error) {
	switch s {
	case "oidc":
		return SelfServiceProfileAllowedStrategyEnumOidc, nil
	case "samlp":
		return SelfServiceProfileAllowedStrategyEnumSamlp, nil
	case "waad":
		return SelfServiceProfileAllowedStrategyEnumWaad, nil
	case "google-apps":
		return SelfServiceProfileAllowedStrategyEnumGoogleApps, nil
	case "adfs":
		return SelfServiceProfileAllowedStrategyEnumAdfs, nil
	case "okta":
		return SelfServiceProfileAllowedStrategyEnumOkta, nil
	case "keycloak-samlp":
		return SelfServiceProfileAllowedStrategyEnumKeycloakSamlp, nil
	case "pingfederate":
		return SelfServiceProfileAllowedStrategyEnumPingfederate, nil
	}
	var t SelfServiceProfileAllowedStrategyEnum
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (s SelfServiceProfileAllowedStrategyEnum) Ptr() *SelfServiceProfileAllowedStrategyEnum {
	return &s
}

type SelfServiceProfileBranding = *SelfServiceProfileBrandingProperties

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

type SelfServiceProfileBrandingColors struct {
	Primary string `json:"primary" url:"primary"`

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

	ExtraProperties map[string]interface{} `json:"-" url:"-"`

	rawJSON json.RawMessage
}

func (s *SelfServiceProfileBrandingColors) GetPrimary() string {
	if s == nil {
		return ""
	}
	return s.Primary
}

func (s *SelfServiceProfileBrandingColors) GetExtraProperties() map[string]interface{} {
	return s.ExtraProperties
}

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

// SetPrimary sets the Primary field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (s *SelfServiceProfileBrandingColors) SetPrimary(primary string) {
	s.Primary = primary
	s.require(selfServiceProfileBrandingColorsFieldPrimary)
}

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

func (s *SelfServiceProfileBrandingColors) MarshalJSON() ([]byte, error) {
	type embed SelfServiceProfileBrandingColors
	var marshaler = struct {
		embed
	}{
		embed: embed(*s),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields)
	return internal.MarshalJSONWithExtraProperties(explicitMarshaler, s.ExtraProperties)
}

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

var (
	selfServiceProfileBrandingPropertiesFieldLogoURL = big.NewInt(1 << 0)
	selfServiceProfileBrandingPropertiesFieldColors  = big.NewInt(1 << 1)
)

type SelfServiceProfileBrandingProperties struct {
	LogoURL *string                           `json:"logo_url,omitempty" url:"logo_url,omitempty"`
	Colors  *SelfServiceProfileBrandingColors `json:"colors,omitempty" url:"colors,omitempty"`

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

	ExtraProperties map[string]interface{} `json:"-" url:"-"`

	rawJSON json.RawMessage
}

func (s *SelfServiceProfileBrandingProperties) GetLogoURL() string {
	if s == nil || s.LogoURL == nil {
		return ""
	}
	return *s.LogoURL
}

func (s *SelfServiceProfileBrandingProperties) GetColors() SelfServiceProfileBrandingColors {
	if s == nil || s.Colors == nil {
		return SelfServiceProfileBrandingColors{}
	}
	return *s.Colors
}

func (s *SelfServiceProfileBrandingProperties) GetExtraProperties() map[string]interface{} {
	return s.ExtraProperties
}

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

// SetLogoURL sets the LogoURL field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (s *SelfServiceProfileBrandingProperties) SetLogoURL(logoURL *string) {
	s.LogoURL = logoURL
	s.require(selfServiceProfileBrandingPropertiesFieldLogoURL)
}

// SetColors sets the Colors field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (s *SelfServiceProfileBrandingProperties) SetColors(colors *SelfServiceProfileBrandingColors) {
	s.Colors = colors
	s.require(selfServiceProfileBrandingPropertiesFieldColors)
}

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

func (s *SelfServiceProfileBrandingProperties) MarshalJSON() ([]byte, error) {
	type embed SelfServiceProfileBrandingProperties
	var marshaler = struct {
		embed
	}{
		embed: embed(*s),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields)
	return internal.MarshalJSONWithExtraProperties(explicitMarshaler, s.ExtraProperties)
}

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

// The description of the self-service Profile.
type SelfServiceProfileDescription = *string

var (
	selfServiceProfileUserAttributeFieldName        = big.NewInt(1 << 0)
	selfServiceProfileUserAttributeFieldDescription = big.NewInt(1 << 1)
	selfServiceProfileUserAttributeFieldIsOptional  = big.NewInt(1 << 2)
)

type SelfServiceProfileUserAttribute struct {
	// Identifier of this attribute.
	Name string `json:"name" url:"name"`
	// Description of this attribute.
	Description string `json:"description" url:"description"`
	// Determines if this attribute is required
	IsOptional bool `json:"is_optional" url:"is_optional"`

	// 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 (s *SelfServiceProfileUserAttribute) GetName() string {
	if s == nil {
		return ""
	}
	return s.Name
}

func (s *SelfServiceProfileUserAttribute) GetDescription() string {
	if s == nil {
		return ""
	}
	return s.Description
}

func (s *SelfServiceProfileUserAttribute) GetIsOptional() bool {
	if s == nil {
		return false
	}
	return s.IsOptional
}

func (s *SelfServiceProfileUserAttribute) GetExtraProperties() map[string]interface{} {
	return s.extraProperties
}

func (s *SelfServiceProfileUserAttribute) require(field *big.Int) {
	if s.explicitFields == nil {
		s.explicitFields = big.NewInt(0)
	}
	s.explicitFields.Or(s.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 (s *SelfServiceProfileUserAttribute) SetName(name string) {
	s.Name = name
	s.require(selfServiceProfileUserAttributeFieldName)
}

// 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 (s *SelfServiceProfileUserAttribute) SetDescription(description string) {
	s.Description = description
	s.require(selfServiceProfileUserAttributeFieldDescription)
}

// SetIsOptional sets the IsOptional field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (s *SelfServiceProfileUserAttribute) SetIsOptional(isOptional bool) {
	s.IsOptional = isOptional
	s.require(selfServiceProfileUserAttributeFieldIsOptional)
}

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

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

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

// List of attributes to be mapped that will be shown to the user during the SS-SSO flow.
type SelfServiceProfileUserAttributes = []*SelfServiceProfileUserAttribute

var (
	updateSelfServiceProfileResponseContentFieldID                     = big.NewInt(1 << 0)
	updateSelfServiceProfileResponseContentFieldName                   = big.NewInt(1 << 1)
	updateSelfServiceProfileResponseContentFieldDescription            = big.NewInt(1 << 2)
	updateSelfServiceProfileResponseContentFieldUserAttributes         = big.NewInt(1 << 3)
	updateSelfServiceProfileResponseContentFieldCreatedAt              = big.NewInt(1 << 4)
	updateSelfServiceProfileResponseContentFieldUpdatedAt              = big.NewInt(1 << 5)
	updateSelfServiceProfileResponseContentFieldBranding               = big.NewInt(1 << 6)
	updateSelfServiceProfileResponseContentFieldAllowedStrategies      = big.NewInt(1 << 7)
	updateSelfServiceProfileResponseContentFieldUserAttributeProfileID = big.NewInt(1 << 8)
)

type UpdateSelfServiceProfileResponseContent struct {
	// The unique ID of the self-service Profile.
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// The name of the self-service Profile.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// The description of the self-service Profile.
	Description *string `json:"description,omitempty" url:"description,omitempty"`
	// List of attributes to be mapped that will be shown to the user during the SS-SSO flow.
	UserAttributes []*SelfServiceProfileUserAttribute `json:"user_attributes,omitempty" url:"user_attributes,omitempty"`
	// The time when this self-service Profile was created.
	CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"`
	// The time when this self-service Profile was updated.
	UpdatedAt *time.Time                            `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	Branding  *SelfServiceProfileBrandingProperties `json:"branding,omitempty" url:"branding,omitempty"`
	// List of IdP strategies that will be shown to users during the Self-Service SSO flow. Possible values: [`oidc`, `samlp`, `waad`, `google-apps`, `adfs`, `okta`, `keycloak-samlp`, `pingfederate`]
	AllowedStrategies []SelfServiceProfileAllowedStrategyEnum `json:"allowed_strategies,omitempty" url:"allowed_strategies,omitempty"`
	// ID of the user-attribute-profile to associate with this self-service profile.
	UserAttributeProfileID *string `json:"user_attribute_profile_id,omitempty" url:"user_attribute_profile_id,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 *UpdateSelfServiceProfileResponseContent) GetID() string {
	if u == nil || u.ID == nil {
		return ""
	}
	return *u.ID
}

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

func (u *UpdateSelfServiceProfileResponseContent) GetDescription() string {
	if u == nil || u.Description == nil {
		return ""
	}
	return *u.Description
}

func (u *UpdateSelfServiceProfileResponseContent) GetUserAttributes() []*SelfServiceProfileUserAttribute {
	if u == nil || u.UserAttributes == nil {
		return nil
	}
	return u.UserAttributes
}

func (u *UpdateSelfServiceProfileResponseContent) GetCreatedAt() time.Time {
	if u == nil || u.CreatedAt == nil {
		return time.Time{}
	}
	return *u.CreatedAt
}

func (u *UpdateSelfServiceProfileResponseContent) GetUpdatedAt() time.Time {
	if u == nil || u.UpdatedAt == nil {
		return time.Time{}
	}
	return *u.UpdatedAt
}

func (u *UpdateSelfServiceProfileResponseContent) GetBranding() SelfServiceProfileBrandingProperties {
	if u == nil || u.Branding == nil {
		return SelfServiceProfileBrandingProperties{}
	}
	return *u.Branding
}

func (u *UpdateSelfServiceProfileResponseContent) GetAllowedStrategies() []SelfServiceProfileAllowedStrategyEnum {
	if u == nil || u.AllowedStrategies == nil {
		return nil
	}
	return u.AllowedStrategies
}

func (u *UpdateSelfServiceProfileResponseContent) GetUserAttributeProfileID() string {
	if u == nil || u.UserAttributeProfileID == nil {
		return ""
	}
	return *u.UserAttributeProfileID
}

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

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

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

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

// 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 *UpdateSelfServiceProfileResponseContent) SetUserAttributes(userAttributes []*SelfServiceProfileUserAttribute) {
	u.UserAttributes = userAttributes
	u.require(updateSelfServiceProfileResponseContentFieldUserAttributes)
}

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

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

// SetBranding sets the Branding field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateSelfServiceProfileResponseContent) SetBranding(branding *SelfServiceProfileBrandingProperties) {
	u.Branding = branding
	u.require(updateSelfServiceProfileResponseContentFieldBranding)
}

// SetAllowedStrategies sets the AllowedStrategies field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateSelfServiceProfileResponseContent) SetAllowedStrategies(allowedStrategies []SelfServiceProfileAllowedStrategyEnum) {
	u.AllowedStrategies = allowedStrategies
	u.require(updateSelfServiceProfileResponseContentFieldAllowedStrategies)
}

// SetUserAttributeProfileID sets the UserAttributeProfileID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateSelfServiceProfileResponseContent) SetUserAttributeProfileID(userAttributeProfileID *string) {
	u.UserAttributeProfileID = userAttributeProfileID
	u.require(updateSelfServiceProfileResponseContentFieldUserAttributeProfileID)
}

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

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

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