// 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 (
	createResourceServerResponseContentFieldID                                        = big.NewInt(1 << 0)
	createResourceServerResponseContentFieldName                                      = big.NewInt(1 << 1)
	createResourceServerResponseContentFieldIsSystem                                  = big.NewInt(1 << 2)
	createResourceServerResponseContentFieldIdentifier                                = big.NewInt(1 << 3)
	createResourceServerResponseContentFieldScopes                                    = big.NewInt(1 << 4)
	createResourceServerResponseContentFieldSigningAlg                                = big.NewInt(1 << 5)
	createResourceServerResponseContentFieldSigningSecret                             = big.NewInt(1 << 6)
	createResourceServerResponseContentFieldAllowOfflineAccess                        = big.NewInt(1 << 7)
	createResourceServerResponseContentFieldSkipConsentForVerifiableFirstPartyClients = big.NewInt(1 << 8)
	createResourceServerResponseContentFieldTokenLifetime                             = big.NewInt(1 << 9)
	createResourceServerResponseContentFieldTokenLifetimeForWeb                       = big.NewInt(1 << 10)
	createResourceServerResponseContentFieldEnforcePolicies                           = big.NewInt(1 << 11)
	createResourceServerResponseContentFieldTokenDialect                              = big.NewInt(1 << 12)
	createResourceServerResponseContentFieldTokenEncryption                           = big.NewInt(1 << 13)
	createResourceServerResponseContentFieldConsentPolicy                             = big.NewInt(1 << 14)
	createResourceServerResponseContentFieldAuthorizationDetails                      = big.NewInt(1 << 15)
	createResourceServerResponseContentFieldProofOfPossession                         = big.NewInt(1 << 16)
	createResourceServerResponseContentFieldSubjectTypeAuthorization                  = big.NewInt(1 << 17)
	createResourceServerResponseContentFieldClientID                                  = big.NewInt(1 << 18)
)

