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

// ExamplepbNumericEnum NumericEnum
//
// NumericEnum is one or zero.
// Example: ZERO
//
// swagger:model examplepbNumericEnum
type ExamplepbNumericEnum string

func NewExamplepbNumericEnum(value ExamplepbNumericEnum) *ExamplepbNumericEnum {
	return &value
}

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

const (

	// ExamplepbNumericEnumZERO captures enum value "ZERO"
	ExamplepbNumericEnumZERO ExamplepbNumericEnum = "ZERO"

	// ExamplepbNumericEnumONE captures enum value "ONE"
	ExamplepbNumericEnumONE ExamplepbNumericEnum = "ONE"
)

// for schema
var examplepbNumericEnumEnum []any

func init() {
	var res []ExamplepbNumericEnum
	if err := json.Unmarshal([]byte(`["ZERO","ONE"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		examplepbNumericEnumEnum = append(examplepbNumericEnumEnum, v)
	}
}

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

// Validate validates this examplepb numeric enum
func (m ExamplepbNumericEnum) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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