// 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 hashicorp cloud global network manager 20220215 cluster state
//
// 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"
)

// 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"]`), &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
}
