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

// PathenumPathEnum pathenum path enum
//
// swagger:model pathenumPathEnum
type PathenumPathEnum string

func NewPathenumPathEnum(value PathenumPathEnum) *PathenumPathEnum {
	return &value
}

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

const (

	// PathenumPathEnumABC captures enum value "ABC"
	PathenumPathEnumABC PathenumPathEnum = "ABC"

	// PathenumPathEnumDEF captures enum value "DEF"
	PathenumPathEnumDEF PathenumPathEnum = "DEF"
)

// for schema
var pathenumPathEnumEnum []any

func init() {
	var res []PathenumPathEnum
	if err := json.Unmarshal([]byte(`["ABC","DEF"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		pathenumPathEnumEnum = append(pathenumPathEnumEnum, v)
	}
}

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

// Validate validates this pathenum path enum
func (m PathenumPathEnum) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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