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

// HashicorpCloudPacker20230101RevocationType  - MANUAL: This version was revoked manually.
//   - INHERITED: This version inherited a revocation from an upstream ancestor and was revoked automatically.
//
// swagger:model hashicorp.cloud.packer_20230101.RevocationType
type HashicorpCloudPacker20230101RevocationType string

func NewHashicorpCloudPacker20230101RevocationType(value HashicorpCloudPacker20230101RevocationType) *HashicorpCloudPacker20230101RevocationType {
	return &value
}

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

const (

	// HashicorpCloudPacker20230101RevocationTypeREVOCATIONTYPEUNSET captures enum value "REVOCATION_TYPE_UNSET"
	HashicorpCloudPacker20230101RevocationTypeREVOCATIONTYPEUNSET HashicorpCloudPacker20230101RevocationType = "REVOCATION_TYPE_UNSET"

	// HashicorpCloudPacker20230101RevocationTypeMANUAL captures enum value "MANUAL"
	HashicorpCloudPacker20230101RevocationTypeMANUAL HashicorpCloudPacker20230101RevocationType = "MANUAL"

	// HashicorpCloudPacker20230101RevocationTypeINHERITED captures enum value "INHERITED"
	HashicorpCloudPacker20230101RevocationTypeINHERITED HashicorpCloudPacker20230101RevocationType = "INHERITED"
)

// for schema
var hashicorpCloudPacker20230101RevocationTypeEnum []interface{}

func init() {
	var res []HashicorpCloudPacker20230101RevocationType
	if err := json.Unmarshal([]byte(`["REVOCATION_TYPE_UNSET","MANUAL","INHERITED"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudPacker20230101RevocationTypeEnum = append(hashicorpCloudPacker20230101RevocationTypeEnum, v)
	}
}

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

// Validate validates this hashicorp cloud packer 20230101 revocation type
func (m HashicorpCloudPacker20230101RevocationType) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this hashicorp cloud packer 20230101 revocation type based on context it is used
func (m HashicorpCloudPacker20230101RevocationType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
