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

// HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeType hashicorp cloud vault 20201125 major version upgrade config upgrade type
//
// swagger:model hashicorp.cloud.vault_20201125.MajorVersionUpgradeConfig.UpgradeType
type HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeType string

func NewHashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeType(value HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeType) *HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeType {
	return &value
}

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

const (

	// HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeTypeMAJORVERSIONUPGRADECONFIGUPGRADETYPEINVALID captures enum value "MAJOR_VERSION_UPGRADE_CONFIG_UPGRADE_TYPE_INVALID"
	HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeTypeMAJORVERSIONUPGRADECONFIGUPGRADETYPEINVALID HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeType = "MAJOR_VERSION_UPGRADE_CONFIG_UPGRADE_TYPE_INVALID"

	// HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeTypeAUTOMATIC captures enum value "AUTOMATIC"
	HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeTypeAUTOMATIC HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeType = "AUTOMATIC"

	// HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeTypeSCHEDULED captures enum value "SCHEDULED"
	HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeTypeSCHEDULED HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeType = "SCHEDULED"

	// HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeTypeMANUAL captures enum value "MANUAL"
	HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeTypeMANUAL HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeType = "MANUAL"
)

// for schema
var hashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeTypeEnum []interface{}

func init() {
	var res []HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeType
	if err := json.Unmarshal([]byte(`["MAJOR_VERSION_UPGRADE_CONFIG_UPGRADE_TYPE_INVALID","AUTOMATIC","SCHEDULED","MANUAL"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeTypeEnum = append(hashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeTypeEnum, v)
	}
}

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

// Validate validates this hashicorp cloud vault 20201125 major version upgrade config upgrade type
func (m HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeType) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this hashicorp cloud vault 20201125 major version upgrade config upgrade type based on context it is used
func (m HashicorpCloudVault20201125MajorVersionUpgradeConfigUpgradeType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
