// 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"
)

// HashicorpCloudGlobalNetworkManager20220215TokenValidityStatus TokenValidityStatus is a token's validity status
//
// - TOKEN_VALIDITY_STATUS_UNSPECIFIED: Token's validity is unspecified. This includes when CCM is unable to
// successfully request token information from Consul to do the validation
//   - TOKEN_VALIDITY_STATUS_NOT_APPLICABLE: Token validity is not applicable when requesting a token that we do not
//
// support validation
//   - TOKEN_VALIDITY_STATUS_VALID: Token is valid
//   - TOKEN_VALIDITY_STATUS_INVALID: Token is invalid
//
// swagger:model hashicorp.cloud.global_network_manager_20220215.TokenValidityStatus
type HashicorpCloudGlobalNetworkManager20220215TokenValidityStatus string

func NewHashicorpCloudGlobalNetworkManager20220215TokenValidityStatus(value HashicorpCloudGlobalNetworkManager20220215TokenValidityStatus) *HashicorpCloudGlobalNetworkManager20220215TokenValidityStatus {
	return &value
}

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

const (

	// HashicorpCloudGlobalNetworkManager20220215TokenValidityStatusTOKENVALIDITYSTATUSUNSPECIFIED captures enum value "TOKEN_VALIDITY_STATUS_UNSPECIFIED"
	HashicorpCloudGlobalNetworkManager20220215TokenValidityStatusTOKENVALIDITYSTATUSUNSPECIFIED HashicorpCloudGlobalNetworkManager20220215TokenValidityStatus = "TOKEN_VALIDITY_STATUS_UNSPECIFIED"

	// HashicorpCloudGlobalNetworkManager20220215TokenValidityStatusTOKENVALIDITYSTATUSNOTAPPLICABLE captures enum value "TOKEN_VALIDITY_STATUS_NOT_APPLICABLE"
	HashicorpCloudGlobalNetworkManager20220215TokenValidityStatusTOKENVALIDITYSTATUSNOTAPPLICABLE HashicorpCloudGlobalNetworkManager20220215TokenValidityStatus = "TOKEN_VALIDITY_STATUS_NOT_APPLICABLE"

	// HashicorpCloudGlobalNetworkManager20220215TokenValidityStatusTOKENVALIDITYSTATUSVALID captures enum value "TOKEN_VALIDITY_STATUS_VALID"
	HashicorpCloudGlobalNetworkManager20220215TokenValidityStatusTOKENVALIDITYSTATUSVALID HashicorpCloudGlobalNetworkManager20220215TokenValidityStatus = "TOKEN_VALIDITY_STATUS_VALID"

	// HashicorpCloudGlobalNetworkManager20220215TokenValidityStatusTOKENVALIDITYSTATUSINVALID captures enum value "TOKEN_VALIDITY_STATUS_INVALID"
	HashicorpCloudGlobalNetworkManager20220215TokenValidityStatusTOKENVALIDITYSTATUSINVALID HashicorpCloudGlobalNetworkManager20220215TokenValidityStatus = "TOKEN_VALIDITY_STATUS_INVALID"
)

// for schema
var hashicorpCloudGlobalNetworkManager20220215TokenValidityStatusEnum []interface{}

func init() {
	var res []HashicorpCloudGlobalNetworkManager20220215TokenValidityStatus
	if err := json.Unmarshal([]byte(`["TOKEN_VALIDITY_STATUS_UNSPECIFIED","TOKEN_VALIDITY_STATUS_NOT_APPLICABLE","TOKEN_VALIDITY_STATUS_VALID","TOKEN_VALIDITY_STATUS_INVALID"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudGlobalNetworkManager20220215TokenValidityStatusEnum = append(hashicorpCloudGlobalNetworkManager20220215TokenValidityStatusEnum, v)
	}
}

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

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

	// value enum
	if err := m.validateHashicorpCloudGlobalNetworkManager20220215TokenValidityStatusEnum("", "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 validity status based on context it is used
func (m HashicorpCloudGlobalNetworkManager20220215TokenValidityStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
