// 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 (
	createUserResponseContentFieldUserID        = big.NewInt(1 << 0)
	createUserResponseContentFieldEmail         = big.NewInt(1 << 1)
	createUserResponseContentFieldEmailVerified = big.NewInt(1 << 2)
	createUserResponseContentFieldUsername      = big.NewInt(1 << 3)
	createUserResponseContentFieldPhoneNumber   = big.NewInt(1 << 4)
	createUserResponseContentFieldPhoneVerified = big.NewInt(1 << 5)
	createUserResponseContentFieldCreatedAt     = big.NewInt(1 << 6)
	createUserResponseContentFieldUpdatedAt     = big.NewInt(1 << 7)
	createUserResponseContentFieldIdentities    = big.NewInt(1 << 8)
	createUserResponseContentFieldAppMetadata   = big.NewInt(1 << 9)
	createUserResponseContentFieldUserMetadata  = big.NewInt(1 << 10)
	createUserResponseContentFieldPicture       = big.NewInt(1 << 11)
	createUserResponseContentFieldName          = big.NewInt(1 << 12)
	createUserResponseContentFieldNickname      = big.NewInt(1 << 13)
	createUserResponseContentFieldMultifactor   = big.NewInt(1 << 14)
	createUserResponseContentFieldLastIP        = big.NewInt(1 << 15)
	createUserResponseContentFieldLastLogin     = big.NewInt(1 << 16)
	createUserResponseContentFieldLoginsCount   = big.NewInt(1 << 17)
	createUserResponseContentFieldBlocked       = big.NewInt(1 << 18)
	createUserResponseContentFieldGivenName     = big.NewInt(1 << 19)
	createUserResponseContentFieldFamilyName    = big.NewInt(1 << 20)
)

type CreateUserResponseContent struct {
	// ID of the user which can be used when interacting with other APIs.
	UserID *string `json:"user_id,omitempty" url:"user_id,omitempty"`
	// Email address of this user.
	Email *string `json:"email,omitempty" url:"email,omitempty"`
	// Whether this email address is verified (true) or unverified (false).
	EmailVerified *bool `json:"email_verified,omitempty" url:"email_verified,omitempty"`
	// Username of this user.
	Username *string `json:"username,omitempty" url:"username,omitempty"`
	// Phone number for this user. Follows the <a href="https://en.wikipedia.org/wiki/E.164">E.164 recommendation</a>.
	PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"`
	// Whether this phone number has been verified (true) or not (false).
	PhoneVerified *bool           `json:"phone_verified,omitempty" url:"phone_verified,omitempty"`
	CreatedAt     *UserDateSchema `json:"created_at,omitempty" url:"created_at,omitempty"`
	UpdatedAt     *UserDateSchema `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// Array of user identity objects when accounts are linked.
	Identities   []*UserIdentitySchema  `json:"identities,omitempty" url:"identities,omitempty"`
	AppMetadata  *UserAppMetadataSchema `json:"app_metadata,omitempty" url:"app_metadata,omitempty"`
	UserMetadata *UserMetadataSchema    `json:"user_metadata,omitempty" url:"user_metadata,omitempty"`
	// URL to picture, photo, or avatar of this user.
	Picture *string `json:"picture,omitempty" url:"picture,omitempty"`
	// Name of this user.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Preferred nickname or alias of this user.
	Nickname *string `json:"nickname,omitempty" url:"nickname,omitempty"`
	// List of multi-factor authentication providers with which this user has enrolled.
	Multifactor []string `json:"multifactor,omitempty" url:"multifactor,omitempty"`
	// Last IP address from which this user logged in.
	LastIP    *string         `json:"last_ip,omitempty" url:"last_ip,omitempty"`
	LastLogin *UserDateSchema `json:"last_login,omitempty" url:"last_login,omitempty"`
	// Total number of logins this user has performed.
	LoginsCount *int `json:"logins_count,omitempty" url:"logins_count,omitempty"`
	// Whether this user was blocked by an administrator (true) or is not (false).
	Blocked *bool `json:"blocked,omitempty" url:"blocked,omitempty"`
	// Given name/first name/forename of this user.
	GivenName *string `json:"given_name,omitempty" url:"given_name,omitempty"`
	// Family name/last name/surname of this user.
	FamilyName *string `json:"family_name,omitempty" url:"family_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{} `json:"-" url:"-"`

	rawJSON json.RawMessage
}

func (c *CreateUserResponseContent) GetUserID() string {
	if c == nil || c.UserID == nil {
		return ""
	}
	return *c.UserID
}

func (c *CreateUserResponseContent) GetEmail() string {
	if c == nil || c.Email == nil {
		return ""
	}
	return *c.Email
}

func (c *CreateUserResponseContent) GetEmailVerified() bool {
	if c == nil || c.EmailVerified == nil {
		return false
	}
	return *c.EmailVerified
}

func (c *CreateUserResponseContent) GetUsername() string {
	if c == nil || c.Username == nil {
		return ""
	}
	return *c.Username
}

func (c *CreateUserResponseContent) GetPhoneNumber() string {
	if c == nil || c.PhoneNumber == nil {
		return ""
	}
	return *c.PhoneNumber
}

func (c *CreateUserResponseContent) GetPhoneVerified() bool {
	if c == nil || c.PhoneVerified == nil {
		return false
	}
	return *c.PhoneVerified
}

func (c *CreateUserResponseContent) GetCreatedAt() UserDateSchema {
	if c == nil || c.CreatedAt == nil {
		return UserDateSchema{}
	}
	return *c.CreatedAt
}

func (c *CreateUserResponseContent) GetUpdatedAt() UserDateSchema {
	if c == nil || c.UpdatedAt == nil {
		return UserDateSchema{}
	}
	return *c.UpdatedAt
}

func (c *CreateUserResponseContent) GetIdentities() []*UserIdentitySchema {
	if c == nil || c.Identities == nil {
		return nil
	}
	return c.Identities
}

func (c *CreateUserResponseContent) GetAppMetadata() UserAppMetadataSchema {
	if c == nil || c.AppMetadata == nil {
		return nil
	}
	return *c.AppMetadata
}

func (c *CreateUserResponseContent) GetUserMetadata() UserMetadataSchema {
	if c == nil || c.UserMetadata == nil {
		return nil
	}
	return *c.UserMetadata
}

func (c *CreateUserResponseContent) GetPicture() string {
	if c == nil || c.Picture == nil {
		return ""
	}
	return *c.Picture
}

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

func (c *CreateUserResponseContent) GetNickname() string {
	if c == nil || c.Nickname == nil {
		return ""
	}
	return *c.Nickname
}

func (c *CreateUserResponseContent) GetMultifactor() []string {
	if c == nil || c.Multifactor == nil {
		return nil
	}
	return c.Multifactor
}

func (c *CreateUserResponseContent) GetLastIP() string {
	if c == nil || c.LastIP == nil {
		return ""
	}
	return *c.LastIP
}

func (c *CreateUserResponseContent) GetLastLogin() UserDateSchema {
	if c == nil || c.LastLogin == nil {
		return UserDateSchema{}
	}
	return *c.LastLogin
}

func (c *CreateUserResponseContent) GetLoginsCount() int {
	if c == nil || c.LoginsCount == nil {
		return 0
	}
	return *c.LoginsCount
}

