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

// HashicorpCloudGlobalNetworkManager20220215PeerState PeerState is the state of the peering connection
//
// swagger:model hashicorp.cloud.global_network_manager_20220215.PeerState
type HashicorpCloudGlobalNetworkManager20220215PeerState string

func NewHashicorpCloudGlobalNetworkManager20220215PeerState(value HashicorpCloudGlobalNetworkManager20220215PeerState) *HashicorpCloudGlobalNetworkManager20220215PeerState {
	return &value
}

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

const (

	// HashicorpCloudGlobalNetworkManager20220215PeerStateUNDEFINED captures enum value "UNDEFINED"
	HashicorpCloudGlobalNetworkManager20220215PeerStateUNDEFINED HashicorpCloudGlobalNetworkManager20220215PeerState = "UNDEFINED"

	// HashicorpCloudGlobalNetworkManager20220215PeerStatePENDING captures enum value "PENDING"
	HashicorpCloudGlobalNetworkManager20220215PeerStatePENDING HashicorpCloudGlobalNetworkManager20220215PeerState = "PENDING"

	// HashicorpCloudGlobalNetworkManager20220215PeerStateESTABLISHING captures enum value "ESTABLISHING"
	HashicorpCloudGlobalNetworkManager20220215PeerStateESTABLISHING HashicorpCloudGlobalNetworkManager20220215PeerState = "ESTABLISHING"

	// HashicorpCloudGlobalNetworkManager20220215PeerStateACTIVE captures enum value "ACTIVE"
	HashicorpCloudGlobalNetworkManager20220215PeerStateACTIVE HashicorpCloudGlobalNetworkManager20220215PeerState = "ACTIVE"

	// HashicorpCloudGlobalNetworkManager20220215PeerStateFAILING captures enum value "FAILING"
	HashicorpCloudGlobalNetworkManager20220215PeerStateFAILING HashicorpCloudGlobalNetworkManager20220215PeerState = "FAILING"

	// HashicorpCloudGlobalNetworkManager20220215PeerStateDELETING captures enum value "DELETING"
	HashicorpCloudGlobalNetworkManager20220215PeerStateDELETING HashicorpCloudGlobalNetworkManager20220215PeerState = "DELETING"

	// HashicorpCloudGlobalNetworkManager20220215PeerStateTERMINATED captures enum value "TERMINATED"
	HashicorpCloudGlobalNetworkManager20220215PeerStateTERMINATED HashicorpCloudGlobalNetworkManager20220215PeerState = "TERMINATED"
)

// for schema
var hashicorpCloudGlobalNetworkManager20220215PeerStateEnum []interface{}

func init() {
	var res []HashicorpCloudGlobalNetworkManager20220215PeerState
	if err := json.Unmarshal([]byte(`["UNDEFINED","PENDING","ESTABLISHING","ACTIVE","FAILING","DELETING","TERMINATED"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudGlobalNetworkManager20220215PeerStateEnum = append(hashicorpCloudGlobalNetworkManager20220215PeerStateEnum, v)
	}
}

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

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

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