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

// HashicorpCloudPacker20220411IterationRevocationType  - MANUAL: This iteration was revoked manually.
//   - INHERITED: This iteration inherited a revocation from an upstream ancestor and was revoked automatically.
//
// swagger:model hashicorp.cloud.packer_20220411.Iteration.RevocationType
type HashicorpCloudPacker20220411IterationRevocationType string

func NewHashicorpCloudPacker20220411IterationRevocationType(value HashicorpCloudPacker20220411IterationRevocationType) *HashicorpCloudPacker20220411IterationRevocationType {
	return &value
}

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

const (

	// HashicorpCloudPacker20220411IterationRevocationTypeUNSET captures enum value "UNSET"
	HashicorpCloudPacker20220411IterationRevocationTypeUNSET HashicorpCloudPacker20220411IterationRevocationType = "UNSET"

	// HashicorpCloudPacker20220411IterationRevocationTypeMANUAL captures enum value "MANUAL"
	HashicorpCloudPacker20220411IterationRevocationTypeMANUAL HashicorpCloudPacker20220411IterationRevocationType = "MANUAL"

	// HashicorpCloudPacker20220411IterationRevocationTypeINHERITED captures enum value "INHERITED"
	HashicorpCloudPacker20220411IterationRevocationTypeINHERITED HashicorpCloudPacker20220411IterationRevocationType = "INHERITED"
)

// for schema
var hashicorpCloudPacker20220411IterationRevocationTypeEnum []interface{}

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

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

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

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

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

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