// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: validate/validate.proto

package validate

import (
	"bytes"
	"errors"
	"fmt"
	"net"
	"net/mail"
	"net/url"
	"regexp"
	"strings"
	"time"
	"unicode/utf8"

	"google.golang.org/protobuf/types/known/anypb"
)

// ensure the imports are used
var (
	_ = bytes.MinRead
	_ = errors.New("")
	_ = fmt.Print
	_ = utf8.UTFMax
	_ = (*regexp.Regexp)(nil)
	_ = (*strings.Reader)(nil)
	_ = net.IPv4len
	_ = time.Duration(0)
	_ = (*url.URL)(nil)
	_ = (*mail.Address)(nil)
	_ = anypb.Any{}
)

// Validate checks the field values on FieldRules with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *FieldRules) Validate() error {
	if m == nil {
		return nil
	}

	if v, ok := interface{}(m.GetMessage()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return FieldRulesValidationError{
				field:  "Message",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	switch m.Type.(type) {

	case *FieldRules_Float:

		if v, ok := interface{}(m.GetFloat()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Float",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Double:

		if v, ok := interface{}(m.GetDouble()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Double",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Int32:

		if v, ok := interface{}(m.GetInt32()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Int32",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Int64:

		if v, ok := interface{}(m.GetInt64()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Int64",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Uint32:

		if v, ok := interface{}(m.GetUint32()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Uint32",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Uint64:

		if v, ok := interface{}(m.GetUint64()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Uint64",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Sint32:

		if v, ok := interface{}(m.GetSint32()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Sint32",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Sint64:

		if v, ok := interface{}(m.GetSint64()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Sint64",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Fixed32:

		if v, ok := interface{}(m.GetFixed32()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Fixed32",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Fixed64:

		if v, ok := interface{}(m.GetFixed64()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Fixed64",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Sfixed32:

		if v, ok := interface{}(m.GetSfixed32()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Sfixed32",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Sfixed64:

		if v, ok := interface{}(m.GetSfixed64()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Sfixed64",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Bool:

		if v, ok := interface{}(m.GetBool()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Bool",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_String_:

		if v, ok := interface{}(m.GetString_()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "String_",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Bytes:

		if v, ok := interface{}(m.GetBytes()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Bytes",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Enum:

		if v, ok := interface{}(m.GetEnum()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Enum",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Repeated:

		if v, ok := interface{}(m.GetRepeated()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Repeated",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Map:

		if v, ok := interface{}(m.GetMap()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Map",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Any:

		if v, ok := interface{}(m.GetAny()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Any",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Duration:

		if v, ok := interface{}(m.GetDuration()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Duration",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *FieldRules_Timestamp:

		if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return FieldRulesValidationError{
					field:  "Timestamp",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	return nil
}

// FieldRulesValidationError is the validation error returned by
// FieldRules.Validate if the designated constraints aren't met.
type FieldRulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e FieldRulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e FieldRulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e FieldRulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e FieldRulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e FieldRulesValidationError) ErrorName() string { return "FieldRulesValidationError" }

// Error satisfies the builtin error interface
func (e FieldRulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sFieldRules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = FieldRulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = FieldRulesValidationError{}

// Validate checks the field values on FloatRules with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *FloatRules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Const

	// no validation rules for Lt

	// no validation rules for Lte

	// no validation rules for Gt

	// no validation rules for Gte

	// no validation rules for IgnoreEmpty

	return nil
}

// FloatRulesValidationError is the validation error returned by
// FloatRules.Validate if the designated constraints aren't met.
type FloatRulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e FloatRulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e FloatRulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e FloatRulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e FloatRulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e FloatRulesValidationError) ErrorName() string { return "FloatRulesValidationError" }

// Error satisfies the builtin error interface
func (e FloatRulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sFloatRules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = FloatRulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = FloatRulesValidationError{}

// Validate checks the field values on DoubleRules with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *DoubleRules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Const

	// no validation rules for Lt

	// no validation rules for Lte

	// no validation rules for Gt

	// no validation rules for Gte

	// no validation rules for IgnoreEmpty

	return nil
}

// DoubleRulesValidationError is the validation error returned by
// DoubleRules.Validate if the designated constraints aren't met.
type DoubleRulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DoubleRulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DoubleRulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DoubleRulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DoubleRulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DoubleRulesValidationError) ErrorName() string { return "DoubleRulesValidationError" }

// Error satisfies the builtin error interface
func (e DoubleRulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sDoubleRules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DoubleRulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DoubleRulesValidationError{}

// Validate checks the field values on Int32Rules with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Int32Rules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Const

	// no validation rules for Lt

	// no validation rules for Lte

	// no validation rules for Gt

	// no validation rules for Gte

	// no validation rules for IgnoreEmpty

	return nil
}

// Int32RulesValidationError is the validation error returned by
// Int32Rules.Validate if the designated constraints aren't met.
type Int32RulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e Int32RulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e Int32RulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e Int32RulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e Int32RulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e Int32RulesValidationError) ErrorName() string { return "Int32RulesValidationError" }

// Error satisfies the builtin error interface
func (e Int32RulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sInt32Rules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = Int32RulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = Int32RulesValidationError{}

// Validate checks the field values on Int64Rules with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Int64Rules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Const

	// no validation rules for Lt

	// no validation rules for Lte

	// no validation rules for Gt

	// no validation rules for Gte

	// no validation rules for IgnoreEmpty

	return nil
}

// Int64RulesValidationError is the validation error returned by
// Int64Rules.Validate if the designated constraints aren't met.
type Int64RulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e Int64RulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e Int64RulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e Int64RulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e Int64RulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e Int64RulesValidationError) ErrorName() string { return "Int64RulesValidationError" }

// Error satisfies the builtin error interface
func (e Int64RulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sInt64Rules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = Int64RulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = Int64RulesValidationError{}

// Validate checks the field values on UInt32Rules with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *UInt32Rules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Const

	// no validation rules for Lt

	// no validation rules for Lte

	// no validation rules for Gt

	// no validation rules for Gte

	// no validation rules for IgnoreEmpty

	return nil
}

// UInt32RulesValidationError is the validation error returned by
// UInt32Rules.Validate if the designated constraints aren't met.
type UInt32RulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e UInt32RulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e UInt32RulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e UInt32RulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e UInt32RulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e UInt32RulesValidationError) ErrorName() string { return "UInt32RulesValidationError" }

// Error satisfies the builtin error interface
func (e UInt32RulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sUInt32Rules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = UInt32RulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = UInt32RulesValidationError{}

// Validate checks the field values on UInt64Rules with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *UInt64Rules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Const

	// no validation rules for Lt

	// no validation rules for Lte

	// no validation rules for Gt

	// no validation rules for Gte

	// no validation rules for IgnoreEmpty

	return nil
}

// UInt64RulesValidationError is the validation error returned by
// UInt64Rules.Validate if the designated constraints aren't met.
type UInt64RulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e UInt64RulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e UInt64RulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e UInt64RulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e UInt64RulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e UInt64RulesValidationError) ErrorName() string { return "UInt64RulesValidationError" }

// Error satisfies the builtin error interface
func (e UInt64RulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sUInt64Rules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = UInt64RulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = UInt64RulesValidationError{}

// Validate checks the field values on SInt32Rules with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *SInt32Rules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Const

	// no validation rules for Lt

	// no validation rules for Lte

	// no validation rules for Gt

	// no validation rules for Gte

	// no validation rules for IgnoreEmpty

	return nil
}

// SInt32RulesValidationError is the validation error returned by
// SInt32Rules.Validate if the designated constraints aren't met.
type SInt32RulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e SInt32RulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e SInt32RulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e SInt32RulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e SInt32RulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e SInt32RulesValidationError) ErrorName() string { return "SInt32RulesValidationError" }

// Error satisfies the builtin error interface
func (e SInt32RulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sSInt32Rules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = SInt32RulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = SInt32RulesValidationError{}

// Validate checks the field values on SInt64Rules with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *SInt64Rules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Const

	// no validation rules for Lt

	// no validation rules for Lte

	// no validation rules for Gt

	// no validation rules for Gte

	// no validation rules for IgnoreEmpty

	return nil
}

// SInt64RulesValidationError is the validation error returned by
// SInt64Rules.Validate if the designated constraints aren't met.
type SInt64RulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e SInt64RulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e SInt64RulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e SInt64RulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e SInt64RulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e SInt64RulesValidationError) ErrorName() string { return "SInt64RulesValidationError" }

// Error satisfies the builtin error interface
func (e SInt64RulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sSInt64Rules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = SInt64RulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = SInt64RulesValidationError{}

// Validate checks the field values on Fixed32Rules with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *Fixed32Rules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Const

	// no validation rules for Lt

	// no validation rules for Lte

	// no validation rules for Gt

	// no validation rules for Gte

	// no validation rules for IgnoreEmpty

	return nil
}

// Fixed32RulesValidationError is the validation error returned by
// Fixed32Rules.Validate if the designated constraints aren't met.
type Fixed32RulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e Fixed32RulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e Fixed32RulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e Fixed32RulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e Fixed32RulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e Fixed32RulesValidationError) ErrorName() string { return "Fixed32RulesValidationError" }

// Error satisfies the builtin error interface
func (e Fixed32RulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sFixed32Rules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = Fixed32RulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = Fixed32RulesValidationError{}

// Validate checks the field values on Fixed64Rules with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *Fixed64Rules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Const

	// no validation rules for Lt

	// no validation rules for Lte

	// no validation rules for Gt

	// no validation rules for Gte

	// no validation rules for IgnoreEmpty

	return nil
}

// Fixed64RulesValidationError is the validation error returned by
// Fixed64Rules.Validate if the designated constraints aren't met.
type Fixed64RulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e Fixed64RulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e Fixed64RulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e Fixed64RulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e Fixed64RulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e Fixed64RulesValidationError) ErrorName() string { return "Fixed64RulesValidationError" }

// Error satisfies the builtin error interface
func (e Fixed64RulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sFixed64Rules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = Fixed64RulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = Fixed64RulesValidationError{}

// Validate checks the field values on SFixed32Rules with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *SFixed32Rules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Const

	// no validation rules for Lt

	// no validation rules for Lte

	// no validation rules for Gt

	// no validation rules for Gte

	// no validation rules for IgnoreEmpty

	return nil
}

// SFixed32RulesValidationError is the validation error returned by
// SFixed32Rules.Validate if the designated constraints aren't met.
type SFixed32RulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e SFixed32RulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e SFixed32RulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e SFixed32RulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e SFixed32RulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e SFixed32RulesValidationError) ErrorName() string { return "SFixed32RulesValidationError" }

// Error satisfies the builtin error interface
func (e SFixed32RulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sSFixed32Rules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = SFixed32RulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = SFixed32RulesValidationError{}

// Validate checks the field values on SFixed64Rules with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *SFixed64Rules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Const

	// no validation rules for Lt

	// no validation rules for Lte

	// no validation rules for Gt

	// no validation rules for Gte

	// no validation rules for IgnoreEmpty

	return nil
}

// SFixed64RulesValidationError is the validation error returned by
// SFixed64Rules.Validate if the designated constraints aren't met.
type SFixed64RulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e SFixed64RulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e SFixed64RulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e SFixed64RulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e SFixed64RulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e SFixed64RulesValidationError) ErrorName() string { return "SFixed64RulesValidationError" }

// Error satisfies the builtin error interface
func (e SFixed64RulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sSFixed64Rules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = SFixed64RulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = SFixed64RulesValidationError{}

// Validate checks the field values on BoolRules with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *BoolRules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Const

	return nil
}

// BoolRulesValidationError is the validation error returned by
// BoolRules.Validate if the designated constraints aren't met.
type BoolRulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BoolRulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BoolRulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BoolRulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BoolRulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BoolRulesValidationError) ErrorName() string { return "BoolRulesValidationError" }

// Error satisfies the builtin error interface
func (e BoolRulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sBoolRules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BoolRulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BoolRulesValidationError{}

// Validate checks the field values on StringRules with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *StringRules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Const

	// no validation rules for Len

	// no validation rules for MinLen

	// no validation rules for MaxLen

	// no validation rules for LenBytes

	// no validation rules for MinBytes

	// no validation rules for MaxBytes

	// no validation rules for Pattern

	// no validation rules for Prefix

	// no validation rules for Suffix

	// no validation rules for Contains

	// no validation rules for NotContains

	// no validation rules for Strict

	// no validation rules for IgnoreEmpty

	switch m.WellKnown.(type) {

	case *StringRules_Email:
		// no validation rules for Email

	case *StringRules_Hostname:
		// no validation rules for Hostname

	case *StringRules_Ip:
		// no validation rules for Ip

	case *StringRules_Ipv4:
		// no validation rules for Ipv4

	case *StringRules_Ipv6:
		// no validation rules for Ipv6

	case *StringRules_Uri:
		// no validation rules for Uri

	case *StringRules_UriRef:
		// no validation rules for UriRef

	case *StringRules_Address:
		// no validation rules for Address

	case *StringRules_Uuid:
		// no validation rules for Uuid

	case *StringRules_WellKnownRegex:
		// no validation rules for WellKnownRegex

	}

	return nil
}

// StringRulesValidationError is the validation error returned by
// StringRules.Validate if the designated constraints aren't met.
type StringRulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e StringRulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e StringRulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e StringRulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e StringRulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e StringRulesValidationError) ErrorName() string { return "StringRulesValidationError" }

// Error satisfies the builtin error interface
func (e StringRulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sStringRules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = StringRulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = StringRulesValidationError{}

// Validate checks the field values on BytesRules with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *BytesRules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Const

	// no validation rules for Len

	// no validation rules for MinLen

	// no validation rules for MaxLen

	// no validation rules for Pattern

	// no validation rules for Prefix

	// no validation rules for Suffix

	// no validation rules for Contains

	// no validation rules for IgnoreEmpty

	switch m.WellKnown.(type) {

	case *BytesRules_Ip:
		// no validation rules for Ip

	case *BytesRules_Ipv4:
		// no validation rules for Ipv4

	case *BytesRules_Ipv6:
		// no validation rules for Ipv6

	}

	return nil
}

// BytesRulesValidationError is the validation error returned by
// BytesRules.Validate if the designated constraints aren't met.
type BytesRulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BytesRulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BytesRulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BytesRulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BytesRulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BytesRulesValidationError) ErrorName() string { return "BytesRulesValidationError" }

// Error satisfies the builtin error interface
func (e BytesRulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sBytesRules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BytesRulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BytesRulesValidationError{}

// Validate checks the field values on EnumRules with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *EnumRules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Const

	// no validation rules for DefinedOnly

	return nil
}

// EnumRulesValidationError is the validation error returned by
// EnumRules.Validate if the designated constraints aren't met.
type EnumRulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e EnumRulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e EnumRulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e EnumRulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e EnumRulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e EnumRulesValidationError) ErrorName() string { return "EnumRulesValidationError" }

// Error satisfies the builtin error interface
func (e EnumRulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sEnumRules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = EnumRulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = EnumRulesValidationError{}

// Validate checks the field values on MessageRules with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *MessageRules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Skip

	// no validation rules for Required

	return nil
}

// MessageRulesValidationError is the validation error returned by
// MessageRules.Validate if the designated constraints aren't met.
type MessageRulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e MessageRulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e MessageRulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e MessageRulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e MessageRulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e MessageRulesValidationError) ErrorName() string { return "MessageRulesValidationError" }

// Error satisfies the builtin error interface
func (e MessageRulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sMessageRules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = MessageRulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = MessageRulesValidationError{}

// Validate checks the field values on RepeatedRules with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *RepeatedRules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for MinItems

	// no validation rules for MaxItems

	// no validation rules for Unique

	if v, ok := interface{}(m.GetItems()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return RepeatedRulesValidationError{
				field:  "Items",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for IgnoreEmpty

	return nil
}

// RepeatedRulesValidationError is the validation error returned by
// RepeatedRules.Validate if the designated constraints aren't met.
type RepeatedRulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e RepeatedRulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e RepeatedRulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e RepeatedRulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e RepeatedRulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e RepeatedRulesValidationError) ErrorName() string { return "RepeatedRulesValidationError" }

// Error satisfies the builtin error interface
func (e RepeatedRulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sRepeatedRules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = RepeatedRulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = RepeatedRulesValidationError{}

// Validate checks the field values on MapRules with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *MapRules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for MinPairs

	// no validation rules for MaxPairs

	// no validation rules for NoSparse

	if v, ok := interface{}(m.GetKeys()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return MapRulesValidationError{
				field:  "Keys",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if v, ok := interface{}(m.GetValues()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return MapRulesValidationError{
				field:  "Values",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for IgnoreEmpty

	return nil
}

// MapRulesValidationError is the validation error returned by
// MapRules.Validate if the designated constraints aren't met.
type MapRulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e MapRulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e MapRulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e MapRulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e MapRulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e MapRulesValidationError) ErrorName() string { return "MapRulesValidationError" }

// Error satisfies the builtin error interface
func (e MapRulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sMapRules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = MapRulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = MapRulesValidationError{}

// Validate checks the field values on AnyRules with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *AnyRules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Required

	return nil
}

// AnyRulesValidationError is the validation error returned by
// AnyRules.Validate if the designated constraints aren't met.
type AnyRulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e AnyRulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e AnyRulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e AnyRulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e AnyRulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e AnyRulesValidationError) ErrorName() string { return "AnyRulesValidationError" }

// Error satisfies the builtin error interface
func (e AnyRulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sAnyRules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = AnyRulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = AnyRulesValidationError{}

// Validate checks the field values on DurationRules with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *DurationRules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Required

	if v, ok := interface{}(m.GetConst()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DurationRulesValidationError{
				field:  "Const",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if v, ok := interface{}(m.GetLt()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DurationRulesValidationError{
				field:  "Lt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if v, ok := interface{}(m.GetLte()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DurationRulesValidationError{
				field:  "Lte",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if v, ok := interface{}(m.GetGt()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DurationRulesValidationError{
				field:  "Gt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if v, ok := interface{}(m.GetGte()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DurationRulesValidationError{
				field:  "Gte",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	for idx, item := range m.GetIn() {
		_, _ = idx, item

		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return DurationRulesValidationError{
					field:  fmt.Sprintf("In[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	for idx, item := range m.GetNotIn() {
		_, _ = idx, item

		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return DurationRulesValidationError{
					field:  fmt.Sprintf("NotIn[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	return nil
}

// DurationRulesValidationError is the validation error returned by
// DurationRules.Validate if the designated constraints aren't met.
type DurationRulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DurationRulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DurationRulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DurationRulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DurationRulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DurationRulesValidationError) ErrorName() string { return "DurationRulesValidationError" }

// Error satisfies the builtin error interface
func (e DurationRulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sDurationRules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DurationRulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DurationRulesValidationError{}

// Validate checks the field values on TimestampRules with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *TimestampRules) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Required

	if v, ok := interface{}(m.GetConst()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return TimestampRulesValidationError{
				field:  "Const",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if v, ok := interface{}(m.GetLt()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return TimestampRulesValidationError{
				field:  "Lt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if v, ok := interface{}(m.GetLte()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return TimestampRulesValidationError{
				field:  "Lte",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if v, ok := interface{}(m.GetGt()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return TimestampRulesValidationError{
				field:  "Gt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if v, ok := interface{}(m.GetGte()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return TimestampRulesValidationError{
				field:  "Gte",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for LtNow

	// no validation rules for GtNow

	if v, ok := interface{}(m.GetWithin()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return TimestampRulesValidationError{
				field:  "Within",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	return nil
}

// TimestampRulesValidationError is the validation error returned by
// TimestampRules.Validate if the designated constraints aren't met.
type TimestampRulesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e TimestampRulesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e TimestampRulesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e TimestampRulesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e TimestampRulesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e TimestampRulesValidationError) ErrorName() string { return "TimestampRulesValidationError" }

// Error satisfies the builtin error interface
func (e TimestampRulesValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sTimestampRules.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = TimestampRulesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = TimestampRulesValidationError{}