type CreateResourceServerResponseContent struct {
	// ID of the API (resource server).
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// Friendly name for this resource server. Can not contain `<` or `>` characters.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Whether this is an Auth0 system API (true) or a custom API (false).
	IsSystem *bool `json:"is_system,omitempty" url:"is_system,omitempty"`
	// Unique identifier for the API used as the audience parameter on authorization calls. Can not be changed once set.
	Identifier *string `json:"identifier,omitempty" url:"identifier,omitempty"`
	// List of permissions (scopes) that this API uses.
	Scopes     []*ResourceServerScope `json:"scopes,omitempty" url:"scopes,omitempty"`
	SigningAlg *SigningAlgorithmEnum  `json:"signing_alg,omitempty" url:"signing_alg,omitempty"`
	// Secret used to sign tokens when using symmetric algorithms (HS256).
	SigningSecret *string `json:"signing_secret,omitempty" url:"signing_secret,omitempty"`
	// Whether refresh tokens can be issued for this API (true) or not (false).
	AllowOfflineAccess *bool `json:"allow_offline_access,omitempty" url:"allow_offline_access,omitempty"`
	// Whether to skip user consent for applications flagged as first party (true) or not (false).
	SkipConsentForVerifiableFirstPartyClients *bool `json:"skip_consent_for_verifiable_first_party_clients,omitempty" url:"skip_consent_for_verifiable_first_party_clients,omitempty"`
	// Expiration value (in seconds) for access tokens issued for this API from the token endpoint.
	TokenLifetime *int `json:"token_lifetime,omitempty" url:"token_lifetime,omitempty"`
	// Expiration value (in seconds) for access tokens issued for this API via Implicit or Hybrid Flows. Cannot be greater than the `token_lifetime` value.
	TokenLifetimeForWeb *int `json:"token_lifetime_for_web,omitempty" url:"token_lifetime_for_web,omitempty"`
	// Whether authorization polices are enforced (true) or unenforced (false).
	EnforcePolicies          *bool                                   `json:"enforce_policies,omitempty" url:"enforce_policies,omitempty"`
	TokenDialect             *ResourceServerTokenDialectResponseEnum `json:"token_dialect,omitempty" url:"token_dialect,omitempty"`
	TokenEncryption          *ResourceServerTokenEncryption          `json:"token_encryption,omitempty" url:"token_encryption,omitempty"`
	ConsentPolicy            *ResourceServerConsentPolicyEnum        `json:"consent_policy,omitempty" url:"consent_policy,omitempty"`
	AuthorizationDetails     []interface{}                           `json:"authorization_details,omitempty" url:"authorization_details,omitempty"`
	ProofOfPossession        *ResourceServerProofOfPossession        `json:"proof_of_possession,omitempty" url:"proof_of_possession,omitempty"`
	SubjectTypeAuthorization *ResourceServerSubjectTypeAuthorization `json:"subject_type_authorization,omitempty" url:"subject_type_authorization,omitempty"`
	// The client ID of the client that this resource server is linked to
	ClientID *string `json:"client_id,omitempty" url:"client_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 *CreateResourceServerResponseContent) GetID() string {
	if c == nil || c.ID == nil {
		return ""
	}
	return *c.ID
}

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

func (c *CreateResourceServerResponseContent) GetIsSystem() bool {
	if c == nil || c.IsSystem == nil {
		return false
	}
	return *c.IsSystem
}

func (c *CreateResourceServerResponseContent) GetIdentifier() string {
	if c == nil || c.Identifier == nil {
		return ""
	}
	return *c.Identifier
}

func (c *CreateResourceServerResponseContent) GetScopes() []*ResourceServerScope {
	if c == nil || c.Scopes == nil {
		return nil
	}
	return c.Scopes
}

func (c *CreateResourceServerResponseContent) GetSigningAlg() SigningAlgorithmEnum {
	if c == nil || c.SigningAlg == nil {
		return ""
	}
	return *c.SigningAlg
}

func (c *CreateResourceServerResponseContent) GetSigningSecret() string {
	if c == nil || c.SigningSecret == nil {
		return ""
	}
	return *c.SigningSecret
}

func (c *CreateResourceServerResponseContent) GetAllowOfflineAccess() bool {
	if c == nil || c.AllowOfflineAccess == nil {
		return false
	}
	return *c.AllowOfflineAccess
}

func (c *CreateResourceServerResponseContent) GetSkipConsentForVerifiableFirstPartyClients() bool {
	if c == nil || c.SkipConsentForVerifiableFirstPartyClients == nil {
		return false
	}
	return *c.SkipConsentForVerifiableFirstPartyClients
}

func (c *CreateResourceServerResponseContent) GetTokenLifetime() int {
	if c == nil || c.TokenLifetime == nil {
		return 0
	}
	return *c.TokenLifetime
}

func (c *CreateResourceServerResponseContent) GetTokenLifetimeForWeb() int {
	if c == nil || c.TokenLifetimeForWeb == nil {
		return 0
	}
	return *c.TokenLifetimeForWeb
}

func (c *CreateResourceServerResponseContent) GetEnforcePolicies() bool {
	if c == nil || c.EnforcePolicies == nil {
		return false
	}
	return *c.EnforcePolicies
}

func (c *CreateResourceServerResponseContent) GetTokenDialect() ResourceServerTokenDialectResponseEnum {
	if c == nil || c.TokenDialect == nil {
		return ""
	}
	return *c.TokenDialect
}

func (c *CreateResourceServerResponseContent) GetTokenEncryption() ResourceServerTokenEncryption {
	if c == nil || c.TokenEncryption == nil {
		return ResourceServerTokenEncryption{}
	}
	return *c.TokenEncryption
}

func (c *CreateResourceServerResponseContent) GetAuthorizationDetails() []interface{} {
	if c == nil || c.AuthorizationDetails == nil {
		return nil
	}
	return c.AuthorizationDetails
}

func (c *CreateResourceServerResponseContent) GetProofOfPossession() ResourceServerProofOfPossession {
	if c == nil || c.ProofOfPossession == nil {
		return ResourceServerProofOfPossession{}
	}
	return *c.ProofOfPossession
}

func (c *CreateResourceServerResponseContent) GetSubjectTypeAuthorization() ResourceServerSubjectTypeAuthorization {
	if c == nil || c.SubjectTypeAuthorization == nil {
		return ResourceServerSubjectTypeAuthorization{}
	}
	return *c.SubjectTypeAuthorization
}

func (c *CreateResourceServerResponseContent) GetClientID() string {
	if c == nil || c.ClientID == nil {
		return ""
	}
	return *c.ClientID
}

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

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

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

// SetIsSystem sets the IsSystem field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetIsSystem(isSystem *bool) {
	c.IsSystem = isSystem
	c.require(createResourceServerResponseContentFieldIsSystem)
}

// SetIdentifier sets the Identifier field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetIdentifier(identifier *string) {
	c.Identifier = identifier
	c.require(createResourceServerResponseContentFieldIdentifier)
}

// SetScopes sets the Scopes field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetScopes(scopes []*ResourceServerScope) {
	c.Scopes = scopes
	c.require(createResourceServerResponseContentFieldScopes)
}

// SetSigningAlg sets the SigningAlg field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetSigningAlg(signingAlg *SigningAlgorithmEnum) {
	c.SigningAlg = signingAlg
	c.require(createResourceServerResponseContentFieldSigningAlg)
}

// SetSigningSecret sets the SigningSecret field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetSigningSecret(signingSecret *string) {
	c.SigningSecret = signingSecret
	c.require(createResourceServerResponseContentFieldSigningSecret)
}

// SetAllowOfflineAccess sets the AllowOfflineAccess field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetAllowOfflineAccess(allowOfflineAccess *bool) {
	c.AllowOfflineAccess = allowOfflineAccess
	c.require(createResourceServerResponseContentFieldAllowOfflineAccess)
}

// SetSkipConsentForVerifiableFirstPartyClients sets the SkipConsentForVerifiableFirstPartyClients field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetSkipConsentForVerifiableFirstPartyClients(skipConsentForVerifiableFirstPartyClients *bool) {
	c.SkipConsentForVerifiableFirstPartyClients = skipConsentForVerifiableFirstPartyClients
	c.require(createResourceServerResponseContentFieldSkipConsentForVerifiableFirstPartyClients)
}

// SetTokenLifetime sets the TokenLifetime field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetTokenLifetime(tokenLifetime *int) {
	c.TokenLifetime = tokenLifetime
	c.require(createResourceServerResponseContentFieldTokenLifetime)
}

// SetTokenLifetimeForWeb sets the TokenLifetimeForWeb field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetTokenLifetimeForWeb(tokenLifetimeForWeb *int) {
	c.TokenLifetimeForWeb = tokenLifetimeForWeb
	c.require(createResourceServerResponseContentFieldTokenLifetimeForWeb)
}

// SetEnforcePolicies sets the EnforcePolicies field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetEnforcePolicies(enforcePolicies *bool) {
	c.EnforcePolicies = enforcePolicies
	c.require(createResourceServerResponseContentFieldEnforcePolicies)
}

// SetTokenDialect sets the TokenDialect field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetTokenDialect(tokenDialect *ResourceServerTokenDialectResponseEnum) {
	c.TokenDialect = tokenDialect
	c.require(createResourceServerResponseContentFieldTokenDialect)
}

// SetTokenEncryption sets the TokenEncryption field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetTokenEncryption(tokenEncryption *ResourceServerTokenEncryption) {
	c.TokenEncryption = tokenEncryption
	c.require(createResourceServerResponseContentFieldTokenEncryption)
}

// SetConsentPolicy sets the ConsentPolicy field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetConsentPolicy(consentPolicy *ResourceServerConsentPolicyEnum) {
	c.ConsentPolicy = consentPolicy
	c.require(createResourceServerResponseContentFieldConsentPolicy)
}

// SetAuthorizationDetails sets the AuthorizationDetails field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetAuthorizationDetails(authorizationDetails []interface{}) {
	c.AuthorizationDetails = authorizationDetails
	c.require(createResourceServerResponseContentFieldAuthorizationDetails)
}

// SetProofOfPossession sets the ProofOfPossession field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetProofOfPossession(proofOfPossession *ResourceServerProofOfPossession) {
	c.ProofOfPossession = proofOfPossession
	c.require(createResourceServerResponseContentFieldProofOfPossession)
}

// SetSubjectTypeAuthorization sets the SubjectTypeAuthorization field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetSubjectTypeAuthorization(subjectTypeAuthorization *ResourceServerSubjectTypeAuthorization) {
	c.SubjectTypeAuthorization = subjectTypeAuthorization
	c.require(createResourceServerResponseContentFieldSubjectTypeAuthorization)
}

// SetClientID sets the ClientID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (c *CreateResourceServerResponseContent) SetClientID(clientID *string) {
	c.ClientID = clientID
	c.require(createResourceServerResponseContentFieldClientID)
}

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

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

func (c *CreateResourceServerResponseContent) 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 (
	getResourceServerResponseContentFieldID                                        = big.NewInt(1 << 0)
	getResourceServerResponseContentFieldName                                      = big.NewInt(1 << 1)
	getResourceServerResponseContentFieldIsSystem                                  = big.NewInt(1 << 2)
	getResourceServerResponseContentFieldIdentifier                                = big.NewInt(1 << 3)
	getResourceServerResponseContentFieldScopes                                    = big.NewInt(1 << 4)
	getResourceServerResponseContentFieldSigningAlg                                = big.NewInt(1 << 5)
	getResourceServerResponseContentFieldSigningSecret                             = big.NewInt(1 << 6)
	getResourceServerResponseContentFieldAllowOfflineAccess                        = big.NewInt(1 << 7)
	getResourceServerResponseContentFieldSkipConsentForVerifiableFirstPartyClients = big.NewInt(1 << 8)
	getResourceServerResponseContentFieldTokenLifetime                             = big.NewInt(1 << 9)
	getResourceServerResponseContentFieldTokenLifetimeForWeb                       = big.NewInt(1 << 10)
	getResourceServerResponseContentFieldEnforcePolicies                           = big.NewInt(1 << 11)
	getResourceServerResponseContentFieldTokenDialect                              = big.NewInt(1 << 12)
	getResourceServerResponseContentFieldTokenEncryption                           = big.NewInt(1 << 13)
	getResourceServerResponseContentFieldConsentPolicy                             = big.NewInt(1 << 14)
	getResourceServerResponseContentFieldAuthorizationDetails                      = big.NewInt(1 << 15)
	getResourceServerResponseContentFieldProofOfPossession                         = big.NewInt(1 << 16)
	getResourceServerResponseContentFieldSubjectTypeAuthorization                  = big.NewInt(1 << 17)
	getResourceServerResponseContentFieldClientID                                  = big.NewInt(1 << 18)
)

type GetResourceServerResponseContent struct {
	// ID of the API (resource server).
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// Friendly name for this resource server. Can not contain `<` or `>` characters.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Whether this is an Auth0 system API (true) or a custom API (false).
	IsSystem *bool `json:"is_system,omitempty" url:"is_system,omitempty"`
	// Unique identifier for the API used as the audience parameter on authorization calls. Can not be changed once set.
	Identifier *string `json:"identifier,omitempty" url:"identifier,omitempty"`
	// List of permissions (scopes) that this API uses.
	Scopes     []*ResourceServerScope `json:"scopes,omitempty" url:"scopes,omitempty"`
	SigningAlg *SigningAlgorithmEnum  `json:"signing_alg,omitempty" url:"signing_alg,omitempty"`
	// Secret used to sign tokens when using symmetric algorithms (HS256).
	SigningSecret *string `json:"signing_secret,omitempty" url:"signing_secret,omitempty"`
	// Whether refresh tokens can be issued for this API (true) or not (false).
	AllowOfflineAccess *bool `json:"allow_offline_access,omitempty" url:"allow_offline_access,omitempty"`
	// Whether to skip user consent for applications flagged as first party (true) or not (false).
	SkipConsentForVerifiableFirstPartyClients *bool `json:"skip_consent_for_verifiable_first_party_clients,omitempty" url:"skip_consent_for_verifiable_first_party_clients,omitempty"`
	// Expiration value (in seconds) for access tokens issued for this API from the token endpoint.
	TokenLifetime *int `json:"token_lifetime,omitempty" url:"token_lifetime,omitempty"`
	// Expiration value (in seconds) for access tokens issued for this API via Implicit or Hybrid Flows. Cannot be greater than the `token_lifetime` value.
	TokenLifetimeForWeb *int `json:"token_lifetime_for_web,omitempty" url:"token_lifetime_for_web,omitempty"`
	// Whether authorization polices are enforced (true) or unenforced (false).
	EnforcePolicies          *bool                                   `json:"enforce_policies,omitempty" url:"enforce_policies,omitempty"`
	TokenDialect             *ResourceServerTokenDialectResponseEnum `json:"token_dialect,omitempty" url:"token_dialect,omitempty"`
	TokenEncryption          *ResourceServerTokenEncryption          `json:"token_encryption,omitempty" url:"token_encryption,omitempty"`
	ConsentPolicy            *ResourceServerConsentPolicyEnum        `json:"consent_policy,omitempty" url:"consent_policy,omitempty"`
	AuthorizationDetails     []interface{}                           `json:"authorization_details,omitempty" url:"authorization_details,omitempty"`
	ProofOfPossession        *ResourceServerProofOfPossession        `json:"proof_of_possession,omitempty" url:"proof_of_possession,omitempty"`
	SubjectTypeAuthorization *ResourceServerSubjectTypeAuthorization `json:"subject_type_authorization,omitempty" url:"subject_type_authorization,omitempty"`
	// The client ID of the client that this resource server is linked to
	ClientID *string `json:"client_id,omitempty" url:"client_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 *GetResourceServerResponseContent) GetID() string {
	if g == nil || g.ID == nil {
		return ""
	}
	return *g.ID
}

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

func (g *GetResourceServerResponseContent) GetIsSystem() bool {
	if g == nil || g.IsSystem == nil {
		return false
	}
	return *g.IsSystem
}

