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

// HashicorpCloudPacker20230101TemplateType - TEMPLATE_TYPE_UNSET: TEMPLATE_TYPE_UNSET is a sentinel zero value so that an uninitialized value can be
// detected.
//   - HCL2: HCL2 configuration template; either pkr.hcl or pkr.json
//   - JSON: Legacy JSON configuration template
//
// swagger:model hashicorp.cloud.packer_20230101.TemplateType
type HashicorpCloudPacker20230101TemplateType string

func NewHashicorpCloudPacker20230101TemplateType(value HashicorpCloudPacker20230101TemplateType) *HashicorpCloudPacker20230101TemplateType {
	return &value
}

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

const (

	// HashicorpCloudPacker20230101TemplateTypeTEMPLATETYPEUNSET captures enum value "TEMPLATE_TYPE_UNSET"
	HashicorpCloudPacker20230101TemplateTypeTEMPLATETYPEUNSET HashicorpCloudPacker20230101TemplateType = "TEMPLATE_TYPE_UNSET"

	// HashicorpCloudPacker20230101TemplateTypeHCL2 captures enum value "HCL2"
	HashicorpCloudPacker20230101TemplateTypeHCL2 HashicorpCloudPacker20230101TemplateType = "HCL2"

	// HashicorpCloudPacker20230101TemplateTypeJSON captures enum value "JSON"
	HashicorpCloudPacker20230101TemplateTypeJSON HashicorpCloudPacker20230101TemplateType = "JSON"
)

// for schema
var hashicorpCloudPacker20230101TemplateTypeEnum []interface{}

func init() {
	var res []HashicorpCloudPacker20230101TemplateType
	if err := json.Unmarshal([]byte(`["TEMPLATE_TYPE_UNSET","HCL2","JSON"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudPacker20230101TemplateTypeEnum = append(hashicorpCloudPacker20230101TemplateTypeEnum, v)
	}
}

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

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

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

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

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