// Code generated by ogen, DO NOT EDIT.

package ogent

import (
	"fmt"

	"github.com/go-faster/errors"

	"github.com/ogen-go/ogen/validate"
)

func (s *AllTypesCreate) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.ID)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "id",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           -128,
			MaxSet:        true,
			Max:           127,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Int8)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "int8",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           -32768,
			MaxSet:        true,
			Max:           32767,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Int16)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "int16",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           255,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint8)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint8",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           65535,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint16)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint16",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint32)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint32",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        false,
			Max:           0,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint64)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint64",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Float{}).Validate(float64(s.Float32)); err != nil {
			return errors.Wrap(err, "float")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "float32",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Float{}).Validate(float64(s.Float64)); err != nil {
			return errors.Wrap(err, "float")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "float64",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.State.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "state",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s AllTypesCreateState) Validate() error {
	switch s {
	case "on":
		return nil
	case "off":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *AllTypesList) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.ID)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "id",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           -128,
			MaxSet:        true,
			Max:           127,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Int8)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "int8",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           -32768,
			MaxSet:        true,
			Max:           32767,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Int16)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "int16",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           255,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint8)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint8",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           65535,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint16)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint16",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint32)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint32",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        false,
			Max:           0,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint64)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint64",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Float{}).Validate(float64(s.Float32)); err != nil {
			return errors.Wrap(err, "float")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "float32",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Float{}).Validate(float64(s.Float64)); err != nil {
			return errors.Wrap(err, "float")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "float64",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.State.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "state",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s AllTypesListState) Validate() error {
	switch s {
	case "on":
		return nil
	case "off":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *AllTypesRead) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.ID)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "id",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           -128,
			MaxSet:        true,
			Max:           127,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Int8)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "int8",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           -32768,
			MaxSet:        true,
			Max:           32767,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Int16)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "int16",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           255,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint8)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint8",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           65535,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint16)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint16",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint32)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint32",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        false,
			Max:           0,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint64)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint64",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Float{}).Validate(float64(s.Float32)); err != nil {
			return errors.Wrap(err, "float")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "float32",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Float{}).Validate(float64(s.Float64)); err != nil {
			return errors.Wrap(err, "float")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "float64",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.State.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "state",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s AllTypesReadState) Validate() error {
	switch s {
	case "on":
		return nil
	case "off":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *AllTypesUpdate) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.ID)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "id",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           -128,
			MaxSet:        true,
			Max:           127,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Int8)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "int8",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           -32768,
			MaxSet:        true,
			Max:           32767,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Int16)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "int16",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           255,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint8)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint8",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           65535,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint16)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint16",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint32)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint32",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        false,
			Max:           0,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint64)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint64",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Float{}).Validate(float64(s.Float32)); err != nil {
			return errors.Wrap(err, "float")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "float32",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Float{}).Validate(float64(s.Float64)); err != nil {
			return errors.Wrap(err, "float")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "float64",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.State.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "state",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s AllTypesUpdateState) Validate() error {
	switch s {
	case "on":
		return nil
	case "off":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *CreateAllTypesReq) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           -128,
			MaxSet:        true,
			Max:           127,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Int8)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "int8",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           -32768,
			MaxSet:        true,
			Max:           32767,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Int16)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "int16",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           255,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint8)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint8",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           65535,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint16)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint16",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint32)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint32",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        false,
			Max:           0,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Uint64)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint64",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Float{}).Validate(float64(s.Float32)); err != nil {
			return errors.Wrap(err, "float")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "float32",
			Error: err,
		})
	}
	if err := func() error {
		if err := (validate.Float{}).Validate(float64(s.Float64)); err != nil {
			return errors.Wrap(err, "float")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "float64",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.State.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "state",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s CreateAllTypesReqState) Validate() error {
	switch s {
	case "on":
		return nil
	case "off":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *CreateHatReq) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := s.Type.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "type",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s CreateHatReqType) Validate() error {
	switch s {
	case "dad":
		return nil
	case "trucker":
		return nil
	case "snapback":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *CreateUserReq) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Age)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "age",
			Error: err,
		})
	}
	if err := func() error {
		if s.Height.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        true,
					Max:           4294967295,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Height.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "height",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteCatBreed.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_cat_breed",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteColor.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_color",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteDogBreed.Set {
			if err := func() error {
				if err := s.FavoriteDogBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_dog_breed",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteFishBreed.Set {
			if err := func() error {
				if err := s.FavoriteFishBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_fish_breed",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s CreateUserReqFavoriteCatBreed) Validate() error {
	switch s {
	case "siamese":
		return nil
	case "bengal":
		return nil
	case "lion":
		return nil
	case "tiger":
		return nil
	case "leopard":
		return nil
	case "other":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s CreateUserReqFavoriteColor) Validate() error {
	switch s {
	case "red":
		return nil
	case "green":
		return nil
	case "blue":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s CreateUserReqFavoriteDogBreed) Validate() error {
	switch s {
	case "Kuro":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s CreateUserReqFavoriteFishBreed) Validate() error {
	switch s {
	case "gold":
		return nil
	case "koi":
		return nil
	case "shark":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *HatCreate) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := s.Type.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "type",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s HatCreateType) Validate() error {
	switch s {
	case "dad":
		return nil
	case "trucker":
		return nil
	case "snapback":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *HatList) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := s.Type.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "type",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s HatListType) Validate() error {
	switch s {
	case "dad":
		return nil
	case "trucker":
		return nil
	case "snapback":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *HatRead) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := s.Type.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "type",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s HatReadType) Validate() error {
	switch s {
	case "dad":
		return nil
	case "trucker":
		return nil
	case "snapback":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *HatUpdate) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := s.Type.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "type",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s HatUpdateType) Validate() error {
	switch s {
	case "dad":
		return nil
	case "trucker":
		return nil
	case "snapback":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *HatWearerRead) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Age)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "age",
			Error: err,
		})
	}
	if err := func() error {
		if s.Height.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        true,
					Max:           4294967295,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Height.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "height",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteCatBreed.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_cat_breed",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteColor.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_color",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteDogBreed.Set {
			if err := func() error {
				if err := s.FavoriteDogBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_dog_breed",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteFishBreed.Set {
			if err := func() error {
				if err := s.FavoriteFishBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_fish_breed",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s HatWearerReadFavoriteCatBreed) Validate() error {
	switch s {
	case "siamese":
		return nil
	case "bengal":
		return nil
	case "lion":
		return nil
	case "tiger":
		return nil
	case "leopard":
		return nil
	case "other":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s HatWearerReadFavoriteColor) Validate() error {
	switch s {
	case "red":
		return nil
	case "green":
		return nil
	case "blue":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s HatWearerReadFavoriteDogBreed) Validate() error {
	switch s {
	case "Kuro":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s HatWearerReadFavoriteFishBreed) Validate() error {
	switch s {
	case "gold":
		return nil
	case "koi":
		return nil
	case "shark":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s ListAllTypesOKApplicationJSON) Validate() error {
	if s == nil {
		return errors.New("nil is invalid value")
	}
	var failures []validate.FieldError
	for i, elem := range s {
		if err := func() error {
			if err := elem.Validate(); err != nil {
				return err
			}
			return nil
		}(); err != nil {
			failures = append(failures, validate.FieldError{
				Name:  fmt.Sprintf("[%d]", i),
				Error: err,
			})
		}
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s ListCategoryOKApplicationJSON) Validate() error {
	if s == nil {
		return errors.New("nil is invalid value")
	}
	return nil
}
func (s ListCategoryPetsOKApplicationJSON) Validate() error {
	if s == nil {
		return errors.New("nil is invalid value")
	}
	return nil
}
func (s ListHatOKApplicationJSON) Validate() error {
	if s == nil {
		return errors.New("nil is invalid value")
	}
	var failures []validate.FieldError
	for i, elem := range s {
		if err := func() error {
			if err := elem.Validate(); err != nil {
				return err
			}
			return nil
		}(); err != nil {
			failures = append(failures, validate.FieldError{
				Name:  fmt.Sprintf("[%d]", i),
				Error: err,
			})
		}
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s ListPetCategoriesOKApplicationJSON) Validate() error {
	if s == nil {
		return errors.New("nil is invalid value")
	}
	return nil
}
func (s ListPetFriendsOKApplicationJSON) Validate() error {
	if s == nil {
		return errors.New("nil is invalid value")
	}
	return nil
}
func (s ListPetOKApplicationJSON) Validate() error {
	if s == nil {
		return errors.New("nil is invalid value")
	}
	return nil
}
func (s ListPetRescuerOKApplicationJSON) Validate() error {
	if s == nil {
		return errors.New("nil is invalid value")
	}
	var failures []validate.FieldError
	for i, elem := range s {
		if err := func() error {
			if err := elem.Validate(); err != nil {
				return err
			}
			return nil
		}(); err != nil {
			failures = append(failures, validate.FieldError{
				Name:  fmt.Sprintf("[%d]", i),
				Error: err,
			})
		}
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s ListUserAnimalsSavedOKApplicationJSON) Validate() error {
	if s == nil {
		return errors.New("nil is invalid value")
	}
	return nil
}
func (s ListUserOKApplicationJSON) Validate() error {
	if s == nil {
		return errors.New("nil is invalid value")
	}
	var failures []validate.FieldError
	for i, elem := range s {
		if err := func() error {
			if err := elem.Validate(); err != nil {
				return err
			}
			return nil
		}(); err != nil {
			failures = append(failures, validate.FieldError{
				Name:  fmt.Sprintf("[%d]", i),
				Error: err,
			})
		}
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s ListUserPetsOKApplicationJSON) Validate() error {
	if s == nil {
		return errors.New("nil is invalid value")
	}
	return nil
}

func (s *PetCreate) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := s.Owner.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "owner",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s *PetCreateOwner) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Age)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "age",
			Error: err,
		})
	}
	if err := func() error {
		if s.Height.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        true,
					Max:           4294967295,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Height.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "height",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteCatBreed.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_cat_breed",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteColor.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_color",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteDogBreed.Set {
			if err := func() error {
				if err := s.FavoriteDogBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_dog_breed",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteFishBreed.Set {
			if err := func() error {
				if err := s.FavoriteFishBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_fish_breed",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s PetCreateOwnerFavoriteCatBreed) Validate() error {
	switch s {
	case "siamese":
		return nil
	case "bengal":
		return nil
	case "lion":
		return nil
	case "tiger":
		return nil
	case "leopard":
		return nil
	case "other":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s PetCreateOwnerFavoriteColor) Validate() error {
	switch s {
	case "red":
		return nil
	case "green":
		return nil
	case "blue":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s PetCreateOwnerFavoriteDogBreed) Validate() error {
	switch s {
	case "Kuro":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s PetCreateOwnerFavoriteFishBreed) Validate() error {
	switch s {
	case "gold":
		return nil
	case "koi":
		return nil
	case "shark":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *PetOwnerRead) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Age)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "age",
			Error: err,
		})
	}
	if err := func() error {
		if s.Height.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        true,
					Max:           4294967295,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Height.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "height",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteCatBreed.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_cat_breed",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteColor.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_color",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteDogBreed.Set {
			if err := func() error {
				if err := s.FavoriteDogBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_dog_breed",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteFishBreed.Set {
			if err := func() error {
				if err := s.FavoriteFishBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_fish_breed",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s PetOwnerReadFavoriteCatBreed) Validate() error {
	switch s {
	case "siamese":
		return nil
	case "bengal":
		return nil
	case "lion":
		return nil
	case "tiger":
		return nil
	case "leopard":
		return nil
	case "other":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s PetOwnerReadFavoriteColor) Validate() error {
	switch s {
	case "red":
		return nil
	case "green":
		return nil
	case "blue":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s PetOwnerReadFavoriteDogBreed) Validate() error {
	switch s {
	case "Kuro":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s PetOwnerReadFavoriteFishBreed) Validate() error {
	switch s {
	case "gold":
		return nil
	case "koi":
		return nil
	case "shark":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *PetRescuerList) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Age)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "age",
			Error: err,
		})
	}
	if err := func() error {
		if s.Height.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        true,
					Max:           4294967295,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Height.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "height",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteCatBreed.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_cat_breed",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteColor.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_color",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteDogBreed.Set {
			if err := func() error {
				if err := s.FavoriteDogBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_dog_breed",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteFishBreed.Set {
			if err := func() error {
				if err := s.FavoriteFishBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_fish_breed",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s PetRescuerListFavoriteCatBreed) Validate() error {
	switch s {
	case "siamese":
		return nil
	case "bengal":
		return nil
	case "lion":
		return nil
	case "tiger":
		return nil
	case "leopard":
		return nil
	case "other":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s PetRescuerListFavoriteColor) Validate() error {
	switch s {
	case "red":
		return nil
	case "green":
		return nil
	case "blue":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s PetRescuerListFavoriteDogBreed) Validate() error {
	switch s {
	case "Kuro":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s PetRescuerListFavoriteFishBreed) Validate() error {
	switch s {
	case "gold":
		return nil
	case "koi":
		return nil
	case "shark":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *UpdateAllTypesReq) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if s.Int8.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           -128,
					MaxSet:        true,
					Max:           127,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Int8.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "int8",
			Error: err,
		})
	}
	if err := func() error {
		if s.Int16.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           -32768,
					MaxSet:        true,
					Max:           32767,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Int16.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "int16",
			Error: err,
		})
	}
	if err := func() error {
		if s.Uint.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        true,
					Max:           4294967295,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Uint.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint",
			Error: err,
		})
	}
	if err := func() error {
		if s.Uint8.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        true,
					Max:           255,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Uint8.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint8",
			Error: err,
		})
	}
	if err := func() error {
		if s.Uint16.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        true,
					Max:           65535,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Uint16.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint16",
			Error: err,
		})
	}
	if err := func() error {
		if s.Uint32.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        true,
					Max:           4294967295,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Uint32.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint32",
			Error: err,
		})
	}
	if err := func() error {
		if s.Uint64.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        false,
					Max:           0,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Uint64.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "uint64",
			Error: err,
		})
	}
	if err := func() error {
		if s.Float32.Set {
			if err := func() error {
				if err := (validate.Float{}).Validate(float64(s.Float32.Value)); err != nil {
					return errors.Wrap(err, "float")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "float32",
			Error: err,
		})
	}
	if err := func() error {
		if s.Float64.Set {
			if err := func() error {
				if err := (validate.Float{}).Validate(float64(s.Float64.Value)); err != nil {
					return errors.Wrap(err, "float")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "float64",
			Error: err,
		})
	}
	if err := func() error {
		if s.State.Set {
			if err := func() error {
				if err := s.State.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "state",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s UpdateAllTypesReqState) Validate() error {
	switch s {
	case "on":
		return nil
	case "off":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *UpdateUserReq) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if s.Age.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        true,
					Max:           4294967295,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Age.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "age",
			Error: err,
		})
	}
	if err := func() error {
		if s.Height.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        true,
					Max:           4294967295,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Height.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "height",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteCatBreed.Set {
			if err := func() error {
				if err := s.FavoriteCatBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_cat_breed",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteDogBreed.Set {
			if err := func() error {
				if err := s.FavoriteDogBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_dog_breed",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteFishBreed.Set {
			if err := func() error {
				if err := s.FavoriteFishBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_fish_breed",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s UpdateUserReqFavoriteCatBreed) Validate() error {
	switch s {
	case "siamese":
		return nil
	case "bengal":
		return nil
	case "lion":
		return nil
	case "tiger":
		return nil
	case "leopard":
		return nil
	case "other":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UpdateUserReqFavoriteDogBreed) Validate() error {
	switch s {
	case "Kuro":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UpdateUserReqFavoriteFishBreed) Validate() error {
	switch s {
	case "gold":
		return nil
	case "koi":
		return nil
	case "shark":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *UserBestFriendRead) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Age)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "age",
			Error: err,
		})
	}
	if err := func() error {
		if s.Height.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        true,
					Max:           4294967295,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Height.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "height",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteCatBreed.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_cat_breed",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteColor.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_color",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteDogBreed.Set {
			if err := func() error {
				if err := s.FavoriteDogBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_dog_breed",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteFishBreed.Set {
			if err := func() error {
				if err := s.FavoriteFishBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_fish_breed",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s UserBestFriendReadFavoriteCatBreed) Validate() error {
	switch s {
	case "siamese":
		return nil
	case "bengal":
		return nil
	case "lion":
		return nil
	case "tiger":
		return nil
	case "leopard":
		return nil
	case "other":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UserBestFriendReadFavoriteColor) Validate() error {
	switch s {
	case "red":
		return nil
	case "green":
		return nil
	case "blue":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UserBestFriendReadFavoriteDogBreed) Validate() error {
	switch s {
	case "Kuro":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UserBestFriendReadFavoriteFishBreed) Validate() error {
	switch s {
	case "gold":
		return nil
	case "koi":
		return nil
	case "shark":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *UserCreate) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Age)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "age",
			Error: err,
		})
	}
	if err := func() error {
		if s.Height.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        true,
					Max:           4294967295,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Height.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "height",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteCatBreed.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_cat_breed",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteColor.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_color",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteDogBreed.Set {
			if err := func() error {
				if err := s.FavoriteDogBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_dog_breed",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteFishBreed.Set {
			if err := func() error {
				if err := s.FavoriteFishBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_fish_breed",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s UserCreateFavoriteCatBreed) Validate() error {
	switch s {
	case "siamese":
		return nil
	case "bengal":
		return nil
	case "lion":
		return nil
	case "tiger":
		return nil
	case "leopard":
		return nil
	case "other":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UserCreateFavoriteColor) Validate() error {
	switch s {
	case "red":
		return nil
	case "green":
		return nil
	case "blue":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UserCreateFavoriteDogBreed) Validate() error {
	switch s {
	case "Kuro":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UserCreateFavoriteFishBreed) Validate() error {
	switch s {
	case "gold":
		return nil
	case "koi":
		return nil
	case "shark":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *UserFavoriteHatRead) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := s.Type.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "type",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s UserFavoriteHatReadType) Validate() error {
	switch s {
	case "dad":
		return nil
	case "trucker":
		return nil
	case "snapback":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *UserList) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Age)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "age",
			Error: err,
		})
	}
	if err := func() error {
		if s.Height.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        true,
					Max:           4294967295,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Height.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "height",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteCatBreed.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_cat_breed",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteColor.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_color",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteDogBreed.Set {
			if err := func() error {
				if err := s.FavoriteDogBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_dog_breed",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteFishBreed.Set {
			if err := func() error {
				if err := s.FavoriteFishBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_fish_breed",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s UserListFavoriteCatBreed) Validate() error {
	switch s {
	case "siamese":
		return nil
	case "bengal":
		return nil
	case "lion":
		return nil
	case "tiger":
		return nil
	case "leopard":
		return nil
	case "other":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UserListFavoriteColor) Validate() error {
	switch s {
	case "red":
		return nil
	case "green":
		return nil
	case "blue":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UserListFavoriteDogBreed) Validate() error {
	switch s {
	case "Kuro":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UserListFavoriteFishBreed) Validate() error {
	switch s {
	case "gold":
		return nil
	case "koi":
		return nil
	case "shark":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *UserRead) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Age)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "age",
			Error: err,
		})
	}
	if err := func() error {
		if s.Height.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        true,
					Max:           4294967295,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Height.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "height",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteCatBreed.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_cat_breed",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteColor.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_color",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteDogBreed.Set {
			if err := func() error {
				if err := s.FavoriteDogBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_dog_breed",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteFishBreed.Set {
			if err := func() error {
				if err := s.FavoriteFishBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_fish_breed",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s UserReadFavoriteCatBreed) Validate() error {
	switch s {
	case "siamese":
		return nil
	case "bengal":
		return nil
	case "lion":
		return nil
	case "tiger":
		return nil
	case "leopard":
		return nil
	case "other":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UserReadFavoriteColor) Validate() error {
	switch s {
	case "red":
		return nil
	case "green":
		return nil
	case "blue":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UserReadFavoriteDogBreed) Validate() error {
	switch s {
	case "Kuro":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UserReadFavoriteFishBreed) Validate() error {
	switch s {
	case "gold":
		return nil
	case "koi":
		return nil
	case "shark":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s *UserUpdate) Validate() error {
	var failures []validate.FieldError
	if err := func() error {
		if err := (validate.Int{
			MinSet:        true,
			Min:           0,
			MaxSet:        true,
			Max:           4294967295,
			MinExclusive:  false,
			MaxExclusive:  false,
			MultipleOfSet: false,
			MultipleOf:    0,
		}).Validate(int64(s.Age)); err != nil {
			return errors.Wrap(err, "int")
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "age",
			Error: err,
		})
	}
	if err := func() error {
		if s.Height.Set {
			if err := func() error {
				if err := (validate.Int{
					MinSet:        true,
					Min:           0,
					MaxSet:        true,
					Max:           4294967295,
					MinExclusive:  false,
					MaxExclusive:  false,
					MultipleOfSet: false,
					MultipleOf:    0,
				}).Validate(int64(s.Height.Value)); err != nil {
					return errors.Wrap(err, "int")
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "height",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteCatBreed.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_cat_breed",
			Error: err,
		})
	}
	if err := func() error {
		if err := s.FavoriteColor.Validate(); err != nil {
			return err
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_color",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteDogBreed.Set {
			if err := func() error {
				if err := s.FavoriteDogBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_dog_breed",
			Error: err,
		})
	}
	if err := func() error {
		if s.FavoriteFishBreed.Set {
			if err := func() error {
				if err := s.FavoriteFishBreed.Value.Validate(); err != nil {
					return err
				}
				return nil
			}(); err != nil {
				return err
			}
		}
		return nil
	}(); err != nil {
		failures = append(failures, validate.FieldError{
			Name:  "favorite_fish_breed",
			Error: err,
		})
	}
	if len(failures) > 0 {
		return &validate.Error{Fields: failures}
	}
	return nil
}
func (s UserUpdateFavoriteCatBreed) Validate() error {
	switch s {
	case "siamese":
		return nil
	case "bengal":
		return nil
	case "lion":
		return nil
	case "tiger":
		return nil
	case "leopard":
		return nil
	case "other":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UserUpdateFavoriteColor) Validate() error {
	switch s {
	case "red":
		return nil
	case "green":
		return nil
	case "blue":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UserUpdateFavoriteDogBreed) Validate() error {
	switch s {
	case "Kuro":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
func (s UserUpdateFavoriteFishBreed) Validate() error {
	switch s {
	case "gold":
		return nil
	case "koi":
		return nil
	case "shark":
		return nil
	default:
		return errors.Errorf("invalid value: %v", s)
	}
}