func (g *GetResourceServerResponseContent) GetIdentifier() string {
	if g == nil || g.Identifier == nil {
		return ""
	}
	return *g.Identifier
}

func (g *GetResourceServerResponseContent) GetScopes() []*ResourceServerScope {
	if g == nil || g.Scopes == nil {
		return nil
	}
	return g.Scopes
}

func (g *GetResourceServerResponseContent) GetSigningAlg() SigningAlgorithmEnum {
	if g == nil || g.SigningAlg == nil {
		return ""
	}
	return *g.SigningAlg
}

func (g *GetResourceServerResponseContent) GetSigningSecret() string {
	if g == nil || g.SigningSecret == nil {
		return ""
	}
	return *g.SigningSecret
}

func (g *GetResourceServerResponseContent) GetAllowOfflineAccess() bool {
	if g == nil || g.AllowOfflineAccess == nil {
		return false
	}
	return *g.AllowOfflineAccess
}

func (g *GetResourceServerResponseContent) GetSkipConsentForVerifiableFirstPartyClients() bool {
	if g == nil || g.SkipConsentForVerifiableFirstPartyClients == nil {
		return false
	}
	return *g.SkipConsentForVerifiableFirstPartyClients
}

func (g *GetResourceServerResponseContent) GetTokenLifetime() int {
	if g == nil || g.TokenLifetime == nil {
		return 0
	}
	return *g.TokenLifetime
}

func (g *GetResourceServerResponseContent) GetTokenLifetimeForWeb() int {
	if g == nil || g.TokenLifetimeForWeb == nil {
		return 0
	}
	return *g.TokenLifetimeForWeb
}

func (g *GetResourceServerResponseContent) GetEnforcePolicies() bool {
	if g == nil || g.EnforcePolicies == nil {
		return false
	}
	return *g.EnforcePolicies
}

func (g *GetResourceServerResponseContent) GetTokenDialect() ResourceServerTokenDialectResponseEnum {
	if g == nil || g.TokenDialect == nil {
		return ""
	}
	return *g.TokenDialect
}

func (g *GetResourceServerResponseContent) GetTokenEncryption() ResourceServerTokenEncryption {
	if g == nil || g.TokenEncryption == nil {
		return ResourceServerTokenEncryption{}
	}
	return *g.TokenEncryption
}

func (g *GetResourceServerResponseContent) GetAuthorizationDetails() []interface{} {
	if g == nil || g.AuthorizationDetails == nil {
		return nil
	}
	return g.AuthorizationDetails
}

func (g *GetResourceServerResponseContent) GetProofOfPossession() ResourceServerProofOfPossession {
	if g == nil || g.ProofOfPossession == nil {
		return ResourceServerProofOfPossession{}
	}
	return *g.ProofOfPossession
}

func (g *GetResourceServerResponseContent) GetSubjectTypeAuthorization() ResourceServerSubjectTypeAuthorization {
	if g == nil || g.SubjectTypeAuthorization == nil {
		return ResourceServerSubjectTypeAuthorization{}
	}
	return *g.SubjectTypeAuthorization
}

func (g *GetResourceServerResponseContent) GetClientID() string {
	if g == nil || g.ClientID == nil {
		return ""
	}
	return *g.ClientID
}

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

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

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

// SetIsSystem sets the IsSystem field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetIsSystem(isSystem *bool) {
	g.IsSystem = isSystem
	g.require(getResourceServerResponseContentFieldIsSystem)
}

// SetIdentifier sets the Identifier field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetIdentifier(identifier *string) {
	g.Identifier = identifier
	g.require(getResourceServerResponseContentFieldIdentifier)
}

// SetScopes sets the Scopes field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetScopes(scopes []*ResourceServerScope) {
	g.Scopes = scopes
	g.require(getResourceServerResponseContentFieldScopes)
}

// SetSigningAlg sets the SigningAlg field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetSigningAlg(signingAlg *SigningAlgorithmEnum) {
	g.SigningAlg = signingAlg
	g.require(getResourceServerResponseContentFieldSigningAlg)
}

// SetSigningSecret sets the SigningSecret field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetSigningSecret(signingSecret *string) {
	g.SigningSecret = signingSecret
	g.require(getResourceServerResponseContentFieldSigningSecret)
}

// SetAllowOfflineAccess sets the AllowOfflineAccess field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetAllowOfflineAccess(allowOfflineAccess *bool) {
	g.AllowOfflineAccess = allowOfflineAccess
	g.require(getResourceServerResponseContentFieldAllowOfflineAccess)
}

// SetSkipConsentForVerifiableFirstPartyClients sets the SkipConsentForVerifiableFirstPartyClients field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetSkipConsentForVerifiableFirstPartyClients(skipConsentForVerifiableFirstPartyClients *bool) {
	g.SkipConsentForVerifiableFirstPartyClients = skipConsentForVerifiableFirstPartyClients
	g.require(getResourceServerResponseContentFieldSkipConsentForVerifiableFirstPartyClients)
}

// SetTokenLifetime sets the TokenLifetime field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetTokenLifetime(tokenLifetime *int) {
	g.TokenLifetime = tokenLifetime
	g.require(getResourceServerResponseContentFieldTokenLifetime)
}

// SetTokenLifetimeForWeb sets the TokenLifetimeForWeb field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetTokenLifetimeForWeb(tokenLifetimeForWeb *int) {
	g.TokenLifetimeForWeb = tokenLifetimeForWeb
	g.require(getResourceServerResponseContentFieldTokenLifetimeForWeb)
}

// SetEnforcePolicies sets the EnforcePolicies field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetEnforcePolicies(enforcePolicies *bool) {
	g.EnforcePolicies = enforcePolicies
	g.require(getResourceServerResponseContentFieldEnforcePolicies)
}

// SetTokenDialect sets the TokenDialect field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetTokenDialect(tokenDialect *ResourceServerTokenDialectResponseEnum) {
	g.TokenDialect = tokenDialect
	g.require(getResourceServerResponseContentFieldTokenDialect)
}

// SetTokenEncryption sets the TokenEncryption field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetTokenEncryption(tokenEncryption *ResourceServerTokenEncryption) {
	g.TokenEncryption = tokenEncryption
	g.require(getResourceServerResponseContentFieldTokenEncryption)
}

// SetConsentPolicy sets the ConsentPolicy field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetConsentPolicy(consentPolicy *ResourceServerConsentPolicyEnum) {
	g.ConsentPolicy = consentPolicy
	g.require(getResourceServerResponseContentFieldConsentPolicy)
}

// SetAuthorizationDetails sets the AuthorizationDetails field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetAuthorizationDetails(authorizationDetails []interface{}) {
	g.AuthorizationDetails = authorizationDetails
	g.require(getResourceServerResponseContentFieldAuthorizationDetails)
}

// SetProofOfPossession sets the ProofOfPossession field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetProofOfPossession(proofOfPossession *ResourceServerProofOfPossession) {
	g.ProofOfPossession = proofOfPossession
	g.require(getResourceServerResponseContentFieldProofOfPossession)
}

// SetSubjectTypeAuthorization sets the SubjectTypeAuthorization field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetSubjectTypeAuthorization(subjectTypeAuthorization *ResourceServerSubjectTypeAuthorization) {
	g.SubjectTypeAuthorization = subjectTypeAuthorization
	g.require(getResourceServerResponseContentFieldSubjectTypeAuthorization)
}

// SetClientID sets the ClientID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (g *GetResourceServerResponseContent) SetClientID(clientID *string) {
	g.ClientID = clientID
	g.require(getResourceServerResponseContentFieldClientID)
}

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

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

func (g *GetResourceServerResponseContent) 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 (
	listResourceServerOffsetPaginatedResponseContentFieldStart           = big.NewInt(1 << 0)
	listResourceServerOffsetPaginatedResponseContentFieldLimit           = big.NewInt(1 << 1)
	listResourceServerOffsetPaginatedResponseContentFieldTotal           = big.NewInt(1 << 2)
	listResourceServerOffsetPaginatedResponseContentFieldResourceServers = big.NewInt(1 << 3)
)

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

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

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

func (l *ListResourceServerOffsetPaginatedResponseContent) GetResourceServers() []*ResourceServer {
	if l == nil || l.ResourceServers == nil {
		return nil
	}
	return l.ResourceServers
}

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

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

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

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

// SetResourceServers sets the ResourceServers field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (l *ListResourceServerOffsetPaginatedResponseContent) SetResourceServers(resourceServers []*ResourceServer) {
	l.ResourceServers = resourceServers
	l.require(listResourceServerOffsetPaginatedResponseContentFieldResourceServers)
}

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

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

