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

// HashicorpCloudGlobalNetworkManager20220215ClusterSource hashicorp cloud global network manager 20220215 cluster source
//
// swagger:model hashicorp.cloud.global_network_manager_20220215.Cluster.Source
type HashicorpCloudGlobalNetworkManager20220215ClusterSource string

func NewHashicorpCloudGlobalNetworkManager20220215ClusterSource(value HashicorpCloudGlobalNetworkManager20220215ClusterSource) *HashicorpCloudGlobalNetworkManager20220215ClusterSource {
	return &value
}

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

const (

	// HashicorpCloudGlobalNetworkManager20220215ClusterSourceSOURCEUNSPECIFIED captures enum value "SOURCE_UNSPECIFIED"
	HashicorpCloudGlobalNetworkManager20220215ClusterSourceSOURCEUNSPECIFIED HashicorpCloudGlobalNetworkManager20220215ClusterSource = "SOURCE_UNSPECIFIED"

	// HashicorpCloudGlobalNetworkManager20220215ClusterSourceSOURCEKUBERNETES captures enum value "SOURCE_KUBERNETES"
	HashicorpCloudGlobalNetworkManager20220215ClusterSourceSOURCEKUBERNETES HashicorpCloudGlobalNetworkManager20220215ClusterSource = "SOURCE_KUBERNETES"

	// HashicorpCloudGlobalNetworkManager20220215ClusterSourceSOURCEHCP captures enum value "SOURCE_HCP"
	HashicorpCloudGlobalNetworkManager20220215ClusterSourceSOURCEHCP HashicorpCloudGlobalNetworkManager20220215ClusterSource = "SOURCE_HCP"
)

// for schema
var hashicorpCloudGlobalNetworkManager20220215ClusterSourceEnum []interface{}

func init() {
	var res []HashicorpCloudGlobalNetworkManager20220215ClusterSource
	if err := json.Unmarshal([]byte(`["SOURCE_UNSPECIFIED","SOURCE_KUBERNETES","SOURCE_HCP"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudGlobalNetworkManager20220215ClusterSourceEnum = append(hashicorpCloudGlobalNetworkManager20220215ClusterSourceEnum, v)
	}
}

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

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

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