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

// HashicorpCloudGlobalNetworkManager20220215ClusterState  - STATE_UPDATING: UPDATING should remain the default and generically used state.
// If no custom status required, people should stick with UPDATING
// rather than proliferating UPDATING_* without an explicit need
//   - STATE_UPDATING_TOKEN: UPDATING_TOKEN is an edge-case of UPDATING intended to be used so
//
// that frontend can display a custom status for it.
//   - STATE_UPDATING_ACCESS_LEVEL: STATE_UPDATING_ACCESS_LEVEL is an edge-case of UPDATING intended to be
//
// used so that frontend can display a custom status for it.
//
// swagger:model hashicorp.cloud.global_network_manager_20220215.Cluster.State
type HashicorpCloudGlobalNetworkManager20220215ClusterState string

func NewHashicorpCloudGlobalNetworkManager20220215ClusterState(value HashicorpCloudGlobalNetworkManager20220215ClusterState) *HashicorpCloudGlobalNetworkManager20220215ClusterState {
	return &value
}

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

const (

	// HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEUNSPECIFIED captures enum value "STATE_UNSPECIFIED"
	HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEUNSPECIFIED HashicorpCloudGlobalNetworkManager20220215ClusterState = "STATE_UNSPECIFIED"

	// HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEPENDING captures enum value "STATE_PENDING"
	HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEPENDING HashicorpCloudGlobalNetworkManager20220215ClusterState = "STATE_PENDING"

	// HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATECREATING captures enum value "STATE_CREATING"
	HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATECREATING HashicorpCloudGlobalNetworkManager20220215ClusterState = "STATE_CREATING"

	// HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATERUNNING captures enum value "STATE_RUNNING"
	HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATERUNNING HashicorpCloudGlobalNetworkManager20220215ClusterState = "STATE_RUNNING"

	// HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEFAILED captures enum value "STATE_FAILED"
	HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEFAILED HashicorpCloudGlobalNetworkManager20220215ClusterState = "STATE_FAILED"

	// HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEUPDATING captures enum value "STATE_UPDATING"
	HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEUPDATING HashicorpCloudGlobalNetworkManager20220215ClusterState = "STATE_UPDATING"

	// HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATERESTORING captures enum value "STATE_RESTORING"
	HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATERESTORING HashicorpCloudGlobalNetworkManager20220215ClusterState = "STATE_RESTORING"

	// HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEDELETING captures enum value "STATE_DELETING"
	HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEDELETING HashicorpCloudGlobalNetworkManager20220215ClusterState = "STATE_DELETING"

	// HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEDELETED captures enum value "STATE_DELETED"
	HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEDELETED HashicorpCloudGlobalNetworkManager20220215ClusterState = "STATE_DELETED"

	// HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEDISCONNECTED captures enum value "STATE_DISCONNECTED"
	HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEDISCONNECTED HashicorpCloudGlobalNetworkManager20220215ClusterState = "STATE_DISCONNECTED"

	// HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEUPDATINGTOKEN captures enum value "STATE_UPDATING_TOKEN"
	HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEUPDATINGTOKEN HashicorpCloudGlobalNetworkManager20220215ClusterState = "STATE_UPDATING_TOKEN"

	// HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEPENDINGINVALIDTOKEN captures enum value "STATE_PENDING_INVALID_TOKEN"
	HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEPENDINGINVALIDTOKEN HashicorpCloudGlobalNetworkManager20220215ClusterState = "STATE_PENDING_INVALID_TOKEN"

	// HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEDISCONNECTEDINVALIDTOKEN captures enum value "STATE_DISCONNECTED_INVALID_TOKEN"
	HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEDISCONNECTEDINVALIDTOKEN HashicorpCloudGlobalNetworkManager20220215ClusterState = "STATE_DISCONNECTED_INVALID_TOKEN"

	// HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEUPDATINGACCESSLEVEL captures enum value "STATE_UPDATING_ACCESS_LEVEL"
	HashicorpCloudGlobalNetworkManager20220215ClusterStateSTATEUPDATINGACCESSLEVEL HashicorpCloudGlobalNetworkManager20220215ClusterState = "STATE_UPDATING_ACCESS_LEVEL"
)

// for schema
var hashicorpCloudGlobalNetworkManager20220215ClusterStateEnum []interface{}

func init() {
	var res []HashicorpCloudGlobalNetworkManager20220215ClusterState
	if err := json.Unmarshal([]byte(`["STATE_UNSPECIFIED","STATE_PENDING","STATE_CREATING","STATE_RUNNING","STATE_FAILED","STATE_UPDATING","STATE_RESTORING","STATE_DELETING","STATE_DELETED","STATE_DISCONNECTED","STATE_UPDATING_TOKEN","STATE_PENDING_INVALID_TOKEN","STATE_DISCONNECTED_INVALID_TOKEN","STATE_UPDATING_ACCESS_LEVEL"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudGlobalNetworkManager20220215ClusterStateEnum = append(hashicorpCloudGlobalNetworkManager20220215ClusterStateEnum, v)
	}
}

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

// Validate validates this hashicorp cloud global network manager 20220215 cluster state
func (m HashicorpCloudGlobalNetworkManager20220215ClusterState) Validate(formats strfmt.Registry) error {
	var res []error

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