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

// HashicorpCloudPackerIterationRevocationType  - 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.Iteration.RevocationType
type HashicorpCloudPackerIterationRevocationType string

func NewHashicorpCloudPackerIterationRevocationType(value HashicorpCloudPackerIterationRevocationType) *HashicorpCloudPackerIterationRevocationType {
	return &value
}

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

const (

	// HashicorpCloudPackerIterationRevocationTypeUNSET captures enum value "UNSET"
	HashicorpCloudPackerIterationRevocationTypeUNSET HashicorpCloudPackerIterationRevocationType = "UNSET"

	// HashicorpCloudPackerIterationRevocationTypeMANUAL captures enum value "MANUAL"
	HashicorpCloudPackerIterationRevocationTypeMANUAL HashicorpCloudPackerIterationRevocationType = "MANUAL"

	// HashicorpCloudPackerIterationRevocationTypeINHERITED captures enum value "INHERITED"
	HashicorpCloudPackerIterationRevocationTypeINHERITED HashicorpCloudPackerIterationRevocationType = "INHERITED"
)

// for schema
var hashicorpCloudPackerIterationRevocationTypeEnum []interface{}

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

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

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

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

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

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