func (l *ListResourceServerOffsetPaginatedResponseContent) 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 (
	resourceServerFieldID                                        = big.NewInt(1 << 0)
	resourceServerFieldName                                      = big.NewInt(1 << 1)
	resourceServerFieldIsSystem                                  = big.NewInt(1 << 2)
	resourceServerFieldIdentifier                                = big.NewInt(1 << 3)
	resourceServerFieldScopes                                    = big.NewInt(1 << 4)
	resourceServerFieldSigningAlg                                = big.NewInt(1 << 5)
	resourceServerFieldSigningSecret                             = big.NewInt(1 << 6)
	resourceServerFieldAllowOfflineAccess                        = big.NewInt(1 << 7)
	resourceServerFieldSkipConsentForVerifiableFirstPartyClients = big.NewInt(1 << 8)
	resourceServerFieldTokenLifetime                             = big.NewInt(1 << 9)
	resourceServerFieldTokenLifetimeForWeb                       = big.NewInt(1 << 10)
	resourceServerFieldEnforcePolicies                           = big.NewInt(1 << 11)
	resourceServerFieldTokenDialect                              = big.NewInt(1 << 12)
	resourceServerFieldTokenEncryption                           = big.NewInt(1 << 13)
	resourceServerFieldConsentPolicy                             = big.NewInt(1 << 14)
	resourceServerFieldAuthorizationDetails                      = big.NewInt(1 << 15)
	resourceServerFieldProofOfPossession                         = big.NewInt(1 << 16)
	resourceServerFieldSubjectTypeAuthorization                  = big.NewInt(1 << 17)
	resourceServerFieldClientID                                  = big.NewInt(1 << 18)
)

type ResourceServer struct {
	// ID of the API (resource server).
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// Friendly name for this resource server. Can not contain `<` or `>` characters.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Whether this is an Auth0 system API (true) or a custom API (false).
	IsSystem *bool `json:"is_system,omitempty" url:"is_system,omitempty"`
	// Unique identifier for the API used as the audience parameter on authorization calls. Can not be changed once set.
	Identifier *string `json:"identifier,omitempty" url:"identifier,omitempty"`
	// List of permissions (scopes) that this API uses.
	Scopes     []*ResourceServerScope `json:"scopes,omitempty" url:"scopes,omitempty"`
	SigningAlg *SigningAlgorithmEnum  `json:"signing_alg,omitempty" url:"signing_alg,omitempty"`
	// Secret used to sign tokens when using symmetric algorithms (HS256).
	SigningSecret *string `json:"signing_secret,omitempty" url:"signing_secret,omitempty"`
	// Whether refresh tokens can be issued for this API (true) or not (false).
	AllowOfflineAccess *bool `json:"allow_offline_access,omitempty" url:"allow_offline_access,omitempty"`
	// Whether to skip user consent for applications flagged as first party (true) or not (false).
	SkipConsentForVerifiableFirstPartyClients *bool `json:"skip_consent_for_verifiable_first_party_clients,omitempty" url:"skip_consent_for_verifiable_first_party_clients,omitempty"`
	// Expiration value (in seconds) for access tokens issued for this API from the token endpoint.
	TokenLifetime *int `json:"token_lifetime,omitempty" url:"token_lifetime,omitempty"`
	// Expiration value (in seconds) for access tokens issued for this API via Implicit or Hybrid Flows. Cannot be greater than the `token_lifetime` value.
	TokenLifetimeForWeb *int `json:"token_lifetime_for_web,omitempty" url:"token_lifetime_for_web,omitempty"`
	// Whether authorization polices are enforced (true) or unenforced (false).
	EnforcePolicies          *bool                                   `json:"enforce_policies,omitempty" url:"enforce_policies,omitempty"`
	TokenDialect             *ResourceServerTokenDialectResponseEnum `json:"token_dialect,omitempty" url:"token_dialect,omitempty"`
	TokenEncryption          *ResourceServerTokenEncryption          `json:"token_encryption,omitempty" url:"token_encryption,omitempty"`
	ConsentPolicy            *ResourceServerConsentPolicyEnum        `json:"consent_policy,omitempty" url:"consent_policy,omitempty"`
	AuthorizationDetails     []interface{}                           `json:"authorization_details,omitempty" url:"authorization_details,omitempty"`
	ProofOfPossession        *ResourceServerProofOfPossession        `json:"proof_of_possession,omitempty" url:"proof_of_possession,omitempty"`
	SubjectTypeAuthorization *ResourceServerSubjectTypeAuthorization `json:"subject_type_authorization,omitempty" url:"subject_type_authorization,omitempty"`
	// The client ID of the client that this resource server is linked to
	ClientID *string `json:"client_id,omitempty" url:"client_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 (r *ResourceServer) GetID() string {
	if r == nil || r.ID == nil {
		return ""
	}
	return *r.ID
}

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

func (r *ResourceServer) GetIsSystem() bool {
	if r == nil || r.IsSystem == nil {
		return false
	}
	return *r.IsSystem
}

func (r *ResourceServer) GetIdentifier() string {
	if r == nil || r.Identifier == nil {
		return ""
	}
	return *r.Identifier
}

func (r *ResourceServer) GetScopes() []*ResourceServerScope {
	if r == nil || r.Scopes == nil {
		return nil
	}
	return r.Scopes
}

func (r *ResourceServer) GetSigningAlg() SigningAlgorithmEnum {
	if r == nil || r.SigningAlg == nil {
		return ""
	}
	return *r.SigningAlg
}

func (r *ResourceServer) GetSigningSecret() string {
	if r == nil || r.SigningSecret == nil {
		return ""
	}
	return *r.SigningSecret
}

func (r *ResourceServer) GetAllowOfflineAccess() bool {
	if r == nil || r.AllowOfflineAccess == nil {
		return false
	}
	return *r.AllowOfflineAccess
}

func (r *ResourceServer) GetSkipConsentForVerifiableFirstPartyClients() bool {
	if r == nil || r.SkipConsentForVerifiableFirstPartyClients == nil {
		return false
	}
	return *r.SkipConsentForVerifiableFirstPartyClients
}

func (r *ResourceServer) GetTokenLifetime() int {
	if r == nil || r.TokenLifetime == nil {
		return 0
	}
	return *r.TokenLifetime
}

func (r *ResourceServer) GetTokenLifetimeForWeb() int {
	if r == nil || r.TokenLifetimeForWeb == nil {
		return 0
	}
	return *r.TokenLifetimeForWeb
}

func (r *ResourceServer) GetEnforcePolicies() bool {
	if r == nil || r.EnforcePolicies == nil {
		return false
	}
	return *r.EnforcePolicies
}

func (r *ResourceServer) GetTokenDialect() ResourceServerTokenDialectResponseEnum {
	if r == nil || r.TokenDialect == nil {
		return ""
	}
	return *r.TokenDialect
}

func (r *ResourceServer) GetTokenEncryption() ResourceServerTokenEncryption {
	if r == nil || r.TokenEncryption == nil {
		return ResourceServerTokenEncryption{}
	}
	return *r.TokenEncryption
}

func (r *ResourceServer) GetAuthorizationDetails() []interface{} {
	if r == nil || r.AuthorizationDetails == nil {
		return nil
	}
	return r.AuthorizationDetails
}

func (r *ResourceServer) GetProofOfPossession() ResourceServerProofOfPossession {
	if r == nil || r.ProofOfPossession == nil {
		return ResourceServerProofOfPossession{}
	}
	return *r.ProofOfPossession
}

func (r *ResourceServer) GetSubjectTypeAuthorization() ResourceServerSubjectTypeAuthorization {
	if r == nil || r.SubjectTypeAuthorization == nil {
		return ResourceServerSubjectTypeAuthorization{}
	}
	return *r.SubjectTypeAuthorization
}

func (r *ResourceServer) GetClientID() string {
	if r == nil || r.ClientID == nil {
		return ""
	}
	return *r.ClientID
}

func (r *ResourceServer) GetExtraProperties() map[string]interface{} {
	return r.extraProperties
}

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

// 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 (r *ResourceServer) SetName(name *string) {
	r.Name = name
	r.require(resourceServerFieldName)
}

// SetIsSystem sets the IsSystem field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetIsSystem(isSystem *bool) {
	r.IsSystem = isSystem
	r.require(resourceServerFieldIsSystem)
}

// SetIdentifier sets the Identifier field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetIdentifier(identifier *string) {
	r.Identifier = identifier
	r.require(resourceServerFieldIdentifier)
}

// SetScopes sets the Scopes field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetScopes(scopes []*ResourceServerScope) {
	r.Scopes = scopes
	r.require(resourceServerFieldScopes)
}

// SetSigningAlg sets the SigningAlg field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetSigningAlg(signingAlg *SigningAlgorithmEnum) {
	r.SigningAlg = signingAlg
	r.require(resourceServerFieldSigningAlg)
}

// SetSigningSecret sets the SigningSecret field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetSigningSecret(signingSecret *string) {
	r.SigningSecret = signingSecret
	r.require(resourceServerFieldSigningSecret)
}

// SetAllowOfflineAccess sets the AllowOfflineAccess field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetAllowOfflineAccess(allowOfflineAccess *bool) {
	r.AllowOfflineAccess = allowOfflineAccess
	r.require(resourceServerFieldAllowOfflineAccess)
}

// SetSkipConsentForVerifiableFirstPartyClients sets the SkipConsentForVerifiableFirstPartyClients field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetSkipConsentForVerifiableFirstPartyClients(skipConsentForVerifiableFirstPartyClients *bool) {
	r.SkipConsentForVerifiableFirstPartyClients = skipConsentForVerifiableFirstPartyClients
	r.require(resourceServerFieldSkipConsentForVerifiableFirstPartyClients)
}

// SetTokenLifetime sets the TokenLifetime field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetTokenLifetime(tokenLifetime *int) {
	r.TokenLifetime = tokenLifetime
	r.require(resourceServerFieldTokenLifetime)
}

// SetTokenLifetimeForWeb sets the TokenLifetimeForWeb field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetTokenLifetimeForWeb(tokenLifetimeForWeb *int) {
	r.TokenLifetimeForWeb = tokenLifetimeForWeb
	r.require(resourceServerFieldTokenLifetimeForWeb)
}

// SetEnforcePolicies sets the EnforcePolicies field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetEnforcePolicies(enforcePolicies *bool) {
	r.EnforcePolicies = enforcePolicies
	r.require(resourceServerFieldEnforcePolicies)
}

// SetTokenDialect sets the TokenDialect field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetTokenDialect(tokenDialect *ResourceServerTokenDialectResponseEnum) {
	r.TokenDialect = tokenDialect
	r.require(resourceServerFieldTokenDialect)
}

// SetTokenEncryption sets the TokenEncryption field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetTokenEncryption(tokenEncryption *ResourceServerTokenEncryption) {
	r.TokenEncryption = tokenEncryption
	r.require(resourceServerFieldTokenEncryption)
}

// SetConsentPolicy sets the ConsentPolicy field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetConsentPolicy(consentPolicy *ResourceServerConsentPolicyEnum) {
	r.ConsentPolicy = consentPolicy
	r.require(resourceServerFieldConsentPolicy)
}

// SetAuthorizationDetails sets the AuthorizationDetails field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetAuthorizationDetails(authorizationDetails []interface{}) {
	r.AuthorizationDetails = authorizationDetails
	r.require(resourceServerFieldAuthorizationDetails)
}

// SetProofOfPossession sets the ProofOfPossession field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetProofOfPossession(proofOfPossession *ResourceServerProofOfPossession) {
	r.ProofOfPossession = proofOfPossession
	r.require(resourceServerFieldProofOfPossession)
}

// SetSubjectTypeAuthorization sets the SubjectTypeAuthorization field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetSubjectTypeAuthorization(subjectTypeAuthorization *ResourceServerSubjectTypeAuthorization) {
	r.SubjectTypeAuthorization = subjectTypeAuthorization
	r.require(resourceServerFieldSubjectTypeAuthorization)
}

// SetClientID sets the ClientID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServer) SetClientID(clientID *string) {
	r.ClientID = clientID
	r.require(resourceServerFieldClientID)
}

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

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

func (r *ResourceServer) 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)
}

type ResourceServerConsentPolicyEnum = *string

// Proof-of-Possession configuration for access tokens
var (
	resourceServerProofOfPossessionFieldMechanism = big.NewInt(1 << 0)
	resourceServerProofOfPossessionFieldRequired  = big.NewInt(1 << 1)
)

type ResourceServerProofOfPossession struct {
	Mechanism ResourceServerProofOfPossessionMechanismEnum `json:"mechanism" url:"mechanism"`
	// Whether the use of Proof-of-Possession is required for the resource server
	Required bool `json:"required" url:"required"`

	// 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 (r *ResourceServerProofOfPossession) GetMechanism() ResourceServerProofOfPossessionMechanismEnum {
	if r == nil {
		return ""
	}
	return r.Mechanism
}

func (r *ResourceServerProofOfPossession) GetRequired() bool {
	if r == nil {
		return false
	}
	return r.Required
}

func (r *ResourceServerProofOfPossession) GetExtraProperties() map[string]interface{} {
	return r.extraProperties
}

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

// SetMechanism sets the Mechanism field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServerProofOfPossession) SetMechanism(mechanism ResourceServerProofOfPossessionMechanismEnum) {
	r.Mechanism = mechanism
	r.require(resourceServerProofOfPossessionFieldMechanism)
}

// SetRequired sets the Required field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServerProofOfPossession) SetRequired(required bool) {
	r.Required = required
	r.require(resourceServerProofOfPossessionFieldRequired)
}

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

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

func (r *ResourceServerProofOfPossession) 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)
}

// Intended mechanism for Proof-of-Possession
type ResourceServerProofOfPossessionMechanismEnum string

const (
	ResourceServerProofOfPossessionMechanismEnumMtls ResourceServerProofOfPossessionMechanismEnum = "mtls"
	ResourceServerProofOfPossessionMechanismEnumDpop ResourceServerProofOfPossessionMechanismEnum = "dpop"
)

func NewResourceServerProofOfPossessionMechanismEnumFromString(s string) (ResourceServerProofOfPossessionMechanismEnum, error) {
	switch s {
	case "mtls":
		return ResourceServerProofOfPossessionMechanismEnumMtls, nil
	case "dpop":
		return ResourceServerProofOfPossessionMechanismEnumDpop, nil
	}
	var t ResourceServerProofOfPossessionMechanismEnum
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (r ResourceServerProofOfPossessionMechanismEnum) Ptr() *ResourceServerProofOfPossessionMechanismEnum {
	return &r
}

var (
	resourceServerScopeFieldValue       = big.NewInt(1 << 0)
	resourceServerScopeFieldDescription = big.NewInt(1 << 1)
)

type ResourceServerScope struct {
	// Value of this scope.
	Value string `json:"value" url:"value"`
	// User-friendly description of this scope.
	Description *string `json:"description,omitempty" url:"description,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 (r *ResourceServerScope) GetValue() string {
	if r == nil {
		return ""
	}
	return r.Value
}

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

