// Code generated by go-swagger; DO NOT EDIT.

package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"context"
	"encoding/json"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/validate"
)

// HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason TokenInvalidReason provides the reason why a token is invalid
//
// - TOKEN_INVALID_REASON_UNSPECIFIED: Token's invalid reason is unspecified because token is not invalid
//   - TOKEN_INVALID_REASON_DOES_NOT_EXIST: Token is invalid because it does not exist. Expired tokens are deleted
//
// and therefore do not exist
//   - TOKEN_INVALID_REASON_NO_POLICIES: Token is invalid because no policies are applied to it
//   - TOKEN_INVALID_REASON_MULTIPLE_POLICIES: Token is invalid because it has more than one policy applied to it
//   - TOKEN_INVALID_REASON_INCORRECT_POLICY: Token is invalid because it does not have the expected policy applied to it
//   - TOKEN_INVALID_REASON_ACLS_NOT_BOOTSTRAPPED: Token is invalid because the ACL system has not been bootstrapped
//
// swagger:model hashicorp.cloud.global_network_manager_20220215.TokenInvalidReason
type HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason string

func NewHashicorpCloudGlobalNetworkManager20220215TokenInvalidReason(value HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason) *HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason {
	return &value
}

// Pointer returns a pointer to a freshly-allocated HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason.
func (m HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason) Pointer() *HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason {
	return &m
}

const (

	// HashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonTOKENINVALIDREASONUNSPECIFIED captures enum value "TOKEN_INVALID_REASON_UNSPECIFIED"
	HashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonTOKENINVALIDREASONUNSPECIFIED HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason = "TOKEN_INVALID_REASON_UNSPECIFIED"

	// HashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonTOKENINVALIDREASONDOESNOTEXIST captures enum value "TOKEN_INVALID_REASON_DOES_NOT_EXIST"
	HashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonTOKENINVALIDREASONDOESNOTEXIST HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason = "TOKEN_INVALID_REASON_DOES_NOT_EXIST"

	// HashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonTOKENINVALIDREASONNOPOLICIES captures enum value "TOKEN_INVALID_REASON_NO_POLICIES"
	HashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonTOKENINVALIDREASONNOPOLICIES HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason = "TOKEN_INVALID_REASON_NO_POLICIES"

	// HashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonTOKENINVALIDREASONMULTIPLEPOLICIES captures enum value "TOKEN_INVALID_REASON_MULTIPLE_POLICIES"
	HashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonTOKENINVALIDREASONMULTIPLEPOLICIES HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason = "TOKEN_INVALID_REASON_MULTIPLE_POLICIES"

	// HashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonTOKENINVALIDREASONINCORRECTPOLICY captures enum value "TOKEN_INVALID_REASON_INCORRECT_POLICY"
	HashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonTOKENINVALIDREASONINCORRECTPOLICY HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason = "TOKEN_INVALID_REASON_INCORRECT_POLICY"

	// HashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonTOKENINVALIDREASONACLSNOTBOOTSTRAPPED captures enum value "TOKEN_INVALID_REASON_ACLS_NOT_BOOTSTRAPPED"
	HashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonTOKENINVALIDREASONACLSNOTBOOTSTRAPPED HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason = "TOKEN_INVALID_REASON_ACLS_NOT_BOOTSTRAPPED"
)

// for schema
var hashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonEnum []interface{}

func init() {
	var res []HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason
	if err := json.Unmarshal([]byte(`["TOKEN_INVALID_REASON_UNSPECIFIED","TOKEN_INVALID_REASON_DOES_NOT_EXIST","TOKEN_INVALID_REASON_NO_POLICIES","TOKEN_INVALID_REASON_MULTIPLE_POLICIES","TOKEN_INVALID_REASON_INCORRECT_POLICY","TOKEN_INVALID_REASON_ACLS_NOT_BOOTSTRAPPED"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonEnum = append(hashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonEnum, v)
	}
}

func (m HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason) validateHashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonEnum(path, location string, value HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason) error {
	if err := validate.EnumCase(path, location, value, hashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonEnum, true); err != nil {
		return err
	}
	return nil
}

// Validate validates this hashicorp cloud global network manager 20220215 token invalid reason
func (m HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason) Validate(formats strfmt.Registry) error {
	var res []error

	// value enum
	if err := m.validateHashicorpCloudGlobalNetworkManager20220215TokenInvalidReasonEnum("", "body", m); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

// ContextValidate validates this hashicorp cloud global network manager 20220215 token invalid reason based on context it is used
func (m HashicorpCloudGlobalNetworkManager20220215TokenInvalidReason) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
