// Code generated by go-swagger; DO NOT EDIT.

package models

import (
	"context"
	"encoding/json"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/validate"
)

// NestedDeepEnum DeepEnum is one or zero.
//
//   - FALSE: FALSE is false.
//   - TRUE: TRUE is true.
//
// swagger:model NestedDeepEnum
type NestedDeepEnum string

func NewNestedDeepEnum(value NestedDeepEnum) *NestedDeepEnum {
	return &value
}

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

const (

	// NestedDeepEnumFALSE captures enum value "FALSE"
	NestedDeepEnumFALSE NestedDeepEnum = "FALSE"

	// NestedDeepEnumTRUE captures enum value "TRUE"
	NestedDeepEnumTRUE NestedDeepEnum = "TRUE"
)

// for schema
var nestedDeepEnumEnum []any

func init() {
	var res []NestedDeepEnum
	if err := json.Unmarshal([]byte(`["FALSE","TRUE"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		nestedDeepEnumEnum = append(nestedDeepEnumEnum, v)
	}
}

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

// Validate validates this nested deep enum
func (m NestedDeepEnum) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this nested deep enum based on context it is used
func (m NestedDeepEnum) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
