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

// HashicorpCloudPacker20230101VersionStatus  - VERSION_UNSET: UNSET is a sentinel zero value so that an uninitialized value can be
// detected.
//   - VERSION_RUNNING: Running means the `packer build` is currently running in the version.
//   - VERSION_CANCELLED: Cancelled means the `packer build` was cancelled by a user.
//   - VERSION_FAILED: Failed means the `packer build` failed and therefore artifact creation failed.
//   - VERSION_REVOKED: Revoked means the version has been revoked.
//   - VERSION_REVOCATION_SCHEDULED: Revocation scheduled means the version has been scheduled to be revoked.
//   - VERSION_ACTIVE: Active means the version is valid and ready to be used.
//   - VERSION_INCOMPLETE: Incomplete means the version has one or more builds that didn't run and the status is UNSET.
//
// swagger:model hashicorp.cloud.packer_20230101.VersionStatus
type HashicorpCloudPacker20230101VersionStatus string

func NewHashicorpCloudPacker20230101VersionStatus(value HashicorpCloudPacker20230101VersionStatus) *HashicorpCloudPacker20230101VersionStatus {
	return &value
}

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

const (

	// HashicorpCloudPacker20230101VersionStatusVERSIONUNSET captures enum value "VERSION_UNSET"
	HashicorpCloudPacker20230101VersionStatusVERSIONUNSET HashicorpCloudPacker20230101VersionStatus = "VERSION_UNSET"

	// HashicorpCloudPacker20230101VersionStatusVERSIONRUNNING captures enum value "VERSION_RUNNING"
	HashicorpCloudPacker20230101VersionStatusVERSIONRUNNING HashicorpCloudPacker20230101VersionStatus = "VERSION_RUNNING"

	// HashicorpCloudPacker20230101VersionStatusVERSIONCANCELLED captures enum value "VERSION_CANCELLED"
	HashicorpCloudPacker20230101VersionStatusVERSIONCANCELLED HashicorpCloudPacker20230101VersionStatus = "VERSION_CANCELLED"

	// HashicorpCloudPacker20230101VersionStatusVERSIONFAILED captures enum value "VERSION_FAILED"
	HashicorpCloudPacker20230101VersionStatusVERSIONFAILED HashicorpCloudPacker20230101VersionStatus = "VERSION_FAILED"

	// HashicorpCloudPacker20230101VersionStatusVERSIONREVOKED captures enum value "VERSION_REVOKED"
	HashicorpCloudPacker20230101VersionStatusVERSIONREVOKED HashicorpCloudPacker20230101VersionStatus = "VERSION_REVOKED"

	// HashicorpCloudPacker20230101VersionStatusVERSIONREVOCATIONSCHEDULED captures enum value "VERSION_REVOCATION_SCHEDULED"
	HashicorpCloudPacker20230101VersionStatusVERSIONREVOCATIONSCHEDULED HashicorpCloudPacker20230101VersionStatus = "VERSION_REVOCATION_SCHEDULED"

	// HashicorpCloudPacker20230101VersionStatusVERSIONACTIVE captures enum value "VERSION_ACTIVE"
	HashicorpCloudPacker20230101VersionStatusVERSIONACTIVE HashicorpCloudPacker20230101VersionStatus = "VERSION_ACTIVE"

	// HashicorpCloudPacker20230101VersionStatusVERSIONINCOMPLETE captures enum value "VERSION_INCOMPLETE"
	HashicorpCloudPacker20230101VersionStatusVERSIONINCOMPLETE HashicorpCloudPacker20230101VersionStatus = "VERSION_INCOMPLETE"
)

// for schema
var hashicorpCloudPacker20230101VersionStatusEnum []interface{}

func init() {
	var res []HashicorpCloudPacker20230101VersionStatus
	if err := json.Unmarshal([]byte(`["VERSION_UNSET","VERSION_RUNNING","VERSION_CANCELLED","VERSION_FAILED","VERSION_REVOKED","VERSION_REVOCATION_SCHEDULED","VERSION_ACTIVE","VERSION_INCOMPLETE"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudPacker20230101VersionStatusEnum = append(hashicorpCloudPacker20230101VersionStatusEnum, v)
	}
}

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

// Validate validates this hashicorp cloud packer 20230101 version status
func (m HashicorpCloudPacker20230101VersionStatus) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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