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

// HashicorpCloudVagrantVersionState State is an enumeration of possible Version states.
//
// swagger:model hashicorp.cloud.vagrant.Version.State
type HashicorpCloudVagrantVersionState string

func NewHashicorpCloudVagrantVersionState(value HashicorpCloudVagrantVersionState) *HashicorpCloudVagrantVersionState {
	return &value
}

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

const (

	// HashicorpCloudVagrantVersionStateUNRELEASED captures enum value "UNRELEASED"
	HashicorpCloudVagrantVersionStateUNRELEASED HashicorpCloudVagrantVersionState = "UNRELEASED"

	// HashicorpCloudVagrantVersionStateACTIVE captures enum value "ACTIVE"
	HashicorpCloudVagrantVersionStateACTIVE HashicorpCloudVagrantVersionState = "ACTIVE"

	// HashicorpCloudVagrantVersionStateREVOKED captures enum value "REVOKED"
	HashicorpCloudVagrantVersionStateREVOKED HashicorpCloudVagrantVersionState = "REVOKED"
)

// for schema
var hashicorpCloudVagrantVersionStateEnum []interface{}

func init() {
	var res []HashicorpCloudVagrantVersionState
	if err := json.Unmarshal([]byte(`["UNRELEASED","ACTIVE","REVOKED"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudVagrantVersionStateEnum = append(hashicorpCloudVagrantVersionStateEnum, v)
	}
}

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

// Validate validates this hashicorp cloud vagrant version state
func (m HashicorpCloudVagrantVersionState) Validate(formats strfmt.Registry) error {
	var res []error

	// value enum
	if err := m.validateHashicorpCloudVagrantVersionStateEnum("", "body", m); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

// ContextValidate validates this hashicorp cloud vagrant version state based on context it is used
func (m HashicorpCloudVagrantVersionState) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
