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

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

func NewHashicorpCloudPackerBucketAncestryStatus(value HashicorpCloudPackerBucketAncestryStatus) *HashicorpCloudPackerBucketAncestryStatus {
	return &value
}

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

const (

	// HashicorpCloudPackerBucketAncestryStatusUNDETERMINED captures enum value "UNDETERMINED"
	HashicorpCloudPackerBucketAncestryStatusUNDETERMINED HashicorpCloudPackerBucketAncestryStatus = "UNDETERMINED"

	// HashicorpCloudPackerBucketAncestryStatusUPTODATE captures enum value "UP_TO_DATE"
	HashicorpCloudPackerBucketAncestryStatusUPTODATE HashicorpCloudPackerBucketAncestryStatus = "UP_TO_DATE"

	// HashicorpCloudPackerBucketAncestryStatusOUTOFDATE captures enum value "OUT_OF_DATE"
	HashicorpCloudPackerBucketAncestryStatusOUTOFDATE HashicorpCloudPackerBucketAncestryStatus = "OUT_OF_DATE"
)

// for schema
var hashicorpCloudPackerBucketAncestryStatusEnum []interface{}

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

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

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

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

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

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