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

// HashicorpCloudPacker20220411BuildStatus  - UNSET: UNSET is a sentinel zero value so that an uninitialized value can be
// detected.
//   - RUNNING: Running means the `packer build` is currently running.
//   - DONE: Done means the `packer build` has finished successfully.
//   - CANCELLED: Cancelled means the `packer build` was cancelled by a user.
//   - FAILED: Failed means the `packer build` failed and therefore image creation failed.
//
// swagger:model hashicorp.cloud.packer_20220411.BuildStatus
type HashicorpCloudPacker20220411BuildStatus string

func NewHashicorpCloudPacker20220411BuildStatus(value HashicorpCloudPacker20220411BuildStatus) *HashicorpCloudPacker20220411BuildStatus {
	return &value
}

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

const (

	// HashicorpCloudPacker20220411BuildStatusUNSET captures enum value "UNSET"
	HashicorpCloudPacker20220411BuildStatusUNSET HashicorpCloudPacker20220411BuildStatus = "UNSET"

	// HashicorpCloudPacker20220411BuildStatusRUNNING captures enum value "RUNNING"
	HashicorpCloudPacker20220411BuildStatusRUNNING HashicorpCloudPacker20220411BuildStatus = "RUNNING"

	// HashicorpCloudPacker20220411BuildStatusDONE captures enum value "DONE"
	HashicorpCloudPacker20220411BuildStatusDONE HashicorpCloudPacker20220411BuildStatus = "DONE"

	// HashicorpCloudPacker20220411BuildStatusCANCELLED captures enum value "CANCELLED"
	HashicorpCloudPacker20220411BuildStatusCANCELLED HashicorpCloudPacker20220411BuildStatus = "CANCELLED"

	// HashicorpCloudPacker20220411BuildStatusFAILED captures enum value "FAILED"
	HashicorpCloudPacker20220411BuildStatusFAILED HashicorpCloudPacker20220411BuildStatus = "FAILED"
)

// for schema
var hashicorpCloudPacker20220411BuildStatusEnum []interface{}

func init() {
	var res []HashicorpCloudPacker20220411BuildStatus
	if err := json.Unmarshal([]byte(`["UNSET","RUNNING","DONE","CANCELLED","FAILED"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudPacker20220411BuildStatusEnum = append(hashicorpCloudPacker20220411BuildStatusEnum, v)
	}
}

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

// Validate validates this hashicorp cloud packer 20220411 build status
func (m HashicorpCloudPacker20220411BuildStatus) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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