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

// HashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevel - CONSUL_ACCESS_LEVEL_UNSPECIFIED: the access level is unspecified
//   - CONSUL_ACCESS_LEVEL_GLOBAL_READ_ONLY: CCM has global-read-only access to the Consul cluster
//   - CONSUL_ACCESS_LEVEL_GLOBAL_READ_WRITE: CCM has global-read-write access to the Consul cluster
//
// swagger:model hashicorp.cloud.global_network_manager_20220215.Cluster.ConsulAccessLevel
type HashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevel string

func NewHashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevel(value HashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevel) *HashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevel {
	return &value
}

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

const (

	// HashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevelCONSULACCESSLEVELUNSPECIFIED captures enum value "CONSUL_ACCESS_LEVEL_UNSPECIFIED"
	HashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevelCONSULACCESSLEVELUNSPECIFIED HashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevel = "CONSUL_ACCESS_LEVEL_UNSPECIFIED"

	// HashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevelCONSULACCESSLEVELGLOBALREADONLY captures enum value "CONSUL_ACCESS_LEVEL_GLOBAL_READ_ONLY"
	HashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevelCONSULACCESSLEVELGLOBALREADONLY HashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevel = "CONSUL_ACCESS_LEVEL_GLOBAL_READ_ONLY"

	// HashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevelCONSULACCESSLEVELGLOBALREADWRITE captures enum value "CONSUL_ACCESS_LEVEL_GLOBAL_READ_WRITE"
	HashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevelCONSULACCESSLEVELGLOBALREADWRITE HashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevel = "CONSUL_ACCESS_LEVEL_GLOBAL_READ_WRITE"
)

// for schema
var hashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevelEnum []interface{}

func init() {
	var res []HashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevel
	if err := json.Unmarshal([]byte(`["CONSUL_ACCESS_LEVEL_UNSPECIFIED","CONSUL_ACCESS_LEVEL_GLOBAL_READ_ONLY","CONSUL_ACCESS_LEVEL_GLOBAL_READ_WRITE"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevelEnum = append(hashicorpCloudGlobalNetworkManager20220215ClusterConsulAccessLevelEnum, v)
	}
}

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

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

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