// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: envoy/admin/v3/config_dump_shared.proto

package adminv3

import (
	"bytes"
	"errors"
	"fmt"
	"net"
	"net/mail"
	"net/url"
	"regexp"
	"sort"
	"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{}
	_ = sort.Sort
)

// Validate checks the field values on UpdateFailureState with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *UpdateFailureState) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on UpdateFailureState with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// UpdateFailureStateMultiError, or nil if none found.
func (m *UpdateFailureState) ValidateAll() error {
	return m.validate(true)
}

func (m *UpdateFailureState) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetFailedConfiguration()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, UpdateFailureStateValidationError{
					field:  "FailedConfiguration",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, UpdateFailureStateValidationError{
					field:  "FailedConfiguration",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetFailedConfiguration()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return UpdateFailureStateValidationError{
				field:  "FailedConfiguration",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetLastUpdateAttempt()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, UpdateFailureStateValidationError{
					field:  "LastUpdateAttempt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, UpdateFailureStateValidationError{
					field:  "LastUpdateAttempt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetLastUpdateAttempt()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return UpdateFailureStateValidationError{
				field:  "LastUpdateAttempt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for Details

	// no validation rules for VersionInfo

	if len(errors) > 0 {
		return UpdateFailureStateMultiError(errors)
	}

	return nil
}

// UpdateFailureStateMultiError is an error wrapping multiple validation errors
// returned by UpdateFailureState.ValidateAll() if the designated constraints
// aren't met.
type UpdateFailureStateMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m UpdateFailureStateMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m UpdateFailureStateMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e UpdateFailureStateValidationError) 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 %sUpdateFailureState.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = UpdateFailureStateValidationError{}

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

// Validate checks the field values on ListenersConfigDump with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *ListenersConfigDump) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListenersConfigDump with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// ListenersConfigDumpMultiError, or nil if none found.
func (m *ListenersConfigDump) ValidateAll() error {
	return m.validate(true)
}

func (m *ListenersConfigDump) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for VersionInfo

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ListenersConfigDumpValidationError{
						field:  fmt.Sprintf("StaticListeners[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ListenersConfigDumpValidationError{
						field:  fmt.Sprintf("StaticListeners[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return ListenersConfigDumpValidationError{
					field:  fmt.Sprintf("StaticListeners[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ListenersConfigDumpValidationError{
						field:  fmt.Sprintf("DynamicListeners[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ListenersConfigDumpValidationError{
						field:  fmt.Sprintf("DynamicListeners[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return ListenersConfigDumpValidationError{
					field:  fmt.Sprintf("DynamicListeners[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return ListenersConfigDumpMultiError(errors)
	}

	return nil
}

// ListenersConfigDumpMultiError is an error wrapping multiple validation
// errors returned by ListenersConfigDump.ValidateAll() if the designated
// constraints aren't met.
type ListenersConfigDumpMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListenersConfigDumpMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ListenersConfigDumpMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e ListenersConfigDumpValidationError) 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 %sListenersConfigDump.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListenersConfigDumpValidationError{}

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

// Validate checks the field values on ClustersConfigDump with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *ClustersConfigDump) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ClustersConfigDump with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// ClustersConfigDumpMultiError, or nil if none found.
func (m *ClustersConfigDump) ValidateAll() error {
	return m.validate(true)
}

func (m *ClustersConfigDump) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for VersionInfo

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ClustersConfigDumpValidationError{
						field:  fmt.Sprintf("StaticClusters[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ClustersConfigDumpValidationError{
						field:  fmt.Sprintf("StaticClusters[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return ClustersConfigDumpValidationError{
					field:  fmt.Sprintf("StaticClusters[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ClustersConfigDumpValidationError{
						field:  fmt.Sprintf("DynamicActiveClusters[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ClustersConfigDumpValidationError{
						field:  fmt.Sprintf("DynamicActiveClusters[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return ClustersConfigDumpValidationError{
					field:  fmt.Sprintf("DynamicActiveClusters[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ClustersConfigDumpValidationError{
						field:  fmt.Sprintf("DynamicWarmingClusters[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ClustersConfigDumpValidationError{
						field:  fmt.Sprintf("DynamicWarmingClusters[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return ClustersConfigDumpValidationError{
					field:  fmt.Sprintf("DynamicWarmingClusters[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return ClustersConfigDumpMultiError(errors)
	}

	return nil
}

// ClustersConfigDumpMultiError is an error wrapping multiple validation errors
// returned by ClustersConfigDump.ValidateAll() if the designated constraints
// aren't met.
type ClustersConfigDumpMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ClustersConfigDumpMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ClustersConfigDumpMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e ClustersConfigDumpValidationError) 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 %sClustersConfigDump.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ClustersConfigDumpValidationError{}

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

// Validate checks the field values on RoutesConfigDump with the rules defined
// in the proto definition for this message. If any rules are violated, the
// first error encountered is returned, or nil if there are no violations.
func (m *RoutesConfigDump) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on RoutesConfigDump with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// RoutesConfigDumpMultiError, or nil if none found.
func (m *RoutesConfigDump) ValidateAll() error {
	return m.validate(true)
}

func (m *RoutesConfigDump) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, RoutesConfigDumpValidationError{
						field:  fmt.Sprintf("StaticRouteConfigs[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, RoutesConfigDumpValidationError{
						field:  fmt.Sprintf("StaticRouteConfigs[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return RoutesConfigDumpValidationError{
					field:  fmt.Sprintf("StaticRouteConfigs[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, RoutesConfigDumpValidationError{
						field:  fmt.Sprintf("DynamicRouteConfigs[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, RoutesConfigDumpValidationError{
						field:  fmt.Sprintf("DynamicRouteConfigs[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return RoutesConfigDumpValidationError{
					field:  fmt.Sprintf("DynamicRouteConfigs[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return RoutesConfigDumpMultiError(errors)
	}

	return nil
}

// RoutesConfigDumpMultiError is an error wrapping multiple validation errors
// returned by RoutesConfigDump.ValidateAll() if the designated constraints
// aren't met.
type RoutesConfigDumpMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m RoutesConfigDumpMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m RoutesConfigDumpMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e RoutesConfigDumpValidationError) 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 %sRoutesConfigDump.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = RoutesConfigDumpValidationError{}

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

// Validate checks the field values on ScopedRoutesConfigDump with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *ScopedRoutesConfigDump) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ScopedRoutesConfigDump with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// ScopedRoutesConfigDumpMultiError, or nil if none found.
func (m *ScopedRoutesConfigDump) ValidateAll() error {
	return m.validate(true)
}

func (m *ScopedRoutesConfigDump) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ScopedRoutesConfigDumpValidationError{
						field:  fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ScopedRoutesConfigDumpValidationError{
						field:  fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return ScopedRoutesConfigDumpValidationError{
					field:  fmt.Sprintf("InlineScopedRouteConfigs[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ScopedRoutesConfigDumpValidationError{
						field:  fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ScopedRoutesConfigDumpValidationError{
						field:  fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return ScopedRoutesConfigDumpValidationError{
					field:  fmt.Sprintf("DynamicScopedRouteConfigs[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return ScopedRoutesConfigDumpMultiError(errors)
	}

	return nil
}

// ScopedRoutesConfigDumpMultiError is an error wrapping multiple validation
// errors returned by ScopedRoutesConfigDump.ValidateAll() if the designated
// constraints aren't met.
type ScopedRoutesConfigDumpMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ScopedRoutesConfigDumpMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ScopedRoutesConfigDumpMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e ScopedRoutesConfigDumpValidationError) 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 %sScopedRoutesConfigDump.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ScopedRoutesConfigDumpValidationError{}

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

// Validate checks the field values on EndpointsConfigDump with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *EndpointsConfigDump) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on EndpointsConfigDump with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// EndpointsConfigDumpMultiError, or nil if none found.
func (m *EndpointsConfigDump) ValidateAll() error {
	return m.validate(true)
}

func (m *EndpointsConfigDump) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, EndpointsConfigDumpValidationError{
						field:  fmt.Sprintf("StaticEndpointConfigs[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, EndpointsConfigDumpValidationError{
						field:  fmt.Sprintf("StaticEndpointConfigs[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return EndpointsConfigDumpValidationError{
					field:  fmt.Sprintf("StaticEndpointConfigs[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, EndpointsConfigDumpValidationError{
						field:  fmt.Sprintf("DynamicEndpointConfigs[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, EndpointsConfigDumpValidationError{
						field:  fmt.Sprintf("DynamicEndpointConfigs[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return EndpointsConfigDumpValidationError{
					field:  fmt.Sprintf("DynamicEndpointConfigs[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return EndpointsConfigDumpMultiError(errors)
	}

	return nil
}

// EndpointsConfigDumpMultiError is an error wrapping multiple validation
// errors returned by EndpointsConfigDump.ValidateAll() if the designated
// constraints aren't met.
type EndpointsConfigDumpMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m EndpointsConfigDumpMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m EndpointsConfigDumpMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e EndpointsConfigDumpValidationError) 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 %sEndpointsConfigDump.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = EndpointsConfigDumpValidationError{}

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

// Validate checks the field values on EcdsConfigDump with the rules defined in
// the proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *EcdsConfigDump) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on EcdsConfigDump with the rules defined
// in the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in EcdsConfigDumpMultiError,
// or nil if none found.
func (m *EcdsConfigDump) ValidateAll() error {
	return m.validate(true)
}

func (m *EcdsConfigDump) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, EcdsConfigDumpValidationError{
						field:  fmt.Sprintf("EcdsFilters[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, EcdsConfigDumpValidationError{
						field:  fmt.Sprintf("EcdsFilters[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return EcdsConfigDumpValidationError{
					field:  fmt.Sprintf("EcdsFilters[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return EcdsConfigDumpMultiError(errors)
	}

	return nil
}

// EcdsConfigDumpMultiError is an error wrapping multiple validation errors
// returned by EcdsConfigDump.ValidateAll() if the designated constraints
// aren't met.
type EcdsConfigDumpMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m EcdsConfigDumpMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m EcdsConfigDumpMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e EcdsConfigDumpValidationError) 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 %sEcdsConfigDump.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = EcdsConfigDumpValidationError{}

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

// Validate checks the field values on ListenersConfigDump_StaticListener with
// the rules defined in the proto definition for this message. If any rules
// are violated, the first error encountered is returned, or nil if there are
// no violations.
func (m *ListenersConfigDump_StaticListener) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListenersConfigDump_StaticListener
// with the rules defined in the proto definition for this message. If any
// rules are violated, the result is a list of violation errors wrapped in
// ListenersConfigDump_StaticListenerMultiError, or nil if none found.
func (m *ListenersConfigDump_StaticListener) ValidateAll() error {
	return m.validate(true)
}

func (m *ListenersConfigDump_StaticListener) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetListener()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ListenersConfigDump_StaticListenerValidationError{
					field:  "Listener",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ListenersConfigDump_StaticListenerValidationError{
					field:  "Listener",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ListenersConfigDump_StaticListenerValidationError{
				field:  "Listener",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetLastUpdated()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ListenersConfigDump_StaticListenerValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ListenersConfigDump_StaticListenerValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ListenersConfigDump_StaticListenerValidationError{
				field:  "LastUpdated",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return ListenersConfigDump_StaticListenerMultiError(errors)
	}

	return nil
}

// ListenersConfigDump_StaticListenerMultiError is an error wrapping multiple
// validation errors returned by
// ListenersConfigDump_StaticListener.ValidateAll() if the designated
// constraints aren't met.
type ListenersConfigDump_StaticListenerMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListenersConfigDump_StaticListenerMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ListenersConfigDump_StaticListenerMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e ListenersConfigDump_StaticListenerValidationError) 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 %sListenersConfigDump_StaticListener.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListenersConfigDump_StaticListenerValidationError{}

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

// Validate checks the field values on ListenersConfigDump_DynamicListenerState
// with the rules defined in the proto definition for this message. If any
// rules are violated, the first error encountered is returned, or nil if
// there are no violations.
func (m *ListenersConfigDump_DynamicListenerState) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// ListenersConfigDump_DynamicListenerState with the rules defined in the
// proto definition for this message. If any rules are violated, the result is
// a list of violation errors wrapped in
// ListenersConfigDump_DynamicListenerStateMultiError, or nil if none found.
func (m *ListenersConfigDump_DynamicListenerState) ValidateAll() error {
	return m.validate(true)
}

func (m *ListenersConfigDump_DynamicListenerState) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for VersionInfo

	if all {
		switch v := interface{}(m.GetListener()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{
					field:  "Listener",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{
					field:  "Listener",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetListener()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ListenersConfigDump_DynamicListenerStateValidationError{
				field:  "Listener",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetLastUpdated()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ListenersConfigDump_DynamicListenerStateValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ListenersConfigDump_DynamicListenerStateValidationError{
				field:  "LastUpdated",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return ListenersConfigDump_DynamicListenerStateMultiError(errors)
	}

	return nil
}

// ListenersConfigDump_DynamicListenerStateMultiError is an error wrapping
// multiple validation errors returned by
// ListenersConfigDump_DynamicListenerState.ValidateAll() if the designated
// constraints aren't met.
type ListenersConfigDump_DynamicListenerStateMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListenersConfigDump_DynamicListenerStateMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ListenersConfigDump_DynamicListenerStateMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e ListenersConfigDump_DynamicListenerStateValidationError) 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 %sListenersConfigDump_DynamicListenerState.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListenersConfigDump_DynamicListenerStateValidationError{}

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

// Validate checks the field values on ListenersConfigDump_DynamicListener with
// the rules defined in the proto definition for this message. If any rules
// are violated, the first error encountered is returned, or nil if there are
// no violations.
func (m *ListenersConfigDump_DynamicListener) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListenersConfigDump_DynamicListener
// with the rules defined in the proto definition for this message. If any
// rules are violated, the result is a list of violation errors wrapped in
// ListenersConfigDump_DynamicListenerMultiError, or nil if none found.
func (m *ListenersConfigDump_DynamicListener) ValidateAll() error {
	return m.validate(true)
}

func (m *ListenersConfigDump_DynamicListener) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Name

	if all {
		switch v := interface{}(m.GetActiveState()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{
					field:  "ActiveState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{
					field:  "ActiveState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetActiveState()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ListenersConfigDump_DynamicListenerValidationError{
				field:  "ActiveState",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetWarmingState()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{
					field:  "WarmingState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{
					field:  "WarmingState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetWarmingState()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ListenersConfigDump_DynamicListenerValidationError{
				field:  "WarmingState",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetDrainingState()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{
					field:  "DrainingState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{
					field:  "DrainingState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetDrainingState()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ListenersConfigDump_DynamicListenerValidationError{
				field:  "DrainingState",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetErrorState()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{
					field:  "ErrorState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ListenersConfigDump_DynamicListenerValidationError{
					field:  "ErrorState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ListenersConfigDump_DynamicListenerValidationError{
				field:  "ErrorState",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for ClientStatus

	if len(errors) > 0 {
		return ListenersConfigDump_DynamicListenerMultiError(errors)
	}

	return nil
}

// ListenersConfigDump_DynamicListenerMultiError is an error wrapping multiple
// validation errors returned by
// ListenersConfigDump_DynamicListener.ValidateAll() if the designated
// constraints aren't met.
type ListenersConfigDump_DynamicListenerMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListenersConfigDump_DynamicListenerMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ListenersConfigDump_DynamicListenerMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e ListenersConfigDump_DynamicListenerValidationError) 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 %sListenersConfigDump_DynamicListener.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListenersConfigDump_DynamicListenerValidationError{}

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

// Validate checks the field values on ClustersConfigDump_StaticCluster with
// the rules defined in the proto definition for this message. If any rules
// are violated, the first error encountered is returned, or nil if there are
// no violations.
func (m *ClustersConfigDump_StaticCluster) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ClustersConfigDump_StaticCluster with
// the rules defined in the proto definition for this message. If any rules
// are violated, the result is a list of violation errors wrapped in
// ClustersConfigDump_StaticClusterMultiError, or nil if none found.
func (m *ClustersConfigDump_StaticCluster) ValidateAll() error {
	return m.validate(true)
}

func (m *ClustersConfigDump_StaticCluster) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetCluster()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ClustersConfigDump_StaticClusterValidationError{
					field:  "Cluster",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ClustersConfigDump_StaticClusterValidationError{
					field:  "Cluster",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ClustersConfigDump_StaticClusterValidationError{
				field:  "Cluster",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetLastUpdated()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ClustersConfigDump_StaticClusterValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ClustersConfigDump_StaticClusterValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ClustersConfigDump_StaticClusterValidationError{
				field:  "LastUpdated",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return ClustersConfigDump_StaticClusterMultiError(errors)
	}

	return nil
}

// ClustersConfigDump_StaticClusterMultiError is an error wrapping multiple
// validation errors returned by
// ClustersConfigDump_StaticCluster.ValidateAll() if the designated
// constraints aren't met.
type ClustersConfigDump_StaticClusterMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ClustersConfigDump_StaticClusterMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ClustersConfigDump_StaticClusterMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e ClustersConfigDump_StaticClusterValidationError) 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 %sClustersConfigDump_StaticCluster.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ClustersConfigDump_StaticClusterValidationError{}

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

// Validate checks the field values on ClustersConfigDump_DynamicCluster with
// the rules defined in the proto definition for this message. If any rules
// are violated, the first error encountered is returned, or nil if there are
// no violations.
func (m *ClustersConfigDump_DynamicCluster) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ClustersConfigDump_DynamicCluster
// with the rules defined in the proto definition for this message. If any
// rules are violated, the result is a list of violation errors wrapped in
// ClustersConfigDump_DynamicClusterMultiError, or nil if none found.
func (m *ClustersConfigDump_DynamicCluster) ValidateAll() error {
	return m.validate(true)
}

func (m *ClustersConfigDump_DynamicCluster) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for VersionInfo

	if all {
		switch v := interface{}(m.GetCluster()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{
					field:  "Cluster",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{
					field:  "Cluster",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ClustersConfigDump_DynamicClusterValidationError{
				field:  "Cluster",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetLastUpdated()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ClustersConfigDump_DynamicClusterValidationError{
				field:  "LastUpdated",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetErrorState()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{
					field:  "ErrorState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ClustersConfigDump_DynamicClusterValidationError{
					field:  "ErrorState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ClustersConfigDump_DynamicClusterValidationError{
				field:  "ErrorState",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for ClientStatus

	if len(errors) > 0 {
		return ClustersConfigDump_DynamicClusterMultiError(errors)
	}

	return nil
}

// ClustersConfigDump_DynamicClusterMultiError is an error wrapping multiple
// validation errors returned by
// ClustersConfigDump_DynamicCluster.ValidateAll() if the designated
// constraints aren't met.
type ClustersConfigDump_DynamicClusterMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ClustersConfigDump_DynamicClusterMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ClustersConfigDump_DynamicClusterMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e ClustersConfigDump_DynamicClusterValidationError) 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 %sClustersConfigDump_DynamicCluster.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ClustersConfigDump_DynamicClusterValidationError{}

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

// Validate checks the field values on RoutesConfigDump_StaticRouteConfig with
// the rules defined in the proto definition for this message. If any rules
// are violated, the first error encountered is returned, or nil if there are
// no violations.
func (m *RoutesConfigDump_StaticRouteConfig) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on RoutesConfigDump_StaticRouteConfig
// with the rules defined in the proto definition for this message. If any
// rules are violated, the result is a list of violation errors wrapped in
// RoutesConfigDump_StaticRouteConfigMultiError, or nil if none found.
func (m *RoutesConfigDump_StaticRouteConfig) ValidateAll() error {
	return m.validate(true)
}

func (m *RoutesConfigDump_StaticRouteConfig) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetRouteConfig()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{
					field:  "RouteConfig",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{
					field:  "RouteConfig",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return RoutesConfigDump_StaticRouteConfigValidationError{
				field:  "RouteConfig",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetLastUpdated()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, RoutesConfigDump_StaticRouteConfigValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return RoutesConfigDump_StaticRouteConfigValidationError{
				field:  "LastUpdated",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return RoutesConfigDump_StaticRouteConfigMultiError(errors)
	}

	return nil
}

// RoutesConfigDump_StaticRouteConfigMultiError is an error wrapping multiple
// validation errors returned by
// RoutesConfigDump_StaticRouteConfig.ValidateAll() if the designated
// constraints aren't met.
type RoutesConfigDump_StaticRouteConfigMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m RoutesConfigDump_StaticRouteConfigMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m RoutesConfigDump_StaticRouteConfigMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e RoutesConfigDump_StaticRouteConfigValidationError) 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 %sRoutesConfigDump_StaticRouteConfig.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = RoutesConfigDump_StaticRouteConfigValidationError{}

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

// Validate checks the field values on RoutesConfigDump_DynamicRouteConfig with
// the rules defined in the proto definition for this message. If any rules
// are violated, the first error encountered is returned, or nil if there are
// no violations.
func (m *RoutesConfigDump_DynamicRouteConfig) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on RoutesConfigDump_DynamicRouteConfig
// with the rules defined in the proto definition for this message. If any
// rules are violated, the result is a list of violation errors wrapped in
// RoutesConfigDump_DynamicRouteConfigMultiError, or nil if none found.
func (m *RoutesConfigDump_DynamicRouteConfig) ValidateAll() error {
	return m.validate(true)
}

func (m *RoutesConfigDump_DynamicRouteConfig) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for VersionInfo

	if all {
		switch v := interface{}(m.GetRouteConfig()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{
					field:  "RouteConfig",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{
					field:  "RouteConfig",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return RoutesConfigDump_DynamicRouteConfigValidationError{
				field:  "RouteConfig",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetLastUpdated()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return RoutesConfigDump_DynamicRouteConfigValidationError{
				field:  "LastUpdated",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetErrorState()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{
					field:  "ErrorState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, RoutesConfigDump_DynamicRouteConfigValidationError{
					field:  "ErrorState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return RoutesConfigDump_DynamicRouteConfigValidationError{
				field:  "ErrorState",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for ClientStatus

	if len(errors) > 0 {
		return RoutesConfigDump_DynamicRouteConfigMultiError(errors)
	}

	return nil
}

// RoutesConfigDump_DynamicRouteConfigMultiError is an error wrapping multiple
// validation errors returned by
// RoutesConfigDump_DynamicRouteConfig.ValidateAll() if the designated
// constraints aren't met.
type RoutesConfigDump_DynamicRouteConfigMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m RoutesConfigDump_DynamicRouteConfigMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m RoutesConfigDump_DynamicRouteConfigMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e RoutesConfigDump_DynamicRouteConfigValidationError) 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 %sRoutesConfigDump_DynamicRouteConfig.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = RoutesConfigDump_DynamicRouteConfigValidationError{}

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

// Validate checks the field values on
// ScopedRoutesConfigDump_InlineScopedRouteConfigs with the rules defined in
// the proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// ScopedRoutesConfigDump_InlineScopedRouteConfigs with the rules defined in
// the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in
// ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError, or nil if none found.
func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) ValidateAll() error {
	return m.validate(true)
}

func (m *ScopedRoutesConfigDump_InlineScopedRouteConfigs) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Name

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{
						field:  fmt.Sprintf("ScopedRouteConfigs[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{
						field:  fmt.Sprintf("ScopedRouteConfigs[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{
					field:  fmt.Sprintf("ScopedRouteConfigs[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if all {
		switch v := interface{}(m.GetLastUpdated()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{
				field:  "LastUpdated",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError(errors)
	}

	return nil
}

// ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError is an error
// wrapping multiple validation errors returned by
// ScopedRoutesConfigDump_InlineScopedRouteConfigs.ValidateAll() if the
// designated constraints aren't met.
type ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ScopedRoutesConfigDump_InlineScopedRouteConfigsMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError) 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 %sScopedRoutesConfigDump_InlineScopedRouteConfigs.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ScopedRoutesConfigDump_InlineScopedRouteConfigsValidationError{}

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

// Validate checks the field values on
// ScopedRoutesConfigDump_DynamicScopedRouteConfigs with the rules defined in
// the proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// ScopedRoutesConfigDump_DynamicScopedRouteConfigs with the rules defined in
// the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in
// ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError, or nil if none found.
func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) ValidateAll() error {
	return m.validate(true)
}

func (m *ScopedRoutesConfigDump_DynamicScopedRouteConfigs) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Name

	// no validation rules for VersionInfo

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{
						field:  fmt.Sprintf("ScopedRouteConfigs[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{
						field:  fmt.Sprintf("ScopedRouteConfigs[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{
					field:  fmt.Sprintf("ScopedRouteConfigs[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if all {
		switch v := interface{}(m.GetLastUpdated()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{
				field:  "LastUpdated",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetErrorState()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{
					field:  "ErrorState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{
					field:  "ErrorState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{
				field:  "ErrorState",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for ClientStatus

	if len(errors) > 0 {
		return ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError(errors)
	}

	return nil
}

// ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError is an error
// wrapping multiple validation errors returned by
// ScopedRoutesConfigDump_DynamicScopedRouteConfigs.ValidateAll() if the
// designated constraints aren't met.
type ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ScopedRoutesConfigDump_DynamicScopedRouteConfigsMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError) 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 %sScopedRoutesConfigDump_DynamicScopedRouteConfigs.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ScopedRoutesConfigDump_DynamicScopedRouteConfigsValidationError{}

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

// Validate checks the field values on EndpointsConfigDump_StaticEndpointConfig
// with the rules defined in the proto definition for this message. If any
// rules are violated, the first error encountered is returned, or nil if
// there are no violations.
func (m *EndpointsConfigDump_StaticEndpointConfig) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// EndpointsConfigDump_StaticEndpointConfig with the rules defined in the
// proto definition for this message. If any rules are violated, the result is
// a list of violation errors wrapped in
// EndpointsConfigDump_StaticEndpointConfigMultiError, or nil if none found.
func (m *EndpointsConfigDump_StaticEndpointConfig) ValidateAll() error {
	return m.validate(true)
}

func (m *EndpointsConfigDump_StaticEndpointConfig) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetEndpointConfig()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, EndpointsConfigDump_StaticEndpointConfigValidationError{
					field:  "EndpointConfig",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, EndpointsConfigDump_StaticEndpointConfigValidationError{
					field:  "EndpointConfig",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetEndpointConfig()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return EndpointsConfigDump_StaticEndpointConfigValidationError{
				field:  "EndpointConfig",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetLastUpdated()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, EndpointsConfigDump_StaticEndpointConfigValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, EndpointsConfigDump_StaticEndpointConfigValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return EndpointsConfigDump_StaticEndpointConfigValidationError{
				field:  "LastUpdated",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return EndpointsConfigDump_StaticEndpointConfigMultiError(errors)
	}

	return nil
}

// EndpointsConfigDump_StaticEndpointConfigMultiError is an error wrapping
// multiple validation errors returned by
// EndpointsConfigDump_StaticEndpointConfig.ValidateAll() if the designated
// constraints aren't met.
type EndpointsConfigDump_StaticEndpointConfigMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m EndpointsConfigDump_StaticEndpointConfigMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m EndpointsConfigDump_StaticEndpointConfigMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e EndpointsConfigDump_StaticEndpointConfigValidationError) 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 %sEndpointsConfigDump_StaticEndpointConfig.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = EndpointsConfigDump_StaticEndpointConfigValidationError{}

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

// Validate checks the field values on
// EndpointsConfigDump_DynamicEndpointConfig with the rules defined in the
// proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *EndpointsConfigDump_DynamicEndpointConfig) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// EndpointsConfigDump_DynamicEndpointConfig with the rules defined in the
// proto definition for this message. If any rules are violated, the result is
// a list of violation errors wrapped in
// EndpointsConfigDump_DynamicEndpointConfigMultiError, or nil if none found.
func (m *EndpointsConfigDump_DynamicEndpointConfig) ValidateAll() error {
	return m.validate(true)
}

func (m *EndpointsConfigDump_DynamicEndpointConfig) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for VersionInfo

	if all {
		switch v := interface{}(m.GetEndpointConfig()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{
					field:  "EndpointConfig",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{
					field:  "EndpointConfig",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetEndpointConfig()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return EndpointsConfigDump_DynamicEndpointConfigValidationError{
				field:  "EndpointConfig",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetLastUpdated()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return EndpointsConfigDump_DynamicEndpointConfigValidationError{
				field:  "LastUpdated",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetErrorState()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{
					field:  "ErrorState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, EndpointsConfigDump_DynamicEndpointConfigValidationError{
					field:  "ErrorState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return EndpointsConfigDump_DynamicEndpointConfigValidationError{
				field:  "ErrorState",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for ClientStatus

	if len(errors) > 0 {
		return EndpointsConfigDump_DynamicEndpointConfigMultiError(errors)
	}

	return nil
}

// EndpointsConfigDump_DynamicEndpointConfigMultiError is an error wrapping
// multiple validation errors returned by
// EndpointsConfigDump_DynamicEndpointConfig.ValidateAll() if the designated
// constraints aren't met.
type EndpointsConfigDump_DynamicEndpointConfigMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m EndpointsConfigDump_DynamicEndpointConfigMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m EndpointsConfigDump_DynamicEndpointConfigMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e EndpointsConfigDump_DynamicEndpointConfigValidationError) 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 %sEndpointsConfigDump_DynamicEndpointConfig.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = EndpointsConfigDump_DynamicEndpointConfigValidationError{}

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

// Validate checks the field values on EcdsConfigDump_EcdsFilterConfig with the
// rules defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *EcdsConfigDump_EcdsFilterConfig) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on EcdsConfigDump_EcdsFilterConfig with
// the rules defined in the proto definition for this message. If any rules
// are violated, the result is a list of violation errors wrapped in
// EcdsConfigDump_EcdsFilterConfigMultiError, or nil if none found.
func (m *EcdsConfigDump_EcdsFilterConfig) ValidateAll() error {
	return m.validate(true)
}

func (m *EcdsConfigDump_EcdsFilterConfig) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for VersionInfo

	if all {
		switch v := interface{}(m.GetEcdsFilter()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, EcdsConfigDump_EcdsFilterConfigValidationError{
					field:  "EcdsFilter",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, EcdsConfigDump_EcdsFilterConfigValidationError{
					field:  "EcdsFilter",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetEcdsFilter()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return EcdsConfigDump_EcdsFilterConfigValidationError{
				field:  "EcdsFilter",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetLastUpdated()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, EcdsConfigDump_EcdsFilterConfigValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, EcdsConfigDump_EcdsFilterConfigValidationError{
					field:  "LastUpdated",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return EcdsConfigDump_EcdsFilterConfigValidationError{
				field:  "LastUpdated",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetErrorState()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, EcdsConfigDump_EcdsFilterConfigValidationError{
					field:  "ErrorState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, EcdsConfigDump_EcdsFilterConfigValidationError{
					field:  "ErrorState",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return EcdsConfigDump_EcdsFilterConfigValidationError{
				field:  "ErrorState",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for ClientStatus

	if len(errors) > 0 {
		return EcdsConfigDump_EcdsFilterConfigMultiError(errors)
	}

	return nil
}

// EcdsConfigDump_EcdsFilterConfigMultiError is an error wrapping multiple
// validation errors returned by EcdsConfigDump_EcdsFilterConfig.ValidateAll()
// if the designated constraints aren't met.
type EcdsConfigDump_EcdsFilterConfigMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m EcdsConfigDump_EcdsFilterConfigMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m EcdsConfigDump_EcdsFilterConfigMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e EcdsConfigDump_EcdsFilterConfigValidationError) 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 %sEcdsConfigDump_EcdsFilterConfig.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = EcdsConfigDump_EcdsFilterConfigValidationError{}

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