func (c *CreateUserResponseContent) GetBlocked() bool {
	if c == nil || c.Blocked == nil {
		return false
	}
	return *c.Blocked
}

func (c *CreateUserResponseContent) GetGivenName() string {
	if c == nil || c.GivenName == nil {
		return ""
	}
	return *c.GivenName
}

func (c *CreateUserResponseContent) GetFamilyName() string {
	if c == nil || c.FamilyName == nil {
		return ""
	}
	return *c.FamilyName
}

func (c *CreateUserResponseContent) GetExtraProperties() map[string]interface{} {
	return c.ExtraProperties
}

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

// 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 *CreateUserResponseContent) SetUserID(userID *string) {
	c.UserID = userID
	c.require(createUserResponseContentFieldUserID)
}

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

// SetEmailVerified sets the EmailVerified field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserResponseContent) SetEmailVerified(emailVerified *bool) {
	c.EmailVerified = emailVerified
	c.require(createUserResponseContentFieldEmailVerified)
}

// SetUsername sets the Username field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserResponseContent) SetUsername(username *string) {
	c.Username = username
	c.require(createUserResponseContentFieldUsername)
}

// SetPhoneNumber sets the PhoneNumber field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserResponseContent) SetPhoneNumber(phoneNumber *string) {
	c.PhoneNumber = phoneNumber
	c.require(createUserResponseContentFieldPhoneNumber)
}

// SetPhoneVerified sets the PhoneVerified field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserResponseContent) SetPhoneVerified(phoneVerified *bool) {
	c.PhoneVerified = phoneVerified
	c.require(createUserResponseContentFieldPhoneVerified)
}

// 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 *CreateUserResponseContent) SetCreatedAt(createdAt *UserDateSchema) {
	c.CreatedAt = createdAt
	c.require(createUserResponseContentFieldCreatedAt)
}

// 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 *CreateUserResponseContent) SetUpdatedAt(updatedAt *UserDateSchema) {
	c.UpdatedAt = updatedAt
	c.require(createUserResponseContentFieldUpdatedAt)
}

// SetIdentities sets the Identities field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserResponseContent) SetIdentities(identities []*UserIdentitySchema) {
	c.Identities = identities
	c.require(createUserResponseContentFieldIdentities)
}

// SetAppMetadata sets the AppMetadata field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserResponseContent) SetAppMetadata(appMetadata *UserAppMetadataSchema) {
	c.AppMetadata = appMetadata
	c.require(createUserResponseContentFieldAppMetadata)
}

// SetUserMetadata sets the UserMetadata field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserResponseContent) SetUserMetadata(userMetadata *UserMetadataSchema) {
	c.UserMetadata = userMetadata
	c.require(createUserResponseContentFieldUserMetadata)
}

// SetPicture sets the Picture field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserResponseContent) SetPicture(picture *string) {
	c.Picture = picture
	c.require(createUserResponseContentFieldPicture)
}

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

// SetNickname sets the Nickname field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserResponseContent) SetNickname(nickname *string) {
	c.Nickname = nickname
	c.require(createUserResponseContentFieldNickname)
}

// SetMultifactor sets the Multifactor field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserResponseContent) SetMultifactor(multifactor []string) {
	c.Multifactor = multifactor
	c.require(createUserResponseContentFieldMultifactor)
}

// SetLastIP sets the LastIP field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserResponseContent) SetLastIP(lastIP *string) {
	c.LastIP = lastIP
	c.require(createUserResponseContentFieldLastIP)
}

// SetLastLogin sets the LastLogin field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserResponseContent) SetLastLogin(lastLogin *UserDateSchema) {
	c.LastLogin = lastLogin
	c.require(createUserResponseContentFieldLastLogin)
}

// SetLoginsCount sets the LoginsCount field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserResponseContent) SetLoginsCount(loginsCount *int) {
	c.LoginsCount = loginsCount
	c.require(createUserResponseContentFieldLoginsCount)
}

// SetBlocked sets the Blocked field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserResponseContent) SetBlocked(blocked *bool) {
	c.Blocked = blocked
	c.require(createUserResponseContentFieldBlocked)
}

// SetGivenName sets the GivenName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserResponseContent) SetGivenName(givenName *string) {
	c.GivenName = givenName
	c.require(createUserResponseContentFieldGivenName)
}

// SetFamilyName sets the FamilyName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateUserResponseContent) SetFamilyName(familyName *string) {
	c.FamilyName = familyName
	c.require(createUserResponseContentFieldFamilyName)
}

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

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

func (c *CreateUserResponseContent) 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 (
	getUserResponseContentFieldUserID        = big.NewInt(1 << 0)
	getUserResponseContentFieldEmail         = big.NewInt(1 << 1)
	getUserResponseContentFieldEmailVerified = big.NewInt(1 << 2)
	getUserResponseContentFieldUsername      = big.NewInt(1 << 3)
	getUserResponseContentFieldPhoneNumber   = big.NewInt(1 << 4)
	getUserResponseContentFieldPhoneVerified = big.NewInt(1 << 5)
	getUserResponseContentFieldCreatedAt     = big.NewInt(1 << 6)
	getUserResponseContentFieldUpdatedAt     = big.NewInt(1 << 7)
	getUserResponseContentFieldIdentities    = big.NewInt(1 << 8)
	getUserResponseContentFieldAppMetadata   = big.NewInt(1 << 9)
	getUserResponseContentFieldUserMetadata  = big.NewInt(1 << 10)
	getUserResponseContentFieldPicture       = big.NewInt(1 << 11)
	getUserResponseContentFieldName          = big.NewInt(1 << 12)
	getUserResponseContentFieldNickname      = big.NewInt(1 << 13)
	getUserResponseContentFieldMultifactor   = big.NewInt(1 << 14)
	getUserResponseContentFieldLastIP        = big.NewInt(1 << 15)
	getUserResponseContentFieldLastLogin     = big.NewInt(1 << 16)
	getUserResponseContentFieldLoginsCount   = big.NewInt(1 << 17)
	getUserResponseContentFieldBlocked       = big.NewInt(1 << 18)
	getUserResponseContentFieldGivenName     = big.NewInt(1 << 19)
	getUserResponseContentFieldFamilyName    = big.NewInt(1 << 20)
)