func (r *ResourceServerScope) GetExtraProperties() map[string]interface{} {
	return r.extraProperties
}

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

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

// 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 (r *ResourceServerScope) SetDescription(description *string) {
	r.Description = description
	r.require(resourceServerScopeFieldDescription)
}

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

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

func (r *ResourceServerScope) 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)
}

// Defines application access permission for a resource server. Use of this field is subject to the applicable Free Trial terms in Okta’s <a href="https://www.okta.com/legal/"> Master Subscription Agreement.</a>
var (
	resourceServerSubjectTypeAuthorizationFieldUser   = big.NewInt(1 << 0)
	resourceServerSubjectTypeAuthorizationFieldClient = big.NewInt(1 << 1)
)

type ResourceServerSubjectTypeAuthorization struct {
	User   *ResourceServerSubjectTypeAuthorizationUser   `json:"user,omitempty" url:"user,omitempty"`
	Client *ResourceServerSubjectTypeAuthorizationClient `json:"client,omitempty" url:"client,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 (r *ResourceServerSubjectTypeAuthorization) GetUser() ResourceServerSubjectTypeAuthorizationUser {
	if r == nil || r.User == nil {
		return ResourceServerSubjectTypeAuthorizationUser{}
	}
	return *r.User
}

func (r *ResourceServerSubjectTypeAuthorization) GetClient() ResourceServerSubjectTypeAuthorizationClient {
	if r == nil || r.Client == nil {
		return ResourceServerSubjectTypeAuthorizationClient{}
	}
	return *r.Client
}

func (r *ResourceServerSubjectTypeAuthorization) GetExtraProperties() map[string]interface{} {
	return r.extraProperties
}

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

// SetUser sets the User field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServerSubjectTypeAuthorization) SetUser(user *ResourceServerSubjectTypeAuthorizationUser) {
	r.User = user
	r.require(resourceServerSubjectTypeAuthorizationFieldUser)
}

// SetClient sets the Client field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServerSubjectTypeAuthorization) SetClient(client *ResourceServerSubjectTypeAuthorizationClient) {
	r.Client = client
	r.require(resourceServerSubjectTypeAuthorizationFieldClient)
}

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

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

func (r *ResourceServerSubjectTypeAuthorization) 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)
}

// Access Permissions for client flows
var (
	resourceServerSubjectTypeAuthorizationClientFieldPolicy = big.NewInt(1 << 0)
)

type ResourceServerSubjectTypeAuthorizationClient struct {
	Policy *ResourceServerSubjectTypeAuthorizationClientPolicyEnum `json:"policy,omitempty" url:"policy,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 *ResourceServerSubjectTypeAuthorizationClient) GetPolicy() ResourceServerSubjectTypeAuthorizationClientPolicyEnum {
	if r == nil || r.Policy == nil {
		return ""
	}
	return *r.Policy
}

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

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

// SetPolicy sets the Policy field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServerSubjectTypeAuthorizationClient) SetPolicy(policy *ResourceServerSubjectTypeAuthorizationClientPolicyEnum) {
	r.Policy = policy
	r.require(resourceServerSubjectTypeAuthorizationClientFieldPolicy)
}

