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

// HashicorpCloudPackerIterationExternalStatus  - ITERATION_UNSET: UNSET is a sentinel zero value so that an uninitialized value can be
// detected.
//   - ITERATION_RUNNING: Running means the `packer build` is currently running in the iteration.
//   - ITERATION_CANCELLED: Cancelled means the `packer build` was cancelled by a user.
//   - ITERATION_FAILED: Failed means the `packer build` failed and therefore image creation failed.
//   - ITERATION_REVOKED: Revoked means the iteration has been revoked.
//   - ITERATION_REVOCATION_SCHEDULED: Revocation scheduled means the iteration has been scheduled to be revoked.
//   - ITERATION_ACTIVE: Active means the iteration is valid and ready to be used.
//
// swagger:model hashicorp.cloud.packer.IterationExternalStatus
type HashicorpCloudPackerIterationExternalStatus string

func NewHashicorpCloudPackerIterationExternalStatus(value HashicorpCloudPackerIterationExternalStatus) *HashicorpCloudPackerIterationExternalStatus {
	return &value
}

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

const (

	// HashicorpCloudPackerIterationExternalStatusITERATIONUNSET captures enum value "ITERATION_UNSET"
	HashicorpCloudPackerIterationExternalStatusITERATIONUNSET HashicorpCloudPackerIterationExternalStatus = "ITERATION_UNSET"

	// HashicorpCloudPackerIterationExternalStatusITERATIONRUNNING captures enum value "ITERATION_RUNNING"
	HashicorpCloudPackerIterationExternalStatusITERATIONRUNNING HashicorpCloudPackerIterationExternalStatus = "ITERATION_RUNNING"

	// HashicorpCloudPackerIterationExternalStatusITERATIONCANCELLED captures enum value "ITERATION_CANCELLED"
	HashicorpCloudPackerIterationExternalStatusITERATIONCANCELLED HashicorpCloudPackerIterationExternalStatus = "ITERATION_CANCELLED"

	// HashicorpCloudPackerIterationExternalStatusITERATIONFAILED captures enum value "ITERATION_FAILED"
	HashicorpCloudPackerIterationExternalStatusITERATIONFAILED HashicorpCloudPackerIterationExternalStatus = "ITERATION_FAILED"

	// HashicorpCloudPackerIterationExternalStatusITERATIONREVOKED captures enum value "ITERATION_REVOKED"
	HashicorpCloudPackerIterationExternalStatusITERATIONREVOKED HashicorpCloudPackerIterationExternalStatus = "ITERATION_REVOKED"

	// HashicorpCloudPackerIterationExternalStatusITERATIONREVOCATIONSCHEDULED captures enum value "ITERATION_REVOCATION_SCHEDULED"
	HashicorpCloudPackerIterationExternalStatusITERATIONREVOCATIONSCHEDULED HashicorpCloudPackerIterationExternalStatus = "ITERATION_REVOCATION_SCHEDULED"

	// HashicorpCloudPackerIterationExternalStatusITERATIONACTIVE captures enum value "ITERATION_ACTIVE"
	HashicorpCloudPackerIterationExternalStatusITERATIONACTIVE HashicorpCloudPackerIterationExternalStatus = "ITERATION_ACTIVE"
)

// for schema
var hashicorpCloudPackerIterationExternalStatusEnum []interface{}

func init() {
	var res []HashicorpCloudPackerIterationExternalStatus
	if err := json.Unmarshal([]byte(`["ITERATION_UNSET","ITERATION_RUNNING","ITERATION_CANCELLED","ITERATION_FAILED","ITERATION_REVOKED","ITERATION_REVOCATION_SCHEDULED","ITERATION_ACTIVE"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudPackerIterationExternalStatusEnum = append(hashicorpCloudPackerIterationExternalStatusEnum, v)
	}
}

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

// Validate validates this hashicorp cloud packer iteration external status
func (m HashicorpCloudPackerIterationExternalStatus) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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