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

// HashicorpCloudPacker20230101RunTaskBehaviour hashicorp cloud packer 20230101 run task behaviour
//
// swagger:model hashicorp.cloud.packer_20230101.RunTaskBehaviour
type HashicorpCloudPacker20230101RunTaskBehaviour string

func NewHashicorpCloudPacker20230101RunTaskBehaviour(value HashicorpCloudPacker20230101RunTaskBehaviour) *HashicorpCloudPacker20230101RunTaskBehaviour {
	return &value
}

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

const (

	// HashicorpCloudPacker20230101RunTaskBehaviourUNSET captures enum value "UNSET"
	HashicorpCloudPacker20230101RunTaskBehaviourUNSET HashicorpCloudPacker20230101RunTaskBehaviour = "UNSET"

	// HashicorpCloudPacker20230101RunTaskBehaviourFAIL captures enum value "FAIL"
	HashicorpCloudPacker20230101RunTaskBehaviourFAIL HashicorpCloudPacker20230101RunTaskBehaviour = "FAIL"

	// HashicorpCloudPacker20230101RunTaskBehaviourWARN captures enum value "WARN"
	HashicorpCloudPacker20230101RunTaskBehaviourWARN HashicorpCloudPacker20230101RunTaskBehaviour = "WARN"
)

// for schema
var hashicorpCloudPacker20230101RunTaskBehaviourEnum []interface{}

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

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

// Validate validates this hashicorp cloud packer 20230101 run task behaviour
func (m HashicorpCloudPacker20230101RunTaskBehaviour) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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