func (r *ResourceServerSubjectTypeAuthorizationClient) UnmarshalJSON(data []byte) error {
	type embed ResourceServerSubjectTypeAuthorizationClient
	var unmarshaler = struct {
		embed
	}{
		embed: embed(*r),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*r = ResourceServerSubjectTypeAuthorizationClient(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 *ResourceServerSubjectTypeAuthorizationClient) MarshalJSON() ([]byte, error) {
	type embed ResourceServerSubjectTypeAuthorizationClient
	var marshaler = struct {
		embed
	}{
		embed: embed(*r),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, r.explicitFields)
	return internal.MarshalJSONWithExtraProperties(explicitMarshaler, r.ExtraProperties)
}

func (r *ResourceServerSubjectTypeAuthorizationClient) 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)
}

// Defines the client flows policy for the resource server
type ResourceServerSubjectTypeAuthorizationClientPolicyEnum string

const (
	ResourceServerSubjectTypeAuthorizationClientPolicyEnumDenyAll            ResourceServerSubjectTypeAuthorizationClientPolicyEnum = "deny_all"
	ResourceServerSubjectTypeAuthorizationClientPolicyEnumRequireClientGrant ResourceServerSubjectTypeAuthorizationClientPolicyEnum = "require_client_grant"
)

func NewResourceServerSubjectTypeAuthorizationClientPolicyEnumFromString(s string) (ResourceServerSubjectTypeAuthorizationClientPolicyEnum, error) {
	switch s {
	case "deny_all":
		return ResourceServerSubjectTypeAuthorizationClientPolicyEnumDenyAll, nil
	case "require_client_grant":
		return ResourceServerSubjectTypeAuthorizationClientPolicyEnumRequireClientGrant, nil
	}
	var t ResourceServerSubjectTypeAuthorizationClientPolicyEnum
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (r ResourceServerSubjectTypeAuthorizationClientPolicyEnum) Ptr() *ResourceServerSubjectTypeAuthorizationClientPolicyEnum {
	return &r
}

// Access Permissions for user flows
var (
	resourceServerSubjectTypeAuthorizationUserFieldPolicy = big.NewInt(1 << 0)
)

type ResourceServerSubjectTypeAuthorizationUser struct {
	Policy *ResourceServerSubjectTypeAuthorizationUserPolicyEnum `json:"policy,omitempty" url:"policy,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 *ResourceServerSubjectTypeAuthorizationUser) GetPolicy() ResourceServerSubjectTypeAuthorizationUserPolicyEnum {
	if r == nil || r.Policy == nil {
		return ""
	}
	return *r.Policy
}

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

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

// SetPolicy sets the Policy field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServerSubjectTypeAuthorizationUser) SetPolicy(policy *ResourceServerSubjectTypeAuthorizationUserPolicyEnum) {
	r.Policy = policy
	r.require(resourceServerSubjectTypeAuthorizationUserFieldPolicy)
}

func (r *ResourceServerSubjectTypeAuthorizationUser) UnmarshalJSON(data []byte) error {
	type embed ResourceServerSubjectTypeAuthorizationUser
	var unmarshaler = struct {
		embed
	}{
		embed: embed(*r),
	}
	if err := json.Unmarshal(data, &unmarshaler); err != nil {
		return err
	}
	*r = ResourceServerSubjectTypeAuthorizationUser(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 *ResourceServerSubjectTypeAuthorizationUser) MarshalJSON() ([]byte, error) {
	type embed ResourceServerSubjectTypeAuthorizationUser
	var marshaler = struct {
		embed
	}{
		embed: embed(*r),
	}
	explicitMarshaler := internal.HandleExplicitFields(marshaler, r.explicitFields)
	return internal.MarshalJSONWithExtraProperties(explicitMarshaler, r.ExtraProperties)
}

func (r *ResourceServerSubjectTypeAuthorizationUser) 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)
}

// Defines the user flows policy for the resource server
type ResourceServerSubjectTypeAuthorizationUserPolicyEnum string

const (
	ResourceServerSubjectTypeAuthorizationUserPolicyEnumAllowAll           ResourceServerSubjectTypeAuthorizationUserPolicyEnum = "allow_all"
	ResourceServerSubjectTypeAuthorizationUserPolicyEnumDenyAll            ResourceServerSubjectTypeAuthorizationUserPolicyEnum = "deny_all"
	ResourceServerSubjectTypeAuthorizationUserPolicyEnumRequireClientGrant ResourceServerSubjectTypeAuthorizationUserPolicyEnum = "require_client_grant"
)

func NewResourceServerSubjectTypeAuthorizationUserPolicyEnumFromString(s string) (ResourceServerSubjectTypeAuthorizationUserPolicyEnum, error) {
	switch s {
	case "allow_all":
		return ResourceServerSubjectTypeAuthorizationUserPolicyEnumAllowAll, nil
	case "deny_all":
		return ResourceServerSubjectTypeAuthorizationUserPolicyEnumDenyAll, nil
	case "require_client_grant":
		return ResourceServerSubjectTypeAuthorizationUserPolicyEnumRequireClientGrant, nil
	}
	var t ResourceServerSubjectTypeAuthorizationUserPolicyEnum
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (r ResourceServerSubjectTypeAuthorizationUserPolicyEnum) Ptr() *ResourceServerSubjectTypeAuthorizationUserPolicyEnum {
	return &r
}

// Dialect of access tokens that should be issued. `access_token` is a JWT containing standard Auth0 claims; `rfc9068_profile` is a JWT conforming to the IETF JWT Access Token Profile. `access_token_authz` and `rfc9068_profile_authz` additionally include RBAC permissions claims.
type ResourceServerTokenDialectResponseEnum string

const (
	ResourceServerTokenDialectResponseEnumAccessToken         ResourceServerTokenDialectResponseEnum = "access_token"
	ResourceServerTokenDialectResponseEnumAccessTokenAuthz    ResourceServerTokenDialectResponseEnum = "access_token_authz"
	ResourceServerTokenDialectResponseEnumRfc9068Profile      ResourceServerTokenDialectResponseEnum = "rfc9068_profile"
	ResourceServerTokenDialectResponseEnumRfc9068ProfileAuthz ResourceServerTokenDialectResponseEnum = "rfc9068_profile_authz"
)

func NewResourceServerTokenDialectResponseEnumFromString(s string) (ResourceServerTokenDialectResponseEnum, error) {
	switch s {
	case "access_token":
		return ResourceServerTokenDialectResponseEnumAccessToken, nil
	case "access_token_authz":
		return ResourceServerTokenDialectResponseEnumAccessTokenAuthz, nil
	case "rfc9068_profile":
		return ResourceServerTokenDialectResponseEnumRfc9068Profile, nil
	case "rfc9068_profile_authz":
		return ResourceServerTokenDialectResponseEnumRfc9068ProfileAuthz, nil
	}
	var t ResourceServerTokenDialectResponseEnum
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (r ResourceServerTokenDialectResponseEnum) Ptr() *ResourceServerTokenDialectResponseEnum {
	return &r
}

// Dialect of issued access token. `access_token` is a JWT containing standard Auth0 claims; `rfc9068_profile` is a JWT conforming to the IETF JWT Access Token Profile. `access_token_authz` and `rfc9068_profile_authz` additionally include RBAC permissions claims.
type ResourceServerTokenDialectSchemaEnum string

const (
	ResourceServerTokenDialectSchemaEnumAccessToken         ResourceServerTokenDialectSchemaEnum = "access_token"
	ResourceServerTokenDialectSchemaEnumAccessTokenAuthz    ResourceServerTokenDialectSchemaEnum = "access_token_authz"
	ResourceServerTokenDialectSchemaEnumRfc9068Profile      ResourceServerTokenDialectSchemaEnum = "rfc9068_profile"
	ResourceServerTokenDialectSchemaEnumRfc9068ProfileAuthz ResourceServerTokenDialectSchemaEnum = "rfc9068_profile_authz"
)

func NewResourceServerTokenDialectSchemaEnumFromString(s string) (ResourceServerTokenDialectSchemaEnum, error) {
	switch s {
	case "access_token":
		return ResourceServerTokenDialectSchemaEnumAccessToken, nil
	case "access_token_authz":
		return ResourceServerTokenDialectSchemaEnumAccessTokenAuthz, nil
	case "rfc9068_profile":
		return ResourceServerTokenDialectSchemaEnumRfc9068Profile, nil
	case "rfc9068_profile_authz":
		return ResourceServerTokenDialectSchemaEnumRfc9068ProfileAuthz, nil
	}
	var t ResourceServerTokenDialectSchemaEnum
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (r ResourceServerTokenDialectSchemaEnum) Ptr() *ResourceServerTokenDialectSchemaEnum {
	return &r
}

var (
	resourceServerTokenEncryptionFieldFormat        = big.NewInt(1 << 0)
	resourceServerTokenEncryptionFieldEncryptionKey = big.NewInt(1 << 1)
)

type ResourceServerTokenEncryption struct {
	Format        ResourceServerTokenEncryptionFormatEnum `json:"format" url:"format"`
	EncryptionKey *ResourceServerTokenEncryptionKey       `json:"encryption_key" url:"encryption_key"`

	// 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 (r *ResourceServerTokenEncryption) GetEncryptionKey() *ResourceServerTokenEncryptionKey {
	if r == nil {
		return nil
	}
	return r.EncryptionKey
}

func (r *ResourceServerTokenEncryption) GetExtraProperties() map[string]interface{} {
	return r.extraProperties
}

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

// SetFormat sets the Format field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServerTokenEncryption) SetFormat(format ResourceServerTokenEncryptionFormatEnum) {
	r.Format = format
	r.require(resourceServerTokenEncryptionFieldFormat)
}

// SetEncryptionKey sets the EncryptionKey field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServerTokenEncryption) SetEncryptionKey(encryptionKey *ResourceServerTokenEncryptionKey) {
	r.EncryptionKey = encryptionKey
	r.require(resourceServerTokenEncryptionFieldEncryptionKey)
}

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

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

func (r *ResourceServerTokenEncryption) 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)
}

// Algorithm used to encrypt the token.
type ResourceServerTokenEncryptionAlgorithmEnum string

const (
	ResourceServerTokenEncryptionAlgorithmEnumRsaOaep256 ResourceServerTokenEncryptionAlgorithmEnum = "RSA-OAEP-256"
	ResourceServerTokenEncryptionAlgorithmEnumRsaOaep384 ResourceServerTokenEncryptionAlgorithmEnum = "RSA-OAEP-384"
	ResourceServerTokenEncryptionAlgorithmEnumRsaOaep512 ResourceServerTokenEncryptionAlgorithmEnum = "RSA-OAEP-512"
)

func NewResourceServerTokenEncryptionAlgorithmEnumFromString(s string) (ResourceServerTokenEncryptionAlgorithmEnum, error) {
	switch s {
	case "RSA-OAEP-256":
		return ResourceServerTokenEncryptionAlgorithmEnumRsaOaep256, nil
	case "RSA-OAEP-384":
		return ResourceServerTokenEncryptionAlgorithmEnumRsaOaep384, nil
	case "RSA-OAEP-512":
		return ResourceServerTokenEncryptionAlgorithmEnumRsaOaep512, nil
	}
	var t ResourceServerTokenEncryptionAlgorithmEnum
	return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (r ResourceServerTokenEncryptionAlgorithmEnum) Ptr() *ResourceServerTokenEncryptionAlgorithmEnum {
	return &r
}

// Format of the encrypted JWT payload.
type ResourceServerTokenEncryptionFormatEnum = string

var (
	resourceServerTokenEncryptionKeyFieldName = big.NewInt(1 << 0)
	resourceServerTokenEncryptionKeyFieldAlg  = big.NewInt(1 << 1)
	resourceServerTokenEncryptionKeyFieldKid  = big.NewInt(1 << 2)
	resourceServerTokenEncryptionKeyFieldPem  = big.NewInt(1 << 3)
)

type ResourceServerTokenEncryptionKey struct {
	// Name of the encryption key.
	Name *string                                    `json:"name,omitempty" url:"name,omitempty"`
	Alg  ResourceServerTokenEncryptionAlgorithmEnum `json:"alg" url:"alg"`
	// Key ID.
	Kid *string `json:"kid,omitempty" url:"kid,omitempty"`
	// PEM-formatted public key. Must be JSON escaped.
	Pem string `json:"pem" url:"pem"`

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

func (r *ResourceServerTokenEncryptionKey) GetAlg() ResourceServerTokenEncryptionAlgorithmEnum {
	if r == nil {
		return ""
	}
	return r.Alg
}

func (r *ResourceServerTokenEncryptionKey) GetKid() string {
	if r == nil || r.Kid == nil {
		return ""
	}
	return *r.Kid
}

func (r *ResourceServerTokenEncryptionKey) GetPem() string {
	if r == nil {
		return ""
	}
	return r.Pem
}

func (r *ResourceServerTokenEncryptionKey) GetExtraProperties() map[string]interface{} {
	return r.extraProperties
}

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

// SetAlg sets the Alg field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServerTokenEncryptionKey) SetAlg(alg ResourceServerTokenEncryptionAlgorithmEnum) {
	r.Alg = alg
	r.require(resourceServerTokenEncryptionKeyFieldAlg)
}

// SetKid sets the Kid field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServerTokenEncryptionKey) SetKid(kid *string) {
	r.Kid = kid
	r.require(resourceServerTokenEncryptionKeyFieldKid)
}

// SetPem sets the Pem field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (r *ResourceServerTokenEncryptionKey) SetPem(pem string) {
	r.Pem = pem
	r.require(resourceServerTokenEncryptionKeyFieldPem)
}

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

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

func (r *ResourceServerTokenEncryptionKey) 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)
}

var (
	updateResourceServerResponseContentFieldID                                        = big.NewInt(1 << 0)
	updateResourceServerResponseContentFieldName                                      = big.NewInt(1 << 1)
	updateResourceServerResponseContentFieldIsSystem                                  = big.NewInt(1 << 2)
	updateResourceServerResponseContentFieldIdentifier                                = big.NewInt(1 << 3)
	updateResourceServerResponseContentFieldScopes                                    = big.NewInt(1 << 4)
	updateResourceServerResponseContentFieldSigningAlg                                = big.NewInt(1 << 5)
	updateResourceServerResponseContentFieldSigningSecret                             = big.NewInt(1 << 6)
	updateResourceServerResponseContentFieldAllowOfflineAccess                        = big.NewInt(1 << 7)
	updateResourceServerResponseContentFieldSkipConsentForVerifiableFirstPartyClients = big.NewInt(1 << 8)
	updateResourceServerResponseContentFieldTokenLifetime                             = big.NewInt(1 << 9)
	updateResourceServerResponseContentFieldTokenLifetimeForWeb                       = big.NewInt(1 << 10)
	updateResourceServerResponseContentFieldEnforcePolicies                           = big.NewInt(1 << 11)
	updateResourceServerResponseContentFieldTokenDialect                              = big.NewInt(1 << 12)
	updateResourceServerResponseContentFieldTokenEncryption                           = big.NewInt(1 << 13)
	updateResourceServerResponseContentFieldConsentPolicy                             = big.NewInt(1 << 14)
	updateResourceServerResponseContentFieldAuthorizationDetails                      = big.NewInt(1 << 15)
	updateResourceServerResponseContentFieldProofOfPossession                         = big.NewInt(1 << 16)
	updateResourceServerResponseContentFieldSubjectTypeAuthorization                  = big.NewInt(1 << 17)
	updateResourceServerResponseContentFieldClientID                                  = big.NewInt(1 << 18)
)

type UpdateResourceServerResponseContent struct {
	// ID of the API (resource server).
	ID *string `json:"id,omitempty" url:"id,omitempty"`
	// Friendly name for this resource server. Can not contain `<` or `>` characters.
	Name *string `json:"name,omitempty" url:"name,omitempty"`
	// Whether this is an Auth0 system API (true) or a custom API (false).
	IsSystem *bool `json:"is_system,omitempty" url:"is_system,omitempty"`
	// Unique identifier for the API used as the audience parameter on authorization calls. Can not be changed once set.
	Identifier *string `json:"identifier,omitempty" url:"identifier,omitempty"`
	// List of permissions (scopes) that this API uses.
	Scopes     []*ResourceServerScope `json:"scopes,omitempty" url:"scopes,omitempty"`
	SigningAlg *SigningAlgorithmEnum  `json:"signing_alg,omitempty" url:"signing_alg,omitempty"`
	// Secret used to sign tokens when using symmetric algorithms (HS256).
	SigningSecret *string `json:"signing_secret,omitempty" url:"signing_secret,omitempty"`
	// Whether refresh tokens can be issued for this API (true) or not (false).
	AllowOfflineAccess *bool `json:"allow_offline_access,omitempty" url:"allow_offline_access,omitempty"`
	// Whether to skip user consent for applications flagged as first party (true) or not (false).
	SkipConsentForVerifiableFirstPartyClients *bool `json:"skip_consent_for_verifiable_first_party_clients,omitempty" url:"skip_consent_for_verifiable_first_party_clients,omitempty"`
	// Expiration value (in seconds) for access tokens issued for this API from the token endpoint.
	TokenLifetime *int `json:"token_lifetime,omitempty" url:"token_lifetime,omitempty"`
	// Expiration value (in seconds) for access tokens issued for this API via Implicit or Hybrid Flows. Cannot be greater than the `token_lifetime` value.
	TokenLifetimeForWeb *int `json:"token_lifetime_for_web,omitempty" url:"token_lifetime_for_web,omitempty"`
	// Whether authorization polices are enforced (true) or unenforced (false).
	EnforcePolicies          *bool                                   `json:"enforce_policies,omitempty" url:"enforce_policies,omitempty"`
	TokenDialect             *ResourceServerTokenDialectResponseEnum `json:"token_dialect,omitempty" url:"token_dialect,omitempty"`
	TokenEncryption          *ResourceServerTokenEncryption          `json:"token_encryption,omitempty" url:"token_encryption,omitempty"`
	ConsentPolicy            *ResourceServerConsentPolicyEnum        `json:"consent_policy,omitempty" url:"consent_policy,omitempty"`
	AuthorizationDetails     []interface{}                           `json:"authorization_details,omitempty" url:"authorization_details,omitempty"`
	ProofOfPossession        *ResourceServerProofOfPossession        `json:"proof_of_possession,omitempty" url:"proof_of_possession,omitempty"`
	SubjectTypeAuthorization *ResourceServerSubjectTypeAuthorization `json:"subject_type_authorization,omitempty" url:"subject_type_authorization,omitempty"`
	// The client ID of the client that this resource server is linked to
	ClientID *string `json:"client_id,omitempty" url:"client_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 *UpdateResourceServerResponseContent) GetID() string {
	if u == nil || u.ID == nil {
		return ""
	}
	return *u.ID
}

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

func (u *UpdateResourceServerResponseContent) GetIsSystem() bool {
	if u == nil || u.IsSystem == nil {
		return false
	}
	return *u.IsSystem
}

func (u *UpdateResourceServerResponseContent) GetIdentifier() string {
	if u == nil || u.Identifier == nil {
		return ""
	}
	return *u.Identifier
}

func (u *UpdateResourceServerResponseContent) GetScopes() []*ResourceServerScope {
	if u == nil || u.Scopes == nil {
		return nil
	}
	return u.Scopes
}

func (u *UpdateResourceServerResponseContent) GetSigningAlg() SigningAlgorithmEnum {
	if u == nil || u.SigningAlg == nil {
		return ""
	}
	return *u.SigningAlg
}

func (u *UpdateResourceServerResponseContent) GetSigningSecret() string {
	if u == nil || u.SigningSecret == nil {
		return ""
	}
	return *u.SigningSecret
}

func (u *UpdateResourceServerResponseContent) GetAllowOfflineAccess() bool {
	if u == nil || u.AllowOfflineAccess == nil {
		return false
	}
	return *u.AllowOfflineAccess
}

func (u *UpdateResourceServerResponseContent) GetSkipConsentForVerifiableFirstPartyClients() bool {
	if u == nil || u.SkipConsentForVerifiableFirstPartyClients == nil {
		return false
	}
	return *u.SkipConsentForVerifiableFirstPartyClients
}

func (u *UpdateResourceServerResponseContent) GetTokenLifetime() int {
	if u == nil || u.TokenLifetime == nil {
		return 0
	}
	return *u.TokenLifetime
}

func (u *UpdateResourceServerResponseContent) GetTokenLifetimeForWeb() int {
	if u == nil || u.TokenLifetimeForWeb == nil {
		return 0
	}
	return *u.TokenLifetimeForWeb
}

func (u *UpdateResourceServerResponseContent) GetEnforcePolicies() bool {
	if u == nil || u.EnforcePolicies == nil {
		return false
	}
	return *u.EnforcePolicies
}

func (u *UpdateResourceServerResponseContent) GetTokenDialect() ResourceServerTokenDialectResponseEnum {
	if u == nil || u.TokenDialect == nil {
		return ""
	}
	return *u.TokenDialect
}

func (u *UpdateResourceServerResponseContent) GetTokenEncryption() ResourceServerTokenEncryption {
	if u == nil || u.TokenEncryption == nil {
		return ResourceServerTokenEncryption{}
	}
	return *u.TokenEncryption
}

func (u *UpdateResourceServerResponseContent) GetAuthorizationDetails() []interface{} {
	if u == nil || u.AuthorizationDetails == nil {
		return nil
	}
	return u.AuthorizationDetails
}

func (u *UpdateResourceServerResponseContent) GetProofOfPossession() ResourceServerProofOfPossession {
	if u == nil || u.ProofOfPossession == nil {
		return ResourceServerProofOfPossession{}
	}
	return *u.ProofOfPossession
}

func (u *UpdateResourceServerResponseContent) GetSubjectTypeAuthorization() ResourceServerSubjectTypeAuthorization {
	if u == nil || u.SubjectTypeAuthorization == nil {
		return ResourceServerSubjectTypeAuthorization{}
	}
	return *u.SubjectTypeAuthorization
}

func (u *UpdateResourceServerResponseContent) GetClientID() string {
	if u == nil || u.ClientID == nil {
		return ""
	}
	return *u.ClientID
}

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

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

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

// SetIsSystem sets the IsSystem field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetIsSystem(isSystem *bool) {
	u.IsSystem = isSystem
	u.require(updateResourceServerResponseContentFieldIsSystem)
}