type GetUserResponseContent struct {
	// ID of the user which can be used when interacting with other APIs.
	UserID *string `json:"user_id,omitempty" url:"user_id,omitempty"`
	// Email address of this user.
	Email *string `json:"email,omitempty" url:"email,omitempty"`
	// Whether this email address is verified (true) or unverified (false).
	EmailVerified *bool `json:"email_verified,omitempty" url:"email_verified,omitempty"`
	// Username of this user.
	Username *string `json:"username,omitempty" url:"username,omitempty"`
	// Phone number for this user. Follows the <a href="https://en.wikipedia.org/wiki/E.164">E.164 recommendation</a>.
	PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"`
	// Whether this phone number has been verified (true) or not (false).
	PhoneVerified *bool           `json:"phone_verified,omitempty" url:"phone_verified,omitempty"`
	CreatedAt     *UserDateSchema `json:"created_at,omitempty" url:"created_at,omitempty"`
	UpdatedAt     *UserDateSchema `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// Array of user identity objects when accounts are linked.
	Identities   []*UserIdentitySchema  `json:"identities,omitempty" url:"identities,omitempty"`
	AppMetadata  *UserAppMetadataSchema `json:"app_metadata,omitempty" url:"app_metadata,omitempty"`
	UserMetadata *UserMetadataSchema    `json:"user_metadata,omitempty" url:"user_metadata,omitempty"`
	// URL to picture, photo, or avatar of this user.
	Picture *string `json:"picture,omitempty" url:"picture,omitempty"`
	// Name of this user.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Preferred nickname or alias of this user.
	Nickname *string `json:"nickname,omitempty" url:"nickname,omitempty"`
	// List of multi-factor authentication providers with which this user has enrolled.
	Multifactor []string `json:"multifactor,omitempty" url:"multifactor,omitempty"`
	// Last IP address from which this user logged in.
	LastIP    *string         `json:"last_ip,omitempty" url:"last_ip,omitempty"`
	LastLogin *UserDateSchema `json:"last_login,omitempty" url:"last_login,omitempty"`
	// Total number of logins this user has performed.
	LoginsCount *int `json:"logins_count,omitempty" url:"logins_count,omitempty"`
	// Whether this user was blocked by an administrator (true) or is not (false).
	Blocked *bool `json:"blocked,omitempty" url:"blocked,omitempty"`
	// Given name/first name/forename of this user.
	GivenName *string `json:"given_name,omitempty" url:"given_name,omitempty"`
	// Family name/last name/surname of this user.
	FamilyName *string `json:"family_name,omitempty" url:"family_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{} `json:"-" url:"-"`

	rawJSON json.RawMessage
}

func (g *GetUserResponseContent) GetUserID() string {
	if g == nil || g.UserID == nil {
		return ""
	}
	return *g.UserID
}

func (g *GetUserResponseContent) GetEmail() string {
	if g == nil || g.Email == nil {
		return ""
	}
	return *g.Email
}

func (g *GetUserResponseContent) GetEmailVerified() bool {
	if g == nil || g.EmailVerified == nil {
		return false
	}
	return *g.EmailVerified
}

func (g *GetUserResponseContent) GetUsername() string {
	if g == nil || g.Username == nil {
		return ""
	}
	return *g.Username
}

func (g *GetUserResponseContent) GetPhoneNumber() string {
	if g == nil || g.PhoneNumber == nil {
		return ""
	}
	return *g.PhoneNumber
}

func (g *GetUserResponseContent) GetPhoneVerified() bool {
	if g == nil || g.PhoneVerified == nil {
		return false
	}
	return *g.PhoneVerified
}

func (g *GetUserResponseContent) GetCreatedAt() UserDateSchema {
	if g == nil || g.CreatedAt == nil {
		return UserDateSchema{}
	}
	return *g.CreatedAt
}

func (g *GetUserResponseContent) GetUpdatedAt() UserDateSchema {
	if g == nil || g.UpdatedAt == nil {
		return UserDateSchema{}
	}
	return *g.UpdatedAt
}

func (g *GetUserResponseContent) GetIdentities() []*UserIdentitySchema {
	if g == nil || g.Identities == nil {
		return nil
	}
	return g.Identities
}

func (g *GetUserResponseContent) GetAppMetadata() UserAppMetadataSchema {
	if g == nil || g.AppMetadata == nil {
		return nil
	}
	return *g.AppMetadata
}

func (g *GetUserResponseContent) GetUserMetadata() UserMetadataSchema {
	if g == nil || g.UserMetadata == nil {
		return nil
	}
	return *g.UserMetadata
}

func (g *GetUserResponseContent) GetPicture() string {
	if g == nil || g.Picture == nil {
		return ""
	}
	return *g.Picture
}

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

func (g *GetUserResponseContent) GetNickname() string {
	if g == nil || g.Nickname == nil {
		return ""
	}
	return *g.Nickname
}

func (g *GetUserResponseContent) GetMultifactor() []string {
	if g == nil || g.Multifactor == nil {
		return nil
	}
	return g.Multifactor
}

func (g *GetUserResponseContent) GetLastIP() string {
	if g == nil || g.LastIP == nil {
		return ""
	}
	return *g.LastIP
}

func (g *GetUserResponseContent) GetLastLogin() UserDateSchema {
	if g == nil || g.LastLogin == nil {
		return UserDateSchema{}
	}
	return *g.LastLogin
}

func (g *GetUserResponseContent) GetLoginsCount() int {
	if g == nil || g.LoginsCount == nil {
		return 0
	}
	return *g.LoginsCount
}

func (g *GetUserResponseContent) GetBlocked() bool {
	if g == nil || g.Blocked == nil {
		return false
	}
	return *g.Blocked
}

func (g *GetUserResponseContent) GetGivenName() string {
	if g == nil || g.GivenName == nil {
		return ""
	}
	return *g.GivenName
}

func (g *GetUserResponseContent) GetFamilyName() string {
	if g == nil || g.FamilyName == nil {
		return ""
	}
	return *g.FamilyName
}

func (g *GetUserResponseContent) GetExtraProperties() map[string]interface{} {
	return g.ExtraProperties
}

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

// 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 *GetUserResponseContent) SetUserID(userID *string) {
	g.UserID = userID
	g.require(getUserResponseContentFieldUserID)
}

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

// SetEmailVerified sets the EmailVerified field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserResponseContent) SetEmailVerified(emailVerified *bool) {
	g.EmailVerified = emailVerified
	g.require(getUserResponseContentFieldEmailVerified)
}

// SetUsername sets the Username field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserResponseContent) SetUsername(username *string) {
	g.Username = username
	g.require(getUserResponseContentFieldUsername)
}

// SetPhoneNumber sets the PhoneNumber field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserResponseContent) SetPhoneNumber(phoneNumber *string) {
	g.PhoneNumber = phoneNumber
	g.require(getUserResponseContentFieldPhoneNumber)
}

// SetPhoneVerified sets the PhoneVerified field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserResponseContent) SetPhoneVerified(phoneVerified *bool) {
	g.PhoneVerified = phoneVerified
	g.require(getUserResponseContentFieldPhoneVerified)
}

// 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 *GetUserResponseContent) SetCreatedAt(createdAt *UserDateSchema) {
	g.CreatedAt = createdAt
	g.require(getUserResponseContentFieldCreatedAt)
}

// 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 *GetUserResponseContent) SetUpdatedAt(updatedAt *UserDateSchema) {
	g.UpdatedAt = updatedAt
	g.require(getUserResponseContentFieldUpdatedAt)
}

// SetIdentities sets the Identities field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserResponseContent) SetIdentities(identities []*UserIdentitySchema) {
	g.Identities = identities
	g.require(getUserResponseContentFieldIdentities)
}

// SetAppMetadata sets the AppMetadata field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserResponseContent) SetAppMetadata(appMetadata *UserAppMetadataSchema) {
	g.AppMetadata = appMetadata
	g.require(getUserResponseContentFieldAppMetadata)
}

// SetUserMetadata sets the UserMetadata field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserResponseContent) SetUserMetadata(userMetadata *UserMetadataSchema) {
	g.UserMetadata = userMetadata
	g.require(getUserResponseContentFieldUserMetadata)
}

