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

// MessagePathEnumNestedPathEnum message path enum nested path enum
//
// swagger:model MessagePathEnumNestedPathEnum
type MessagePathEnumNestedPathEnum string

func NewMessagePathEnumNestedPathEnum(value MessagePathEnumNestedPathEnum) *MessagePathEnumNestedPathEnum {
	return &value
}

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

const (

	// MessagePathEnumNestedPathEnumGHI captures enum value "GHI"
	MessagePathEnumNestedPathEnumGHI MessagePathEnumNestedPathEnum = "GHI"

	// MessagePathEnumNestedPathEnumJKL captures enum value "JKL"
	MessagePathEnumNestedPathEnumJKL MessagePathEnumNestedPathEnum = "JKL"
)

// for schema
var messagePathEnumNestedPathEnumEnum []any

func init() {
	var res []MessagePathEnumNestedPathEnum
	if err := json.Unmarshal([]byte(`["GHI","JKL"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		messagePathEnumNestedPathEnumEnum = append(messagePathEnumNestedPathEnumEnum, v)
	}
}

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

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

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

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

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