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

// HashicorpCloudPacker20230101AncestryStatus  - UNDETERMINED: HCP Packer cannot determine whether the child artifact is out of date.
// This status occurs when the parent version was not assigned to a channel
// when Packer built the artifact, the channel no longer exists in the bucket,
// or HCP Packer is not tracking the parent.
//   - UP_TO_DATE: The child artifact is built from the version currently assigned to the channel.
//   - OUT_OF_DATE: The child artifact is built from a different version than the one currently
//
// assigned to the channel.
//
// swagger:model hashicorp.cloud.packer_20230101.AncestryStatus
type HashicorpCloudPacker20230101AncestryStatus string

func NewHashicorpCloudPacker20230101AncestryStatus(value HashicorpCloudPacker20230101AncestryStatus) *HashicorpCloudPacker20230101AncestryStatus {
	return &value
}

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

const (

	// HashicorpCloudPacker20230101AncestryStatusUNDETERMINED captures enum value "UNDETERMINED"
	HashicorpCloudPacker20230101AncestryStatusUNDETERMINED HashicorpCloudPacker20230101AncestryStatus = "UNDETERMINED"

	// HashicorpCloudPacker20230101AncestryStatusUPTODATE captures enum value "UP_TO_DATE"
	HashicorpCloudPacker20230101AncestryStatusUPTODATE HashicorpCloudPacker20230101AncestryStatus = "UP_TO_DATE"

	// HashicorpCloudPacker20230101AncestryStatusOUTOFDATE captures enum value "OUT_OF_DATE"
	HashicorpCloudPacker20230101AncestryStatusOUTOFDATE HashicorpCloudPacker20230101AncestryStatus = "OUT_OF_DATE"
)

// for schema
var hashicorpCloudPacker20230101AncestryStatusEnum []interface{}

func init() {
	var res []HashicorpCloudPacker20230101AncestryStatus
	if err := json.Unmarshal([]byte(`["UNDETERMINED","UP_TO_DATE","OUT_OF_DATE"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudPacker20230101AncestryStatusEnum = append(hashicorpCloudPacker20230101AncestryStatusEnum, v)
	}
}

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

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

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

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

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