// SetPicture sets the Picture field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserResponseContent) SetPicture(picture *string) {
	g.Picture = picture
	g.require(getUserResponseContentFieldPicture)
}

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

// SetNickname sets the Nickname field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserResponseContent) SetNickname(nickname *string) {
	g.Nickname = nickname
	g.require(getUserResponseContentFieldNickname)
}

// SetMultifactor sets the Multifactor field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserResponseContent) SetMultifactor(multifactor []string) {
	g.Multifactor = multifactor
	g.require(getUserResponseContentFieldMultifactor)
}

// SetLastIP sets the LastIP field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserResponseContent) SetLastIP(lastIP *string) {
	g.LastIP = lastIP
	g.require(getUserResponseContentFieldLastIP)
}

// SetLastLogin sets the LastLogin field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserResponseContent) SetLastLogin(lastLogin *UserDateSchema) {
	g.LastLogin = lastLogin
	g.require(getUserResponseContentFieldLastLogin)
}

// SetLoginsCount sets the LoginsCount field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserResponseContent) SetLoginsCount(loginsCount *int) {
	g.LoginsCount = loginsCount
	g.require(getUserResponseContentFieldLoginsCount)
}

// SetBlocked sets the Blocked field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserResponseContent) SetBlocked(blocked *bool) {
	g.Blocked = blocked
	g.require(getUserResponseContentFieldBlocked)
}

// SetGivenName sets the GivenName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserResponseContent) SetGivenName(givenName *string) {
	g.GivenName = givenName
	g.require(getUserResponseContentFieldGivenName)
}

// SetFamilyName sets the FamilyName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetUserResponseContent) SetFamilyName(familyName *string) {
	g.FamilyName = familyName
	g.require(getUserResponseContentFieldFamilyName)
}

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

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

func (g *GetUserResponseContent) 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 (
	listUsersOffsetPaginatedResponseContentFieldStart  = big.NewInt(1 << 0)
	listUsersOffsetPaginatedResponseContentFieldLimit  = big.NewInt(1 << 1)
	listUsersOffsetPaginatedResponseContentFieldLength = big.NewInt(1 << 2)
	listUsersOffsetPaginatedResponseContentFieldTotal  = big.NewInt(1 << 3)
	listUsersOffsetPaginatedResponseContentFieldUsers  = big.NewInt(1 << 4)
)

type ListUsersOffsetPaginatedResponseContent struct {
	Start  *float64              `json:"start,omitempty" url:"start,omitempty"`
	Limit  *float64              `json:"limit,omitempty" url:"limit,omitempty"`
	Length *float64              `json:"length,omitempty" url:"length,omitempty"`
	Total  *float64              `json:"total,omitempty" url:"total,omitempty"`
	Users  []*UserResponseSchema `json:"users,omitempty" url:"users,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 *ListUsersOffsetPaginatedResponseContent) GetStart() float64 {
	if l == nil || l.Start == nil {
		return 0
	}
	return *l.Start
}

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

func (l *ListUsersOffsetPaginatedResponseContent) GetLength() float64 {
	if l == nil || l.Length == nil {
		return 0
	}
	return *l.Length
}

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

func (l *ListUsersOffsetPaginatedResponseContent) GetUsers() []*UserResponseSchema {
	if l == nil || l.Users == nil {
		return nil
	}
	return l.Users
}

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

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

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

// SetLength sets the Length field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (l *ListUsersOffsetPaginatedResponseContent) SetLength(length *float64) {
	l.Length = length
	l.require(listUsersOffsetPaginatedResponseContentFieldLength)
}

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

// SetUsers sets the Users field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (l *ListUsersOffsetPaginatedResponseContent) SetUsers(users []*UserResponseSchema) {
	l.Users = users
	l.require(listUsersOffsetPaginatedResponseContentFieldUsers)
}

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

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

func (l *ListUsersOffsetPaginatedResponseContent) 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 (
	regenerateUsersRecoveryCodeResponseContentFieldRecoveryCode = big.NewInt(1 << 0)
)

type RegenerateUsersRecoveryCodeResponseContent struct {
	// New account recovery code.
	RecoveryCode *string `json:"recovery_code,omitempty" url:"recovery_code,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 (r *RegenerateUsersRecoveryCodeResponseContent) GetRecoveryCode() string {
	if r == nil || r.RecoveryCode == nil {
		return ""
	}
	return *r.RecoveryCode
}

func (r *RegenerateUsersRecoveryCodeResponseContent) GetExtraProperties() map[string]interface{} {
	return r.ExtraProperties
}

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

// SetRecoveryCode sets the RecoveryCode field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *RegenerateUsersRecoveryCodeResponseContent) SetRecoveryCode(recoveryCode *string) {
	r.RecoveryCode = recoveryCode
	r.require(regenerateUsersRecoveryCodeResponseContentFieldRecoveryCode)
}

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

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

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

// The version of the search engine
type SearchEngineVersionsEnum string

const (
	SearchEngineVersionsEnumV1 SearchEngineVersionsEnum = "v1"
	SearchEngineVersionsEnumV2 SearchEngineVersionsEnum = "v2"
	SearchEngineVersionsEnumV3 SearchEngineVersionsEnum = "v3"
)

