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

// HashicorpCloudPacker20230101SbomFormat hashicorp cloud packer 20230101 sbom format
//
// swagger:model hashicorp.cloud.packer_20230101.SbomFormat
type HashicorpCloudPacker20230101SbomFormat string

func NewHashicorpCloudPacker20230101SbomFormat(value HashicorpCloudPacker20230101SbomFormat) *HashicorpCloudPacker20230101SbomFormat {
	return &value
}

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

const (

	// HashicorpCloudPacker20230101SbomFormatCYCLONEDX captures enum value "CYCLONEDX"
	HashicorpCloudPacker20230101SbomFormatCYCLONEDX HashicorpCloudPacker20230101SbomFormat = "CYCLONEDX"

	// HashicorpCloudPacker20230101SbomFormatSPDX captures enum value "SPDX"
	HashicorpCloudPacker20230101SbomFormatSPDX HashicorpCloudPacker20230101SbomFormat = "SPDX"
)

// for schema
var hashicorpCloudPacker20230101SbomFormatEnum []interface{}

func init() {
	var res []HashicorpCloudPacker20230101SbomFormat
	if err := json.Unmarshal([]byte(`["CYCLONEDX","SPDX"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		hashicorpCloudPacker20230101SbomFormatEnum = append(hashicorpCloudPacker20230101SbomFormatEnum, v)
	}
}

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

// Validate validates this hashicorp cloud packer 20230101 sbom format
func (m HashicorpCloudPacker20230101SbomFormat) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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