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

// ResponseResponseType - UNKNOWN: UNKNOWN
//   - A: A is 1
//   - B: B is 2
//
// swagger:model ResponseResponseType
type ResponseResponseType string

func NewResponseResponseType(value ResponseResponseType) *ResponseResponseType {
	return &value
}

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

const (

	// ResponseResponseTypeUNKNOWN captures enum value "UNKNOWN"
	ResponseResponseTypeUNKNOWN ResponseResponseType = "UNKNOWN"

	// ResponseResponseTypeA captures enum value "A"
	ResponseResponseTypeA ResponseResponseType = "A"

	// ResponseResponseTypeB captures enum value "B"
	ResponseResponseTypeB ResponseResponseType = "B"
)

// for schema
var responseResponseTypeEnum []any

func init() {
	var res []ResponseResponseType
	if err := json.Unmarshal([]byte(`["UNKNOWN","A","B"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		responseResponseTypeEnum = append(responseResponseTypeEnum, v)
	}
}

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

// Validate validates this response response type
func (m ResponseResponseType) Validate(formats strfmt.Registry) error {
	var res []error

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

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

// ContextValidate validates this response response type based on context it is used
func (m ResponseResponseType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