func NewSearchEngineVersionsEnumFromString(s string) (SearchEngineVersionsEnum, error) {
	switch s {
	case "v1":
		return SearchEngineVersionsEnumV1, nil
	case "v2":
		return SearchEngineVersionsEnumV2, nil
	case "v3":
		return SearchEngineVersionsEnumV3, nil
	}
	var t SearchEngineVersionsEnum
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

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

var (
	updateUserResponseContentFieldUserID        = big.NewInt(1 << 0)
	updateUserResponseContentFieldEmail         = big.NewInt(1 << 1)
	updateUserResponseContentFieldEmailVerified = big.NewInt(1 << 2)
	updateUserResponseContentFieldUsername      = big.NewInt(1 << 3)
	updateUserResponseContentFieldPhoneNumber   = big.NewInt(1 << 4)
	updateUserResponseContentFieldPhoneVerified = big.NewInt(1 << 5)
	updateUserResponseContentFieldCreatedAt     = big.NewInt(1 << 6)
	updateUserResponseContentFieldUpdatedAt     = big.NewInt(1 << 7)
	updateUserResponseContentFieldIdentities    = big.NewInt(1 << 8)
	updateUserResponseContentFieldAppMetadata   = big.NewInt(1 << 9)
	updateUserResponseContentFieldUserMetadata  = big.NewInt(1 << 10)
	updateUserResponseContentFieldPicture       = big.NewInt(1 << 11)
	updateUserResponseContentFieldName          = big.NewInt(1 << 12)
	updateUserResponseContentFieldNickname      = big.NewInt(1 << 13)
	updateUserResponseContentFieldMultifactor   = big.NewInt(1 << 14)
	updateUserResponseContentFieldLastIP        = big.NewInt(1 << 15)
	updateUserResponseContentFieldLastLogin     = big.NewInt(1 << 16)
	updateUserResponseContentFieldLoginsCount   = big.NewInt(1 << 17)
	updateUserResponseContentFieldBlocked       = big.NewInt(1 << 18)
	updateUserResponseContentFieldGivenName     = big.NewInt(1 << 19)
	updateUserResponseContentFieldFamilyName    = big.NewInt(1 << 20)
)

type UpdateUserResponseContent struct {
	// ID of the user which can be used when interacting with other APIs.
	UserID *string `json:"user_id,omitempty" url:"user_id,omitempty"`
	// Email address of this user.
	Email *string `json:"email,omitempty" url:"email,omitempty"`
	// Whether this email address is verified (true) or unverified (false).
	EmailVerified *bool `json:"email_verified,omitempty" url:"email_verified,omitempty"`
	// Username of this user.
	Username *string `json:"username,omitempty" url:"username,omitempty"`
	// Phone number for this user. Follows the <a href="https://en.wikipedia.org/wiki/E.164">E.164 recommendation</a>.
	PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"`
	// Whether this phone number has been verified (true) or not (false).
	PhoneVerified *bool           `json:"phone_verified,omitempty" url:"phone_verified,omitempty"`
	CreatedAt     *UserDateSchema `json:"created_at,omitempty" url:"created_at,omitempty"`
	UpdatedAt     *UserDateSchema `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// Array of user identity objects when accounts are linked.
	Identities   []*UserIdentitySchema  `json:"identities,omitempty" url:"identities,omitempty"`
	AppMetadata  *UserAppMetadataSchema `json:"app_metadata,omitempty" url:"app_metadata,omitempty"`
	UserMetadata *UserMetadataSchema    `json:"user_metadata,omitempty" url:"user_metadata,omitempty"`
	// URL to picture, photo, or avatar of this user.
	Picture *string `json:"picture,omitempty" url:"picture,omitempty"`
	// Name of this user.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Preferred nickname or alias of this user.
	Nickname *string `json:"nickname,omitempty" url:"nickname,omitempty"`
	// List of multi-factor authentication providers with which this user has enrolled.
	Multifactor []string `json:"multifactor,omitempty" url:"multifactor,omitempty"`
	// Last IP address from which this user logged in.
	LastIP    *string         `json:"last_ip,omitempty" url:"last_ip,omitempty"`
	LastLogin *UserDateSchema `json:"last_login,omitempty" url:"last_login,omitempty"`
	// Total number of logins this user has performed.
	LoginsCount *int `json:"logins_count,omitempty" url:"logins_count,omitempty"`
	// Whether this user was blocked by an administrator (true) or is not (false).
	Blocked *bool `json:"blocked,omitempty" url:"blocked,omitempty"`
	// Given name/first name/forename of this user.
	GivenName *string `json:"given_name,omitempty" url:"given_name,omitempty"`
	// Family name/last name/surname of this user.
	FamilyName *string `json:"family_name,omitempty" url:"family_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{} `json:"-" url:"-"`

	rawJSON json.RawMessage
}

func (u *UpdateUserResponseContent) GetUserID() string {
	if u == nil || u.UserID == nil {
		return ""
	}
	return *u.UserID
}

func (u *UpdateUserResponseContent) GetEmail() string {
	if u == nil || u.Email == nil {
		return ""
	}
	return *u.Email
}

func (u *UpdateUserResponseContent) GetEmailVerified() bool {
	if u == nil || u.EmailVerified == nil {
		return false
	}
	return *u.EmailVerified
}

func (u *UpdateUserResponseContent) GetUsername() string {
	if u == nil || u.Username == nil {
		return ""
	}
	return *u.Username
}

func (u *UpdateUserResponseContent) GetPhoneNumber() string {
	if u == nil || u.PhoneNumber == nil {
		return ""
	}
	return *u.PhoneNumber
}

func (u *UpdateUserResponseContent) GetPhoneVerified() bool {
	if u == nil || u.PhoneVerified == nil {
		return false
	}
	return *u.PhoneVerified
}

func (u *UpdateUserResponseContent) GetCreatedAt() UserDateSchema {
	if u == nil || u.CreatedAt == nil {
		return UserDateSchema{}
	}
	return *u.CreatedAt
}

func (u *UpdateUserResponseContent) GetUpdatedAt() UserDateSchema {
	if u == nil || u.UpdatedAt == nil {
		return UserDateSchema{}
	}
	return *u.UpdatedAt
}

func (u *UpdateUserResponseContent) GetIdentities() []*UserIdentitySchema {
	if u == nil || u.Identities == nil {
		return nil
	}
	return u.Identities
}

func (u *UpdateUserResponseContent) GetAppMetadata() UserAppMetadataSchema {
	if u == nil || u.AppMetadata == nil {
		return nil
	}
	return *u.AppMetadata
}

func (u *UpdateUserResponseContent) GetUserMetadata() UserMetadataSchema {
	if u == nil || u.UserMetadata == nil {
		return nil
	}
	return *u.UserMetadata
}

func (u *UpdateUserResponseContent) GetPicture() string {
	if u == nil || u.Picture == nil {
		return ""
	}
	return *u.Picture
}

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

func (u *UpdateUserResponseContent) GetNickname() string {
	if u == nil || u.Nickname == nil {
		return ""
	}
	return *u.Nickname
}

func (u *UpdateUserResponseContent) GetMultifactor() []string {
	if u == nil || u.Multifactor == nil {
		return nil
	}
	return u.Multifactor
}

func (u *UpdateUserResponseContent) GetLastIP() string {
	if u == nil || u.LastIP == nil {
		return ""
	}
	return *u.LastIP
}

func (u *UpdateUserResponseContent) GetLastLogin() UserDateSchema {
	if u == nil || u.LastLogin == nil {
		return UserDateSchema{}
	}
	return *u.LastLogin
}

func (u *UpdateUserResponseContent) GetLoginsCount() int {
	if u == nil || u.LoginsCount == nil {
		return 0
	}
	return *u.LoginsCount
}

func (u *UpdateUserResponseContent) GetBlocked() bool {
	if u == nil || u.Blocked == nil {
		return false
	}
	return *u.Blocked
}

func (u *UpdateUserResponseContent) GetGivenName() string {
	if u == nil || u.GivenName == nil {
		return ""
	}
	return *u.GivenName
}

func (u *UpdateUserResponseContent) GetFamilyName() string {
	if u == nil || u.FamilyName == nil {
		return ""
	}
	return *u.FamilyName
}

func (u *UpdateUserResponseContent) GetExtraProperties() map[string]interface{} {
	return u.ExtraProperties
}

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

// 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 *UpdateUserResponseContent) SetUserID(userID *string) {
	u.UserID = userID
	u.require(updateUserResponseContentFieldUserID)
}

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

// SetEmailVerified sets the EmailVerified field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserResponseContent) SetEmailVerified(emailVerified *bool) {
	u.EmailVerified = emailVerified
	u.require(updateUserResponseContentFieldEmailVerified)
}

// SetUsername sets the Username field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserResponseContent) SetUsername(username *string) {
	u.Username = username
	u.require(updateUserResponseContentFieldUsername)
}

// SetPhoneNumber sets the PhoneNumber field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserResponseContent) SetPhoneNumber(phoneNumber *string) {
	u.PhoneNumber = phoneNumber
	u.require(updateUserResponseContentFieldPhoneNumber)
}

