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

// ExamplepbSnakeCaseEnum Ignoring lint warnings as this enum type exist to validate proper functionality
// for projects that don't follow these lint rules.
// buf:lint:ignore ENUM_PASCAL_CASE
//
// - value_c: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
//   - value_d: buf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE
//
// swagger:model examplepbSnake_case_enum
type ExamplepbSnakeCaseEnum string

func NewExamplepbSnakeCaseEnum(value ExamplepbSnakeCaseEnum) *ExamplepbSnakeCaseEnum {
	return &value
}

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

const (

	// ExamplepbSnakeCaseEnumValuec captures enum value "value_c"
	ExamplepbSnakeCaseEnumValuec ExamplepbSnakeCaseEnum = "value_c"

	// ExamplepbSnakeCaseEnumValued captures enum value "value_d"
	ExamplepbSnakeCaseEnumValued ExamplepbSnakeCaseEnum = "value_d"
)

// for schema
var examplepbSnakeCaseEnumEnum []any

func init() {
	var res []ExamplepbSnakeCaseEnum
	if err := json.Unmarshal([]byte(`["value_c","value_d"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		examplepbSnakeCaseEnumEnum = append(examplepbSnakeCaseEnumEnum, v)
	}
}

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

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

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

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

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