// SetIdentifier sets the Identifier field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetIdentifier(identifier *string) {
	u.Identifier = identifier
	u.require(updateResourceServerResponseContentFieldIdentifier)
}

// SetScopes sets the Scopes field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetScopes(scopes []*ResourceServerScope) {
	u.Scopes = scopes
	u.require(updateResourceServerResponseContentFieldScopes)
}

// SetSigningAlg sets the SigningAlg field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetSigningAlg(signingAlg *SigningAlgorithmEnum) {
	u.SigningAlg = signingAlg
	u.require(updateResourceServerResponseContentFieldSigningAlg)
}

// SetSigningSecret sets the SigningSecret field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetSigningSecret(signingSecret *string) {
	u.SigningSecret = signingSecret
	u.require(updateResourceServerResponseContentFieldSigningSecret)
}

// SetAllowOfflineAccess sets the AllowOfflineAccess field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetAllowOfflineAccess(allowOfflineAccess *bool) {
	u.AllowOfflineAccess = allowOfflineAccess
	u.require(updateResourceServerResponseContentFieldAllowOfflineAccess)
}

// SetSkipConsentForVerifiableFirstPartyClients sets the SkipConsentForVerifiableFirstPartyClients field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetSkipConsentForVerifiableFirstPartyClients(skipConsentForVerifiableFirstPartyClients *bool) {
	u.SkipConsentForVerifiableFirstPartyClients = skipConsentForVerifiableFirstPartyClients
	u.require(updateResourceServerResponseContentFieldSkipConsentForVerifiableFirstPartyClients)
}