// SetPhoneVerified sets the PhoneVerified field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserResponseContent) SetPhoneVerified(phoneVerified *bool) {
	u.PhoneVerified = phoneVerified
	u.require(updateUserResponseContentFieldPhoneVerified)
}

// 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 *UpdateUserResponseContent) SetCreatedAt(createdAt *UserDateSchema) {
	u.CreatedAt = createdAt
	u.require(updateUserResponseContentFieldCreatedAt)
}

// 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 *UpdateUserResponseContent) SetUpdatedAt(updatedAt *UserDateSchema) {
	u.UpdatedAt = updatedAt
	u.require(updateUserResponseContentFieldUpdatedAt)
}

// SetIdentities sets the Identities field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserResponseContent) SetIdentities(identities []*UserIdentitySchema) {
	u.Identities = identities
	u.require(updateUserResponseContentFieldIdentities)
}

// SetAppMetadata sets the AppMetadata field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserResponseContent) SetAppMetadata(appMetadata *UserAppMetadataSchema) {
	u.AppMetadata = appMetadata
	u.require(updateUserResponseContentFieldAppMetadata)
}

// SetUserMetadata sets the UserMetadata field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserResponseContent) SetUserMetadata(userMetadata *UserMetadataSchema) {
	u.UserMetadata = userMetadata
	u.require(updateUserResponseContentFieldUserMetadata)
}

// SetPicture sets the Picture field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserResponseContent) SetPicture(picture *string) {
	u.Picture = picture
	u.require(updateUserResponseContentFieldPicture)
}

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

// SetNickname sets the Nickname field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserResponseContent) SetNickname(nickname *string) {
	u.Nickname = nickname
	u.require(updateUserResponseContentFieldNickname)
}

// SetMultifactor sets the Multifactor field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserResponseContent) SetMultifactor(multifactor []string) {
	u.Multifactor = multifactor
	u.require(updateUserResponseContentFieldMultifactor)
}

// SetLastIP sets the LastIP field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserResponseContent) SetLastIP(lastIP *string) {
	u.LastIP = lastIP
	u.require(updateUserResponseContentFieldLastIP)
}

// SetLastLogin sets the LastLogin field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserResponseContent) SetLastLogin(lastLogin *UserDateSchema) {
	u.LastLogin = lastLogin
	u.require(updateUserResponseContentFieldLastLogin)
}

// SetLoginsCount sets the LoginsCount field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserResponseContent) SetLoginsCount(loginsCount *int) {
	u.LoginsCount = loginsCount
	u.require(updateUserResponseContentFieldLoginsCount)
}

// SetBlocked sets the Blocked field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserResponseContent) SetBlocked(blocked *bool) {
	u.Blocked = blocked
	u.require(updateUserResponseContentFieldBlocked)
}

// SetGivenName sets the GivenName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserResponseContent) SetGivenName(givenName *string) {
	u.GivenName = givenName
	u.require(updateUserResponseContentFieldGivenName)
}

// SetFamilyName sets the FamilyName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateUserResponseContent) SetFamilyName(familyName *string) {
	u.FamilyName = familyName
	u.require(updateUserResponseContentFieldFamilyName)
}

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

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

func (u *UpdateUserResponseContent) 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 metadata to which this user has read-only access.
type UserAppMetadataSchema = map[string]interface{}

type UserDateSchema struct {
	// Date and time when this user was created (ISO_8601 format).
	String string
	// Date and time when this user was created (ISO_8601 format).
	StringUnknownMap map[string]interface{}

	typ string
}

func (u *UserDateSchema) GetString() string {
	if u == nil {
		return ""
	}
	return u.String
}

func (u *UserDateSchema) GetStringUnknownMap() map[string]interface{} {
	if u == nil {
		return nil
	}
	return u.StringUnknownMap
}

func (u *UserDateSchema) UnmarshalJSON(data []byte) error {
	var valueString string
	if err := json.Unmarshal(data, &valueString); err == nil {
		u.typ = "String"
		u.String = valueString
		return nil
	}
	var valueStringUnknownMap map[string]interface{}
	if err := json.Unmarshal(data, &valueStringUnknownMap); err == nil {
		u.typ = "StringUnknownMap"
		u.StringUnknownMap = valueStringUnknownMap
		return nil
	}
	return fmt.Errorf("%s cannot be deserialized as a %T", data, u)
}

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

type UserDateSchemaVisitor interface {
	VisitString(string) error
	VisitStringUnknownMap(map[string]interface{}) error
}

func (u *UserDateSchema) Accept(visitor UserDateSchemaVisitor) error {
	if u.typ == "String" || u.String != "" {
		return visitor.VisitString(u.String)
	}
	if u.typ == "StringUnknownMap" || u.StringUnknownMap != nil {
		return visitor.VisitStringUnknownMap(u.StringUnknownMap)
	}
	return fmt.Errorf("type %T does not include a non-empty union type", u)
}

var (
	userIdentitySchemaFieldConnection        = big.NewInt(1 << 0)
	userIdentitySchemaFieldUserID            = big.NewInt(1 << 1)
	userIdentitySchemaFieldProvider          = big.NewInt(1 << 2)
	userIdentitySchemaFieldIsSocial          = big.NewInt(1 << 3)
	userIdentitySchemaFieldAccessToken       = big.NewInt(1 << 4)
	userIdentitySchemaFieldAccessTokenSecret = big.NewInt(1 << 5)
	userIdentitySchemaFieldRefreshToken      = big.NewInt(1 << 6)
	userIdentitySchemaFieldProfileData       = big.NewInt(1 << 7)
)

