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

// HashicorpCloudPacker20230101BucketAncestryType hashicorp cloud packer 20230101 bucket ancestry type
//
// swagger:model hashicorp.cloud.packer_20230101.BucketAncestryType
type HashicorpCloudPacker20230101BucketAncestryType string

func NewHashicorpCloudPacker20230101BucketAncestryType(value HashicorpCloudPacker20230101BucketAncestryType) *HashicorpCloudPacker20230101BucketAncestryType {
	return &value
}

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

const (

	// HashicorpCloudPacker20230101BucketAncestryTypeANCESTRYTYPEUNSET captures enum value "ANCESTRY_TYPE_UNSET"
	HashicorpCloudPacker20230101BucketAncestryTypeANCESTRYTYPEUNSET HashicorpCloudPacker20230101BucketAncestryType = "ANCESTRY_TYPE_UNSET"

	// HashicorpCloudPacker20230101BucketAncestryTypeANCESTRYTYPEPARENTS captures enum value "ANCESTRY_TYPE_PARENTS"
	HashicorpCloudPacker20230101BucketAncestryTypeANCESTRYTYPEPARENTS HashicorpCloudPacker20230101BucketAncestryType = "ANCESTRY_TYPE_PARENTS"

	// HashicorpCloudPacker20230101BucketAncestryTypeANCESTRYTYPECHILDREN captures enum value "ANCESTRY_TYPE_CHILDREN"
	HashicorpCloudPacker20230101BucketAncestryTypeANCESTRYTYPECHILDREN HashicorpCloudPacker20230101BucketAncestryType = "ANCESTRY_TYPE_CHILDREN"
)

// for schema
var hashicorpCloudPacker20230101BucketAncestryTypeEnum []interface{}

func init() {
	var res []HashicorpCloudPacker20230101BucketAncestryType
	if err := json.Unmarshal([]byte(`["ANCESTRY_TYPE_UNSET","ANCESTRY_TYPE_PARENTS","ANCESTRY_TYPE_CHILDREN"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudPacker20230101BucketAncestryTypeEnum = append(hashicorpCloudPacker20230101BucketAncestryTypeEnum, v)
	}
}

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

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

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

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

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