// SetTokenLifetime sets the TokenLifetime field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetTokenLifetime(tokenLifetime *int) {
	u.TokenLifetime = tokenLifetime
	u.require(updateResourceServerResponseContentFieldTokenLifetime)
}

// SetTokenLifetimeForWeb sets the TokenLifetimeForWeb field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetTokenLifetimeForWeb(tokenLifetimeForWeb *int) {
	u.TokenLifetimeForWeb = tokenLifetimeForWeb
	u.require(updateResourceServerResponseContentFieldTokenLifetimeForWeb)
}

// SetEnforcePolicies sets the EnforcePolicies field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetEnforcePolicies(enforcePolicies *bool) {
	u.EnforcePolicies = enforcePolicies
	u.require(updateResourceServerResponseContentFieldEnforcePolicies)
}

// SetTokenDialect sets the TokenDialect field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetTokenDialect(tokenDialect *ResourceServerTokenDialectResponseEnum) {
	u.TokenDialect = tokenDialect
	u.require(updateResourceServerResponseContentFieldTokenDialect)
}

// SetTokenEncryption sets the TokenEncryption field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetTokenEncryption(tokenEncryption *ResourceServerTokenEncryption) {
	u.TokenEncryption = tokenEncryption
	u.require(updateResourceServerResponseContentFieldTokenEncryption)
}

// SetConsentPolicy sets the ConsentPolicy field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetConsentPolicy(consentPolicy *ResourceServerConsentPolicyEnum) {
	u.ConsentPolicy = consentPolicy
	u.require(updateResourceServerResponseContentFieldConsentPolicy)
}

// SetAuthorizationDetails sets the AuthorizationDetails field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetAuthorizationDetails(authorizationDetails []interface{}) {
	u.AuthorizationDetails = authorizationDetails
	u.require(updateResourceServerResponseContentFieldAuthorizationDetails)
}

// SetProofOfPossession sets the ProofOfPossession field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetProofOfPossession(proofOfPossession *ResourceServerProofOfPossession) {
	u.ProofOfPossession = proofOfPossession
	u.require(updateResourceServerResponseContentFieldProofOfPossession)
}

// SetSubjectTypeAuthorization sets the SubjectTypeAuthorization field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetSubjectTypeAuthorization(subjectTypeAuthorization *ResourceServerSubjectTypeAuthorization) {
	u.SubjectTypeAuthorization = subjectTypeAuthorization
	u.require(updateResourceServerResponseContentFieldSubjectTypeAuthorization)
}

// SetClientID sets the ClientID field and marks it as non-optional;
// this prevents an empty or null value for this field from being omitted during serialization.
func (u *UpdateResourceServerResponseContent) SetClientID(clientID *string) {
	u.ClientID = clientID
	u.require(updateResourceServerResponseContentFieldClientID)
}

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

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

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