type UserIdentitySchema struct {
	// Name of the connection containing this identity.
	Connection *string `json:"connection,omitempty" url:"connection,omitempty"`
	// Unique identifier of the user user for this identity.
	UserID   *string                   `json:"user_id,omitempty" url:"user_id,omitempty"`
	Provider *UserIdentityProviderEnum `json:"provider,omitempty" url:"provider,omitempty"`
	// Whether this identity is from a social provider (true) or not (false).
	IsSocial *bool `json:"isSocial,omitempty" url:"isSocial,omitempty"`
	// IDP access token returned only if scope read:user_idp_tokens is defined.
	AccessToken *string `json:"access_token,omitempty" url:"access_token,omitempty"`
	// IDP access token secret returned only if scope read:user_idp_tokens is defined.
	AccessTokenSecret *string `json:"access_token_secret,omitempty" url:"access_token_secret,omitempty"`
	// IDP refresh token returned only if scope read:user_idp_tokens is defined.
	RefreshToken *string          `json:"refresh_token,omitempty" url:"refresh_token,omitempty"`
	ProfileData  *UserProfileData `json:"profileData,omitempty" url:"profileData,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 *UserIdentitySchema) GetConnection() string {
	if u == nil || u.Connection == nil {
		return ""
	}
	return *u.Connection
}

func (u *UserIdentitySchema) GetUserID() string {
	if u == nil || u.UserID == nil {
		return ""
	}
	return *u.UserID
}

func (u *UserIdentitySchema) GetProvider() UserIdentityProviderEnum {
	if u == nil || u.Provider == nil {
		return ""
	}
	return *u.Provider
}

func (u *UserIdentitySchema) GetIsSocial() bool {
	if u == nil || u.IsSocial == nil {
		return false
	}
	return *u.IsSocial
}

func (u *UserIdentitySchema) GetAccessToken() string {
	if u == nil || u.AccessToken == nil {
		return ""
	}
	return *u.AccessToken
}

func (u *UserIdentitySchema) GetAccessTokenSecret() string {
	if u == nil || u.AccessTokenSecret == nil {
		return ""
	}
	return *u.AccessTokenSecret
}

func (u *UserIdentitySchema) GetRefreshToken() string {
	if u == nil || u.RefreshToken == nil {
		return ""
	}
	return *u.RefreshToken
}

func (u *UserIdentitySchema) GetProfileData() UserProfileData {
	if u == nil || u.ProfileData == nil {
		return UserProfileData{}
	}
	return *u.ProfileData
}

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

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

// SetConnection sets the Connection field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserIdentitySchema) SetConnection(connection *string) {
	u.Connection = connection
	u.require(userIdentitySchemaFieldConnection)
}

// 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 *UserIdentitySchema) SetUserID(userID *string) {
	u.UserID = userID
	u.require(userIdentitySchemaFieldUserID)
}

// SetProvider sets the Provider field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserIdentitySchema) SetProvider(provider *UserIdentityProviderEnum) {
	u.Provider = provider
	u.require(userIdentitySchemaFieldProvider)
}

// SetIsSocial sets the IsSocial field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserIdentitySchema) SetIsSocial(isSocial *bool) {
	u.IsSocial = isSocial
	u.require(userIdentitySchemaFieldIsSocial)
}

// SetAccessToken sets the AccessToken field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserIdentitySchema) SetAccessToken(accessToken *string) {
	u.AccessToken = accessToken
	u.require(userIdentitySchemaFieldAccessToken)
}

// SetAccessTokenSecret sets the AccessTokenSecret field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserIdentitySchema) SetAccessTokenSecret(accessTokenSecret *string) {
	u.AccessTokenSecret = accessTokenSecret
	u.require(userIdentitySchemaFieldAccessTokenSecret)
}

// SetRefreshToken sets the RefreshToken field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserIdentitySchema) SetRefreshToken(refreshToken *string) {
	u.RefreshToken = refreshToken
	u.require(userIdentitySchemaFieldRefreshToken)
}

// SetProfileData sets the ProfileData field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserIdentitySchema) SetProfileData(profileData *UserProfileData) {
	u.ProfileData = profileData
	u.require(userIdentitySchemaFieldProfileData)
}

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

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

func (u *UserIdentitySchema) 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 metadata to which this user has read/write access.
type UserMetadataSchema = map[string]interface{}

var (
	userResponseSchemaFieldUserID        = big.NewInt(1 << 0)
	userResponseSchemaFieldEmail         = big.NewInt(1 << 1)
	userResponseSchemaFieldEmailVerified = big.NewInt(1 << 2)
	userResponseSchemaFieldUsername      = big.NewInt(1 << 3)
	userResponseSchemaFieldPhoneNumber   = big.NewInt(1 << 4)
	userResponseSchemaFieldPhoneVerified = big.NewInt(1 << 5)
	userResponseSchemaFieldCreatedAt     = big.NewInt(1 << 6)
	userResponseSchemaFieldUpdatedAt     = big.NewInt(1 << 7)
	userResponseSchemaFieldIdentities    = big.NewInt(1 << 8)
	userResponseSchemaFieldAppMetadata   = big.NewInt(1 << 9)
	userResponseSchemaFieldUserMetadata  = big.NewInt(1 << 10)
	userResponseSchemaFieldPicture       = big.NewInt(1 << 11)
	userResponseSchemaFieldName          = big.NewInt(1 << 12)
	userResponseSchemaFieldNickname      = big.NewInt(1 << 13)
	userResponseSchemaFieldMultifactor   = big.NewInt(1 << 14)
	userResponseSchemaFieldLastIP        = big.NewInt(1 << 15)
	userResponseSchemaFieldLastLogin     = big.NewInt(1 << 16)
	userResponseSchemaFieldLoginsCount   = big.NewInt(1 << 17)
	userResponseSchemaFieldBlocked       = big.NewInt(1 << 18)
	userResponseSchemaFieldGivenName     = big.NewInt(1 << 19)
	userResponseSchemaFieldFamilyName    = big.NewInt(1 << 20)
)

type UserResponseSchema struct {
	// ID of the user which can be used when interacting with other APIs.
	UserID *string `json:"user_id,omitempty" url:"user_id,omitempty"`
	// Email address of this user.
	Email *string `json:"email,omitempty" url:"email,omitempty"`
	// Whether this email address is verified (true) or unverified (false).
	EmailVerified *bool `json:"email_verified,omitempty" url:"email_verified,omitempty"`
	// Username of this user.
	Username *string `json:"username,omitempty" url:"username,omitempty"`
	// Phone number for this user. Follows the <a href="https://en.wikipedia.org/wiki/E.164">E.164 recommendation</a>.
	PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"`
	// Whether this phone number has been verified (true) or not (false).
	PhoneVerified *bool           `json:"phone_verified,omitempty" url:"phone_verified,omitempty"`
	CreatedAt     *UserDateSchema `json:"created_at,omitempty" url:"created_at,omitempty"`
	UpdatedAt     *UserDateSchema `json:"updated_at,omitempty" url:"updated_at,omitempty"`
	// Array of user identity objects when accounts are linked.
	Identities   []*UserIdentitySchema  `json:"identities,omitempty" url:"identities,omitempty"`
	AppMetadata  *UserAppMetadataSchema `json:"app_metadata,omitempty" url:"app_metadata,omitempty"`
	UserMetadata *UserMetadataSchema    `json:"user_metadata,omitempty" url:"user_metadata,omitempty"`
	// URL to picture, photo, or avatar of this user.
	Picture *string `json:"picture,omitempty" url:"picture,omitempty"`
	// Name of this user.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Preferred nickname or alias of this user.
	Nickname *string `json:"nickname,omitempty" url:"nickname,omitempty"`
	// List of multi-factor authentication providers with which this user has enrolled.
	Multifactor []string `json:"multifactor,omitempty" url:"multifactor,omitempty"`
	// Last IP address from which this user logged in.
	LastIP    *string         `json:"last_ip,omitempty" url:"last_ip,omitempty"`
	LastLogin *UserDateSchema `json:"last_login,omitempty" url:"last_login,omitempty"`
	// Total number of logins this user has performed.
	LoginsCount *int `json:"logins_count,omitempty" url:"logins_count,omitempty"`
	// Whether this user was blocked by an administrator (true) or is not (false).
	Blocked *bool `json:"blocked,omitempty" url:"blocked,omitempty"`
	// Given name/first name/forename of this user.
	GivenName *string `json:"given_name,omitempty" url:"given_name,omitempty"`
	// Family name/last name/surname of this user.
	FamilyName *string `json:"family_name,omitempty" url:"family_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{} `json:"-" url:"-"`

	rawJSON json.RawMessage
}

func (u *UserResponseSchema) GetUserID() string {
	if u == nil || u.UserID == nil {
		return ""
	}
	return *u.UserID
}

func (u *UserResponseSchema) GetEmail() string {
	if u == nil || u.Email == nil {
		return ""
	}
	return *u.Email
}

func (u *UserResponseSchema) GetEmailVerified() bool {
	if u == nil || u.EmailVerified == nil {
		return false
	}
	return *u.EmailVerified
}

func (u *UserResponseSchema) GetUsername() string {
	if u == nil || u.Username == nil {
		return ""
	}
	return *u.Username
}

func (u *UserResponseSchema) GetPhoneNumber() string {
	if u == nil || u.PhoneNumber == nil {
		return ""
	}
	return *u.PhoneNumber
}

func (u *UserResponseSchema) GetPhoneVerified() bool {
	if u == nil || u.PhoneVerified == nil {
		return false
	}
	return *u.PhoneVerified
}

func (u *UserResponseSchema) GetCreatedAt() UserDateSchema {
	if u == nil || u.CreatedAt == nil {
		return UserDateSchema{}
	}
	return *u.CreatedAt
}

func (u *UserResponseSchema) GetUpdatedAt() UserDateSchema {
	if u == nil || u.UpdatedAt == nil {
		return UserDateSchema{}
	}
	return *u.UpdatedAt
}

func (u *UserResponseSchema) GetIdentities() []*UserIdentitySchema {
	if u == nil || u.Identities == nil {
		return nil
	}
	return u.Identities
}

func (u *UserResponseSchema) GetAppMetadata() UserAppMetadataSchema {
	if u == nil || u.AppMetadata == nil {
		return nil
	}
	return *u.AppMetadata
}

func (u *UserResponseSchema) GetUserMetadata() UserMetadataSchema {
	if u == nil || u.UserMetadata == nil {
		return nil
	}
	return *u.UserMetadata
}

func (u *UserResponseSchema) GetPicture() string {
	if u == nil || u.Picture == nil {
		return ""
	}
	return *u.Picture
}

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

func (u *UserResponseSchema) GetNickname() string {
	if u == nil || u.Nickname == nil {
		return ""
	}
	return *u.Nickname
}

func (u *UserResponseSchema) GetMultifactor() []string {
	if u == nil || u.Multifactor == nil {
		return nil
	}
	return u.Multifactor
}

func (u *UserResponseSchema) GetLastIP() string {
	if u == nil || u.LastIP == nil {
		return ""
	}
	return *u.LastIP
}

func (u *UserResponseSchema) GetLastLogin() UserDateSchema {
	if u == nil || u.LastLogin == nil {
		return UserDateSchema{}
	}
	return *u.LastLogin
}

func (u *UserResponseSchema) GetLoginsCount() int {
	if u == nil || u.LoginsCount == nil {
		return 0
	}
	return *u.LoginsCount
}

func (u *UserResponseSchema) GetBlocked() bool {
	if u == nil || u.Blocked == nil {
		return false
	}
	return *u.Blocked
}

func (u *UserResponseSchema) GetGivenName() string {
	if u == nil || u.GivenName == nil {
		return ""
	}
	return *u.GivenName
}

func (u *UserResponseSchema) GetFamilyName() string {
	if u == nil || u.FamilyName == nil {
		return ""
	}
	return *u.FamilyName
}

func (u *UserResponseSchema) GetExtraProperties() map[string]interface{} {
	return u.ExtraProperties
}

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

// 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 *UserResponseSchema) SetUserID(userID *string) {
	u.UserID = userID
	u.require(userResponseSchemaFieldUserID)
}

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

// SetEmailVerified sets the EmailVerified field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserResponseSchema) SetEmailVerified(emailVerified *bool) {
	u.EmailVerified = emailVerified
	u.require(userResponseSchemaFieldEmailVerified)
}

// SetUsername sets the Username field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserResponseSchema) SetUsername(username *string) {
	u.Username = username
	u.require(userResponseSchemaFieldUsername)
}

// SetPhoneNumber sets the PhoneNumber field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserResponseSchema) SetPhoneNumber(phoneNumber *string) {
	u.PhoneNumber = phoneNumber
	u.require(userResponseSchemaFieldPhoneNumber)
}

// SetPhoneVerified sets the PhoneVerified field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserResponseSchema) SetPhoneVerified(phoneVerified *bool) {
	u.PhoneVerified = phoneVerified
	u.require(userResponseSchemaFieldPhoneVerified)
}

// 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 *UserResponseSchema) SetCreatedAt(createdAt *UserDateSchema) {
	u.CreatedAt = createdAt
	u.require(userResponseSchemaFieldCreatedAt)
}

// 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 *UserResponseSchema) SetUpdatedAt(updatedAt *UserDateSchema) {
	u.UpdatedAt = updatedAt
	u.require(userResponseSchemaFieldUpdatedAt)
}

// SetIdentities sets the Identities field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserResponseSchema) SetIdentities(identities []*UserIdentitySchema) {
	u.Identities = identities
	u.require(userResponseSchemaFieldIdentities)
}

// SetAppMetadata sets the AppMetadata field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserResponseSchema) SetAppMetadata(appMetadata *UserAppMetadataSchema) {
	u.AppMetadata = appMetadata
	u.require(userResponseSchemaFieldAppMetadata)
}

// SetUserMetadata sets the UserMetadata field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserResponseSchema) SetUserMetadata(userMetadata *UserMetadataSchema) {
	u.UserMetadata = userMetadata
	u.require(userResponseSchemaFieldUserMetadata)
}

// SetPicture sets the Picture field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserResponseSchema) SetPicture(picture *string) {
	u.Picture = picture
	u.require(userResponseSchemaFieldPicture)
}

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

// SetNickname sets the Nickname field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserResponseSchema) SetNickname(nickname *string) {
	u.Nickname = nickname
	u.require(userResponseSchemaFieldNickname)
}

// SetMultifactor sets the Multifactor field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserResponseSchema) SetMultifactor(multifactor []string) {
	u.Multifactor = multifactor
	u.require(userResponseSchemaFieldMultifactor)
}

// SetLastIP sets the LastIP field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserResponseSchema) SetLastIP(lastIP *string) {
	u.LastIP = lastIP
	u.require(userResponseSchemaFieldLastIP)
}

// SetLastLogin sets the LastLogin field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserResponseSchema) SetLastLogin(lastLogin *UserDateSchema) {
	u.LastLogin = lastLogin
	u.require(userResponseSchemaFieldLastLogin)
}

// SetLoginsCount sets the LoginsCount field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserResponseSchema) SetLoginsCount(loginsCount *int) {
	u.LoginsCount = loginsCount
	u.require(userResponseSchemaFieldLoginsCount)
}

// SetBlocked sets the Blocked field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserResponseSchema) SetBlocked(blocked *bool) {
	u.Blocked = blocked
	u.require(userResponseSchemaFieldBlocked)
}

// SetGivenName sets the GivenName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserResponseSchema) SetGivenName(givenName *string) {
	u.GivenName = givenName
	u.require(userResponseSchemaFieldGivenName)
}

// SetFamilyName sets the FamilyName field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UserResponseSchema) SetFamilyName(familyName *string) {
	u.FamilyName = familyName
	u.require(userResponseSchemaFieldFamilyName)
}

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

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

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