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

package consoleapi

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 ClusterIdReq 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 *ClusterIdReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ClusterIdReq 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 ClusterIdReqMultiError, or
// nil if none found.
func (m *ClusterIdReq) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ClusterId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ClusterIdReqMultiError) 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 ClusterIdReqMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ClusterIdReqValidationError{}

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

// Validate checks the field values on VolumeBackupSetting 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 *VolumeBackupSetting) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on VolumeBackupSetting 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
// VolumeBackupSettingMultiError, or nil if none found.
func (m *VolumeBackupSetting) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for Hidden

	// no validation rules for Enable

	// no validation rules for Description

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m VolumeBackupSettingMultiError) 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 VolumeBackupSettingMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = VolumeBackupSettingValidationError{}

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

// Validate checks the field values on RegionInfo 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 *RegionInfo) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on RegionInfo 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 RegionInfoMultiError, or
// nil if none found.
func (m *RegionInfo) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for Name

	// no validation rules for DisplayName

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m RegionInfoMultiError) 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 RegionInfoMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = RegionInfoValidationError{}

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

// Validate checks the field values on PartitionDispatcherConfig 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 *PartitionDispatcherConfig) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PartitionDispatcherConfig 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
// PartitionDispatcherConfigMultiError, or nil if none found.
func (m *PartitionDispatcherConfig) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for PartitionType

	// no validation rules for IndexName

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m PartitionDispatcherConfigMultiError) 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 PartitionDispatcherConfigMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = PartitionDispatcherConfigValidationError{}

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

// Validate checks the field values on Broker 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 *Broker) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on Broker 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 BrokerMultiError, or nil if none found.
func (m *Broker) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for KafkaVersion

	// no validation rules for BrokerEndpoints

	// no validation rules for TlsEnable

	// no validation rules for Compression

	// no validation rules for InsecureSkipVerify

	// no validation rules for KafkaClientId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m BrokerMultiError) 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 BrokerMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = BrokerValidationError{}

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

// Validate checks the field values on SchemaRegistry 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 *SchemaRegistry) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on SchemaRegistry 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 SchemaRegistryMultiError,
// or nil if none found.
func (m *SchemaRegistry) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for SchemaRegistryEndpoints

	// no validation rules for EnableHttpAuth

	// no validation rules for UserName

	// no validation rules for Password

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m SchemaRegistryMultiError) 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 SchemaRegistryMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = SchemaRegistryValidationError{}

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

// Validate checks the field values on Authentication 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 *Authentication) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on Authentication 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 AuthenticationMultiError,
// or nil if none found.
func (m *Authentication) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for AuthType

	// no validation rules for UserName

	// no validation rules for Password

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m AuthenticationMultiError) 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 AuthenticationMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = AuthenticationValidationError{}

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

// Validate checks the field values on DebeziumConfig 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 *DebeziumConfig) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DebeziumConfig 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 DebeziumConfigMultiError,
// or nil if none found.
func (m *DebeziumConfig) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for OutputOldValue

	// no validation rules for DisableSchema

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m DebeziumConfigMultiError) 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 DebeziumConfigMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = DebeziumConfigValidationError{}

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

// Validate checks the field values on DataFormat 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 *DataFormat) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataFormat 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 DataFormatMultiError, or
// nil if none found.
func (m *DataFormat) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for Protocol

	// no validation rules for EnableTidbExtension

	// no validation rules for DecimalHandlingMode

	// no validation rules for BigintUnsignedHandlingMode

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

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

	// no validation rules for OutputRawChangeEvent

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m DataFormatMultiError) 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 DataFormatMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = DataFormatValidationError{}

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

// Validate checks the field values on TopicPartitionConfig 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 *TopicPartitionConfig) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on TopicPartitionConfig 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
// TopicPartitionConfigMultiError, or nil if none found.
func (m *TopicPartitionConfig) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for DispatchType

	// no validation rules for DefaultTopic

	// no validation rules for TopicPrefix

	// no validation rules for Separator

	// no validation rules for TopicSuffix

	// no validation rules for ReplicationFactor

	// no validation rules for PartitionNum

	// no validation rules for PartitionDispatcher

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, TopicPartitionConfigValidationError{
						field:  fmt.Sprintf("PartitionDispatchers[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, TopicPartitionConfigValidationError{
						field:  fmt.Sprintf("PartitionDispatchers[%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 TopicPartitionConfigValidationError{
					field:  fmt.Sprintf("PartitionDispatchers[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m TopicPartitionConfigMultiError) 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 TopicPartitionConfigMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = TopicPartitionConfigValidationError{}

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

// Validate checks the field values on KafkaInfo 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 *KafkaInfo) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on KafkaInfo 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 KafkaInfoMultiError, or nil
// if none found.
func (m *KafkaInfo) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

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

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

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

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

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

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

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, KafkaInfoValidationError{
						field:  fmt.Sprintf("ColumnSelectors[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, KafkaInfoValidationError{
						field:  fmt.Sprintf("ColumnSelectors[%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 KafkaInfoValidationError{
					field:  fmt.Sprintf("ColumnSelectors[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m KafkaInfoMultiError) 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 KafkaInfoMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = KafkaInfoValidationError{}

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

// Validate checks the field values on NetworkInfo 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 *NetworkInfo) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on NetworkInfo 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 NetworkInfoMultiError, or
// nil if none found.
func (m *NetworkInfo) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for NetworkType

	if m.SinkEndpointId != nil {
		// no validation rules for SinkEndpointId
	}

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m NetworkInfoMultiError) 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 NetworkInfoMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = NetworkInfoValidationError{}

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

// Validate checks the field values on Connection 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 *Connection) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on Connection 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 ConnectionMultiError, or
// nil if none found.
func (m *Connection) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for Endpoint

	// no validation rules for Username

	// no validation rules for Password

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ConnectionMultiError) 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 ConnectionMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ConnectionValidationError{}

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

// Validate checks the field values on PrivatelinkInfo 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 *PrivatelinkInfo) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PrivatelinkInfo 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
// PrivatelinkInfoMultiError, or nil if none found.
func (m *PrivatelinkInfo) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	if m.GetDfPrivatelinkEndpointId() <= 0 {
		err := PrivatelinkInfoValidationError{
			field:  "DfPrivatelinkEndpointId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	// no validation rules for EndpointName

	// no validation rules for EndpointAddress

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m PrivatelinkInfoMultiError) 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 PrivatelinkInfoMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = PrivatelinkInfoValidationError{}

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

// Validate checks the field values on TableConfig 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 *TableConfig) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on TableConfig 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 TableConfigMultiError, or
// nil if none found.
func (m *TableConfig) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for Mode

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, TableConfigValidationError{
						field:  fmt.Sprintf("EventFilterRule[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, TableConfigValidationError{
						field:  fmt.Sprintf("EventFilterRule[%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 TableConfigValidationError{
					field:  fmt.Sprintf("EventFilterRule[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for CaseSensitive

	if m.BdrMode != nil {
		// no validation rules for BdrMode
	}

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m TableConfigMultiError) 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 TableConfigMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = TableConfigValidationError{}

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

// Validate checks the field values on EventFilterRule 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 *EventFilterRule) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on EventFilterRule 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
// EventFilterRuleMultiError, or nil if none found.
func (m *EventFilterRule) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for IgnoreInsertValueExpr

	// no validation rules for IgnoreUpdateNewValueExpr

	// no validation rules for IgnoreUpdateOldValueExpr

	// no validation rules for IgnoreDeleteValueExpr

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m EventFilterRuleMultiError) 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 EventFilterRuleMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = EventFilterRuleValidationError{}

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

// Validate checks the field values on ColumnSelector 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 *ColumnSelector) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ColumnSelector 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 ColumnSelectorMultiError,
// or nil if none found.
func (m *ColumnSelector) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ColumnSelectorMultiError) 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 ColumnSelectorMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ColumnSelectorValidationError{}

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

// Validate checks the field values on StartPosition 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 *StartPosition) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on StartPosition 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 StartPositionMultiError, or
// nil if none found.
func (m *StartPosition) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for Mode

	// no validation rules for Tso

	// no validation rules for Utc

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m StartPositionMultiError) 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 StartPositionMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = StartPositionValidationError{}

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

// Validate checks the field values on MySQLInfo 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 *MySQLInfo) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on MySQLInfo 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 MySQLInfoMultiError, or nil
// if none found.
func (m *MySQLInfo) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

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

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

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

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

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m MySQLInfoMultiError) 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 MySQLInfoMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = MySQLInfoValidationError{}

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

// Validate checks the field values on S3Dataformat 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 *S3Dataformat) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on S3Dataformat 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 S3DataformatMultiError, or
// nil if none found.
func (m *S3Dataformat) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for Protocol

	// no validation rules for Terminator

	// no validation rules for DateSeparator

	// no validation rules for EnableTidbExtension

	// no validation rules for Delimiter

	// no validation rules for Quote

	// no validation rules for Null

	// no validation rules for IncludeCommitTs

	// no validation rules for BinaryEncodingMethod

	// no validation rules for OutputRawChangeEvent

	// no validation rules for OutputFieldHeader

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m S3DataformatMultiError) 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 S3DataformatMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = S3DataformatValidationError{}

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

// Validate checks the field values on StorageFlushConfig 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 *StorageFlushConfig) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on StorageFlushConfig 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
// StorageFlushConfigMultiError, or nil if none found.
func (m *StorageFlushConfig) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for FlushInterval

	// no validation rules for FileSize

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m StorageFlushConfigMultiError) 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 StorageFlushConfigMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = StorageFlushConfigValidationError{}

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

// Validate checks the field values on S3Endpoint 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 *S3Endpoint) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on S3Endpoint 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 S3EndpointMultiError, or
// nil if none found.
func (m *S3Endpoint) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for S3Uri

	// no validation rules for AccessKey

	// no validation rules for SecretKey

	// no validation rules for AuthType

	// no validation rules for IamAssumedRoleArn

	// no validation rules for Endpoint

	// no validation rules for Provider

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m S3EndpointMultiError) 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 S3EndpointMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = S3EndpointValidationError{}

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

// Validate checks the field values on S3Info 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 *S3Info) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on S3Info 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 S3InfoMultiError, or nil if none found.
func (m *S3Info) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

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

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

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

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

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

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m S3InfoMultiError) 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 S3InfoMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = S3InfoValidationError{}

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

// Validate checks the field values on GcsEndpoint 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 *GcsEndpoint) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GcsEndpoint 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 GcsEndpointMultiError, or
// nil if none found.
func (m *GcsEndpoint) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for GcsUri

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m GcsEndpointMultiError) 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 GcsEndpointMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = GcsEndpointValidationError{}

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

// Validate checks the field values on GcsInfo 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 *GcsInfo) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GcsInfo 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 GcsInfoMultiError, or nil if none found.
func (m *GcsInfo) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

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

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

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

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

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

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m GcsInfoMultiError) 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 GcsInfoMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = GcsInfoValidationError{}

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

// Validate checks the field values on ServerlessTidbInfo 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 *ServerlessTidbInfo) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ServerlessTidbInfo 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
// ServerlessTidbInfoMultiError, or nil if none found.
func (m *ServerlessTidbInfo) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	if m.GetClusterId() <= 0 {
		err := ServerlessTidbInfoValidationError{
			field:  "ClusterId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

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

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ServerlessTidbInfoMultiError) 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 ServerlessTidbInfoMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ServerlessTidbInfoValidationError{}

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

// Validate checks the field values on PulsarInfo 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 *PulsarInfo) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PulsarInfo 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 PulsarInfoMultiError, or
// nil if none found.
func (m *PulsarInfo) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for DestinationProtocol

	// no validation rules for Endpoint

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

	// no validation rules for CompressionType

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

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

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

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

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, PulsarInfoValidationError{
						field:  fmt.Sprintf("PartitionDispatchers[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, PulsarInfoValidationError{
						field:  fmt.Sprintf("PartitionDispatchers[%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 PulsarInfoValidationError{
					field:  fmt.Sprintf("PartitionDispatchers[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

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

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m PulsarInfoMultiError) 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 PulsarInfoMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = PulsarInfoValidationError{}

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

// Validate checks the field values on PulsarAuthentication 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 *PulsarAuthentication) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PulsarAuthentication 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
// PulsarAuthenticationMultiError, or nil if none found.
func (m *PulsarAuthentication) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for AuthType

	// no validation rules for UserName

	// no validation rules for Password

	// no validation rules for Token

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m PulsarAuthenticationMultiError) 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 PulsarAuthenticationMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = PulsarAuthenticationValidationError{}

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

// Validate checks the field values on PulsarDataFormat 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 *PulsarDataFormat) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PulsarDataFormat 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
// PulsarDataFormatMultiError, or nil if none found.
func (m *PulsarDataFormat) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for Protocol

	// no validation rules for EnableTidbExtension

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m PulsarDataFormatMultiError) 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 PulsarDataFormatMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = PulsarDataFormatValidationError{}

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

// Validate checks the field values on PulsarTopicDistribution 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 *PulsarTopicDistribution) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PulsarTopicDistribution 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
// PulsarTopicDistributionMultiError, or nil if none found.
func (m *PulsarTopicDistribution) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for PulsarTenant

	// no validation rules for PulsarNamespace

	// no validation rules for DefaultTopic

	// no validation rules for DispatchType

	// no validation rules for TopicPrefix

	// no validation rules for Separator

	// no validation rules for TopicSuffix

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m PulsarTopicDistributionMultiError) 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 PulsarTopicDistributionMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = PulsarTopicDistributionValidationError{}

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

// Validate checks the field values on PulsarAdvancedSetting 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 *PulsarAdvancedSetting) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PulsarAdvancedSetting 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
// PulsarAdvancedSettingMultiError, or nil if none found.
func (m *PulsarAdvancedSetting) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for BatchingMaxMessages

	// no validation rules for BatchingMaxPublishDelay

	// no validation rules for ConnectionTimeout

	// no validation rules for OperationTimeout

	// no validation rules for SendTimeout

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m PulsarAdvancedSettingMultiError) 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 PulsarAdvancedSettingMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = PulsarAdvancedSettingValidationError{}

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

// Validate checks the field values on DescribeSchemaTableReq 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 *DescribeSchemaTableReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DescribeSchemaTableReq 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
// DescribeSchemaTableReqMultiError, or nil if none found.
func (m *DescribeSchemaTableReq) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for Username

	// no validation rules for Password

	// no validation rules for CaseSensitive

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m DescribeSchemaTableReqMultiError) 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 DescribeSchemaTableReqMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = DescribeSchemaTableReqValidationError{}

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

// Validate checks the field values on DescribeSchemaTableResp 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 *DescribeSchemaTableResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DescribeSchemaTableResp 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
// DescribeSchemaTableRespMultiError, or nil if none found.
func (m *DescribeSchemaTableResp) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ClusterId

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

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m DescribeSchemaTableRespMultiError) 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 DescribeSchemaTableRespMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = DescribeSchemaTableRespValidationError{}

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

// Validate checks the field values on AdminProfile 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 *AdminProfile) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on AdminProfile 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 AdminProfileMultiError, or
// nil if none found.
func (m *AdminProfile) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for Provider

	// no validation rules for CloudAccountId

	// no validation rules for AwsExternalId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m AdminProfileMultiError) 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 AdminProfileMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = AdminProfileValidationError{}

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

// Validate checks the field values on ChangefeedListReq 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 *ChangefeedListReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ChangefeedListReq 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
// ChangefeedListReqMultiError, or nil if none found.
func (m *ChangefeedListReq) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for Page

	// no validation rules for PerPage

	// no validation rules for ChangefeedType

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ChangefeedListReqMultiError) 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 ChangefeedListReqMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ChangefeedListReqValidationError{}

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

// Validate checks the field values on ChangefeedCreateReq 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 *ChangefeedCreateReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ChangefeedCreateReq 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
// ChangefeedCreateReqMultiError, or nil if none found.
func (m *ChangefeedCreateReq) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for ChangefeedType

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

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

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

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

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

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

	// no validation rules for ChangefeedSpec

	// no validation rules for Name

	// no validation rules for Internal

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

	// no validation rules for DryRun

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ChangefeedCreateReqMultiError) 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 ChangefeedCreateReqMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ChangefeedCreateReqValidationError{}

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

// Validate checks the field values on ChangefeedEditReq 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 *ChangefeedEditReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ChangefeedEditReq 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
// ChangefeedEditReqMultiError, or nil if none found.
func (m *ChangefeedEditReq) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for ChangefeedId

	// no validation rules for ChangefeedType

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

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

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

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

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

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

	// no validation rules for Name

	// no validation rules for DryRun

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ChangefeedEditReqMultiError) 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 ChangefeedEditReqMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ChangefeedEditReqValidationError{}

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

// Validate checks the field values on Changefeed 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 *Changefeed) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on Changefeed 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 ChangefeedMultiError, or
// nil if none found.
func (m *Changefeed) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ChangefeedId

	// no validation rules for ChangefeedType

	// no validation rules for Status

	// no validation rules for CheckpointTso

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

	// no validation rules for Error

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

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

	// no validation rules for ChangefeedSpec

	// no validation rules for Name

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ChangefeedMultiError) 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 ChangefeedMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ChangefeedValidationError{}

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

// Validate checks the field values on Changefeeds 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 *Changefeeds) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on Changefeeds 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 ChangefeedsMultiError, or
// nil if none found.
func (m *Changefeeds) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ChangefeedsValidationError{
						field:  fmt.Sprintf("Items[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ChangefeedsValidationError{
						field:  fmt.Sprintf("Items[%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 ChangefeedsValidationError{
					field:  fmt.Sprintf("Items[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for Total

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ChangefeedsMultiError) 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 ChangefeedsMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ChangefeedsValidationError{}

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

// Validate checks the field values on ChangefeedID 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 *ChangefeedID) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ChangefeedID 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 ChangefeedIDMultiError, or
// nil if none found.
func (m *ChangefeedID) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ChangefeedId

	// no validation rules for ClusterId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ChangefeedIDMultiError) 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 ChangefeedIDMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ChangefeedIDValidationError{}

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

// Validate checks the field values on GetClusterTCUReq 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 *GetClusterTCUReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetClusterTCUReq 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
// GetClusterTCUReqMultiError, or nil if none found.
func (m *GetClusterTCUReq) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ClusterId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m GetClusterTCUReqMultiError) 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 GetClusterTCUReqMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = GetClusterTCUReqValidationError{}

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

// Validate checks the field values on GetClusterTCUResp 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 *GetClusterTCUResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetClusterTCUResp 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
// GetClusterTCURespMultiError, or nil if none found.
func (m *GetClusterTCUResp) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for TcuNumber

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m GetClusterTCURespMultiError) 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 GetClusterTCURespMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = GetClusterTCURespValidationError{}

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

// Validate checks the field values on ChangefeedScaleReq 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 *ChangefeedScaleReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ChangefeedScaleReq 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
// ChangefeedScaleReqMultiError, or nil if none found.
func (m *ChangefeedScaleReq) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ChangefeedId

	// no validation rules for ClusterId

	// no validation rules for ChangefeedSpec

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ChangefeedScaleReqMultiError) 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 ChangefeedScaleReqMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ChangefeedScaleReqValidationError{}

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

// Validate checks the field values on CalChangefeedFeeReq 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 *CalChangefeedFeeReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on CalChangefeedFeeReq 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
// CalChangefeedFeeReqMultiError, or nil if none found.
func (m *CalChangefeedFeeReq) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for Duration

	// no validation rules for ChangefeedSpec

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m CalChangefeedFeeReqMultiError) 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 CalChangefeedFeeReqMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = CalChangefeedFeeReqValidationError{}

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

// Validate checks the field values on CalChangefeedFeeResp 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 *CalChangefeedFeeResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on CalChangefeedFeeResp 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
// CalChangefeedFeeRespMultiError, or nil if none found.
func (m *CalChangefeedFeeResp) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for RawFee

	// no validation rules for Fee

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m CalChangefeedFeeRespMultiError) 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 CalChangefeedFeeRespMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = CalChangefeedFeeRespValidationError{}

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

// Validate checks the field values on EnabledDPFeaturesForClusterReq 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 *EnabledDPFeaturesForClusterReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on EnabledDPFeaturesForClusterReq 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
// EnabledDPFeaturesForClusterReqMultiError, or nil if none found.
func (m *EnabledDPFeaturesForClusterReq) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ClusterId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m EnabledDPFeaturesForClusterReqMultiError) 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 EnabledDPFeaturesForClusterReqMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = EnabledDPFeaturesForClusterReqValidationError{}

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

// Validate checks the field values on EnabledDPFeaturesForClusterResp 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 *EnabledDPFeaturesForClusterResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on EnabledDPFeaturesForClusterResp 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
// EnabledDPFeaturesForClusterRespMultiError, or nil if none found.
func (m *EnabledDPFeaturesForClusterResp) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m EnabledDPFeaturesForClusterRespMultiError) 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 EnabledDPFeaturesForClusterRespMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = EnabledDPFeaturesForClusterRespValidationError{}

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

// Validate checks the field values on ChangefeedSpec 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 *ChangefeedSpec) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ChangefeedSpec 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 ChangefeedSpecMultiError,
// or nil if none found.
func (m *ChangefeedSpec) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for Name

	// no validation rules for RcuNum

	// no validation rules for RpsLimit

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ChangefeedSpecMultiError) 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 ChangefeedSpecMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ChangefeedSpecValidationError{}

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

// Validate checks the field values on ChangefeedSpecs 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 *ChangefeedSpecs) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ChangefeedSpecs 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
// ChangefeedSpecsMultiError, or nil if none found.
func (m *ChangefeedSpecs) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ChangefeedSpecsValidationError{
						field:  fmt.Sprintf("Items[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ChangefeedSpecsValidationError{
						field:  fmt.Sprintf("Items[%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 ChangefeedSpecsValidationError{
					field:  fmt.Sprintf("Items[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for Total

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ChangefeedSpecsMultiError) 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 ChangefeedSpecsMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ChangefeedSpecsValidationError{}

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

// Validate checks the field values on ChangefeedSpecListReq 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 *ChangefeedSpecListReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ChangefeedSpecListReq 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
// ChangefeedSpecListReqMultiError, or nil if none found.
func (m *ChangefeedSpecListReq) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for ChangefeedType

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ChangefeedSpecListReqMultiError) 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 ChangefeedSpecListReqMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ChangefeedSpecListReqValidationError{}

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

// Validate checks the field values on ParamItem 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 *ParamItem) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ParamItem 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 ParamItemMultiError, or nil
// if none found.
func (m *ParamItem) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

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

	// no validation rules for Comment

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ParamItemMultiError) 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 ParamItemMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ParamItemValidationError{}

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

// Validate checks the field values on ApplyConfigChangesReq 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 *ApplyConfigChangesReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ApplyConfigChangesReq 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
// ApplyConfigChangesReqMultiError, or nil if none found.
func (m *ApplyConfigChangesReq) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ClusterType

	// no validation rules for ClusterId

	// no validation rules for ConfigurationFile

	{
		sorted_keys := make([]string, len(m.GetCustomParams()))
		i := 0
		for key := range m.GetCustomParams() {
			sorted_keys[i] = key
			i++
		}
		sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] })
		for _, key := range sorted_keys {
			val := m.GetCustomParams()[key]
			_ = val

			// no validation rules for CustomParams[key]

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

		}
	}

	if m.TemplateId != nil {
		// no validation rules for TemplateId
	}

	if m.Version != nil {
		// no validation rules for Version
	}

	if m.CustomImageTag != nil {
		// no validation rules for CustomImageTag
	}

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ApplyConfigChangesReqMultiError) 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 ApplyConfigChangesReqMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ApplyConfigChangesReqValidationError{}

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

// Validate checks the field values on ApplyConfigChangesResp 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 *ApplyConfigChangesResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ApplyConfigChangesResp 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
// ApplyConfigChangesRespMultiError, or nil if none found.
func (m *ApplyConfigChangesResp) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ApplyConfigChangesRespMultiError) 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 ApplyConfigChangesRespMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ApplyConfigChangesRespValidationError{}

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

// Validate checks the field values on ListInternalChangefeedsRequest 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 *ListInternalChangefeedsRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListInternalChangefeedsRequest 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
// ListInternalChangefeedsRequestMultiError, or nil if none found.
func (m *ListInternalChangefeedsRequest) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for TidbClusterId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ListInternalChangefeedsRequestMultiError) 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 ListInternalChangefeedsRequestMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ListInternalChangefeedsRequestValidationError{}

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

// Validate checks the field values on ListInternalChangefeedsResponse 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 *ListInternalChangefeedsResponse) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListInternalChangefeedsResponse 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
// ListInternalChangefeedsResponseMultiError, or nil if none found.
func (m *ListInternalChangefeedsResponse) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ListInternalChangefeedsResponseValidationError{
						field:  fmt.Sprintf("Changefeeds[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ListInternalChangefeedsResponseValidationError{
						field:  fmt.Sprintf("Changefeeds[%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 ListInternalChangefeedsResponseValidationError{
					field:  fmt.Sprintf("Changefeeds[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ListInternalChangefeedsResponseMultiError) 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 ListInternalChangefeedsResponseMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ListInternalChangefeedsResponseValidationError{}

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

// Validate checks the field values on InternalChangefeed 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 *InternalChangefeed) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on InternalChangefeed 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
// InternalChangefeedMultiError, or nil if none found.
func (m *InternalChangefeed) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for Id

	// no validation rules for DisplayId

	// no validation rules for DisplayName

	// no validation rules for DownstreamType

	// no validation rules for Status

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

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

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m InternalChangefeedMultiError) 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 InternalChangefeedMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = InternalChangefeedValidationError{}

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

// Validate checks the field values on InternalTiCDCCluster 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 *InternalTiCDCCluster) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on InternalTiCDCCluster 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
// InternalTiCDCClusterMultiError, or nil if none found.
func (m *InternalTiCDCCluster) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for Id

	// no validation rules for Name

	// no validation rules for SharedPoolId

	// no validation rules for Version

	// no validation rules for Region

	// no validation rules for ProviderType

	// no validation rules for SpecificationCode

	// no validation rules for Status

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

	// no validation rules for OrgId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m InternalTiCDCClusterMultiError) 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 InternalTiCDCClusterMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = InternalTiCDCClusterValidationError{}

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

// Validate checks the field values on GetInternalChangefeedRequest 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 *GetInternalChangefeedRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetInternalChangefeedRequest 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
// GetInternalChangefeedRequestMultiError, or nil if none found.
func (m *GetInternalChangefeedRequest) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ChangefeedId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m GetInternalChangefeedRequestMultiError) 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 GetInternalChangefeedRequestMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = GetInternalChangefeedRequestValidationError{}

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

// Validate checks the field values on GetInternalTiCDCClusterRequest 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 *GetInternalTiCDCClusterRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetInternalTiCDCClusterRequest 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
// GetInternalTiCDCClusterRequestMultiError, or nil if none found.
func (m *GetInternalTiCDCClusterRequest) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for TicdcClusterId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m GetInternalTiCDCClusterRequestMultiError) 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 GetInternalTiCDCClusterRequestMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = GetInternalTiCDCClusterRequestValidationError{}

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

// Validate checks the field values on RestartTiCDCClusterRequest 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 *RestartTiCDCClusterRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on RestartTiCDCClusterRequest 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
// RestartTiCDCClusterRequestMultiError, or nil if none found.
func (m *RestartTiCDCClusterRequest) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for TicdcClusterId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m RestartTiCDCClusterRequestMultiError) 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 RestartTiCDCClusterRequestMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = RestartTiCDCClusterRequestValidationError{}

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

// Validate checks the field values on RestartChangefeedRequest 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 *RestartChangefeedRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on RestartChangefeedRequest 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
// RestartChangefeedRequestMultiError, or nil if none found.
func (m *RestartChangefeedRequest) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ChangefeedId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m RestartChangefeedRequestMultiError) 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 RestartChangefeedRequestMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = RestartChangefeedRequestValidationError{}

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

// Validate checks the field values on PauseChangefeedRequest 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 *PauseChangefeedRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PauseChangefeedRequest 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
// PauseChangefeedRequestMultiError, or nil if none found.
func (m *PauseChangefeedRequest) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ChangefeedId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m PauseChangefeedRequestMultiError) 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 PauseChangefeedRequestMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = PauseChangefeedRequestValidationError{}

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

// Validate checks the field values on ResumeChangefeedRequest 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 *ResumeChangefeedRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ResumeChangefeedRequest 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
// ResumeChangefeedRequestMultiError, or nil if none found.
func (m *ResumeChangefeedRequest) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ChangefeedId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ResumeChangefeedRequestMultiError) 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 ResumeChangefeedRequestMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ResumeChangefeedRequestValidationError{}

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

// Validate checks the field values on PauseClusterChangefeedsRequest 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 *PauseClusterChangefeedsRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PauseClusterChangefeedsRequest 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
// PauseClusterChangefeedsRequestMultiError, or nil if none found.
func (m *PauseClusterChangefeedsRequest) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ClusterId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m PauseClusterChangefeedsRequestMultiError) 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 PauseClusterChangefeedsRequestMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = PauseClusterChangefeedsRequestValidationError{}

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

// Validate checks the field values on ResumeClusterChangefeedsRequest 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 *ResumeClusterChangefeedsRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ResumeClusterChangefeedsRequest 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
// ResumeClusterChangefeedsRequestMultiError, or nil if none found.
func (m *ResumeClusterChangefeedsRequest) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ClusterId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m ResumeClusterChangefeedsRequestMultiError) 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 ResumeClusterChangefeedsRequestMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = ResumeClusterChangefeedsRequestValidationError{}

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

// Validate checks the field values on
// UpdateTableFilterOfClusterChangefeedsRequest 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 *UpdateTableFilterOfClusterChangefeedsRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// UpdateTableFilterOfClusterChangefeedsRequest 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
// UpdateTableFilterOfClusterChangefeedsRequestMultiError, or nil if none found.
func (m *UpdateTableFilterOfClusterChangefeedsRequest) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ClusterId

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

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, UpdateTableFilterOfClusterChangefeedsRequestValidationError{
						field:  fmt.Sprintf("Updates[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, UpdateTableFilterOfClusterChangefeedsRequestValidationError{
						field:  fmt.Sprintf("Updates[%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 UpdateTableFilterOfClusterChangefeedsRequestValidationError{
					field:  fmt.Sprintf("Updates[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m UpdateTableFilterOfClusterChangefeedsRequestMultiError) 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 UpdateTableFilterOfClusterChangefeedsRequestMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = UpdateTableFilterOfClusterChangefeedsRequestValidationError{}

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

// Validate checks the field values on TableFilterUpdate 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 *TableFilterUpdate) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on TableFilterUpdate 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
// TableFilterUpdateMultiError, or nil if none found.
func (m *TableFilterUpdate) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ChangefeedId

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m TableFilterUpdateMultiError) 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 TableFilterUpdateMultiError) AllErrors() []error { return m }

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

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

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

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

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

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

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

var _ error = TableFilterUpdateValidationError{}

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

// Validate checks the field values on UpdateTiCDCClusterStorageReq 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 *UpdateTiCDCClusterStorageReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on UpdateTiCDCClusterStorageReq 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
// UpdateTiCDCClusterStorageReqMultiError, or nil if none found.
func (m *UpdateTiCDCClusterStorageReq) ValidateAll() error {
	return m.validate(true)
}

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for SizeGi

	// no validation rules for Iops

	// no validation rules for ThroughputMbs

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

	return nil
}

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

// Error returns a concatenation of all the error messages it wraps.
func (m UpdateTiCDCClusterStorageReqMultiError) 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 UpdateTiCDCClusterStorageReqMultiError) AllErrors() []error { return m }

// UpdateTiCDCClusterStorageReqValidationError is the validation error returned
// by UpdateTiCDCClusterStorageReq.Validate if the designated constraints
// aren't met.
type UpdateTiCDCClusterStorageReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e UpdateTiCDCClusterStorageReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e UpdateTiCDCClusterStorageReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e UpdateTiCDCClusterStorageReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e UpdateTiCDCClusterStorageReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e UpdateTiCDCClusterStorageReqValidationError) ErrorName() string {
	return "UpdateTiCDCClusterStorageReqValidationError"
}

// Error satisfies the builtin error interface
func (e UpdateTiCDCClusterStorageReqValidationError) 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 %sUpdateTiCDCClusterStorageReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = UpdateTiCDCClusterStorageReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = UpdateTiCDCClusterStorageReqValidationError{}

// Validate checks the field values on UpdateTiCDCClusterStorageResp 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 *UpdateTiCDCClusterStorageResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on UpdateTiCDCClusterStorageResp 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
// UpdateTiCDCClusterStorageRespMultiError, or nil if none found.
func (m *UpdateTiCDCClusterStorageResp) ValidateAll() error {
	return m.validate(true)
}

func (m *UpdateTiCDCClusterStorageResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return UpdateTiCDCClusterStorageRespMultiError(errors)
	}

	return nil
}

// UpdateTiCDCClusterStorageRespMultiError is an error wrapping multiple
// validation errors returned by UpdateTiCDCClusterStorageResp.ValidateAll()
// if the designated constraints aren't met.
type UpdateTiCDCClusterStorageRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m UpdateTiCDCClusterStorageRespMultiError) 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 UpdateTiCDCClusterStorageRespMultiError) AllErrors() []error { return m }

// UpdateTiCDCClusterStorageRespValidationError is the validation error
// returned by UpdateTiCDCClusterStorageResp.Validate if the designated
// constraints aren't met.
type UpdateTiCDCClusterStorageRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e UpdateTiCDCClusterStorageRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e UpdateTiCDCClusterStorageRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e UpdateTiCDCClusterStorageRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e UpdateTiCDCClusterStorageRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e UpdateTiCDCClusterStorageRespValidationError) ErrorName() string {
	return "UpdateTiCDCClusterStorageRespValidationError"
}

// Error satisfies the builtin error interface
func (e UpdateTiCDCClusterStorageRespValidationError) 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 %sUpdateTiCDCClusterStorageResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = UpdateTiCDCClusterStorageRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = UpdateTiCDCClusterStorageRespValidationError{}

// Validate checks the field values on SinkEndpoint 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 *SinkEndpoint) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on SinkEndpoint 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 SinkEndpointMultiError, or
// nil if none found.
func (m *SinkEndpoint) ValidateAll() error {
	return m.validate(true)
}

func (m *SinkEndpoint) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Id

	// no validation rules for EndpointName

	// no validation rules for EndpointServiceName

	// no validation rules for Provider

	// no validation rules for Region

	// no validation rules for ServiceRegion

	// no validation rules for Status

	// no validation rules for EndpointId

	if all {
		switch v := interface{}(m.GetAdvertisedListener()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, SinkEndpointValidationError{
					field:  "AdvertisedListener",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, SinkEndpointValidationError{
					field:  "AdvertisedListener",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetAdvertisedListener()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return SinkEndpointValidationError{
				field:  "AdvertisedListener",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for EndpointAddress

	// no validation rules for CloudAccountId

	if all {
		switch v := interface{}(m.GetCreatedAt()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, SinkEndpointValidationError{
					field:  "CreatedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, SinkEndpointValidationError{
					field:  "CreatedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetCreatedAt()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return SinkEndpointValidationError{
				field:  "CreatedAt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for EndpointType

	// no validation rules for MskArn

	// no validation rules for AuthType

	// no validation rules for BootstrapBroker

	if len(errors) > 0 {
		return SinkEndpointMultiError(errors)
	}

	return nil
}

// SinkEndpointMultiError is an error wrapping multiple validation errors
// returned by SinkEndpoint.ValidateAll() if the designated constraints aren't met.
type SinkEndpointMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m SinkEndpointMultiError) 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 SinkEndpointMultiError) AllErrors() []error { return m }

// SinkEndpointValidationError is the validation error returned by
// SinkEndpoint.Validate if the designated constraints aren't met.
type SinkEndpointValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e SinkEndpointValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e SinkEndpointValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e SinkEndpointValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e SinkEndpointValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e SinkEndpointValidationError) ErrorName() string { return "SinkEndpointValidationError" }

// Error satisfies the builtin error interface
func (e SinkEndpointValidationError) 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 %sSinkEndpoint.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = SinkEndpointValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = SinkEndpointValidationError{}

// Validate checks the field values on SinkAdvertisedListener 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 *SinkAdvertisedListener) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on SinkAdvertisedListener 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
// SinkAdvertisedListenerMultiError, or nil if none found.
func (m *SinkAdvertisedListener) ValidateAll() error {
	return m.validate(true)
}

func (m *SinkAdvertisedListener) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for DomainType

	// no validation rules for RootDomainName

	for idx, item := range m.GetRecords() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, SinkAdvertisedListenerValidationError{
						field:  fmt.Sprintf("Records[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, SinkAdvertisedListenerValidationError{
						field:  fmt.Sprintf("Records[%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 SinkAdvertisedListenerValidationError{
					field:  fmt.Sprintf("Records[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return SinkAdvertisedListenerMultiError(errors)
	}

	return nil
}

// SinkAdvertisedListenerMultiError is an error wrapping multiple validation
// errors returned by SinkAdvertisedListener.ValidateAll() if the designated
// constraints aren't met.
type SinkAdvertisedListenerMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m SinkAdvertisedListenerMultiError) 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 SinkAdvertisedListenerMultiError) AllErrors() []error { return m }

// SinkAdvertisedListenerValidationError is the validation error returned by
// SinkAdvertisedListener.Validate if the designated constraints aren't met.
type SinkAdvertisedListenerValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e SinkAdvertisedListenerValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e SinkAdvertisedListenerValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e SinkAdvertisedListenerValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e SinkAdvertisedListenerValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e SinkAdvertisedListenerValidationError) ErrorName() string {
	return "SinkAdvertisedListenerValidationError"
}

// Error satisfies the builtin error interface
func (e SinkAdvertisedListenerValidationError) 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 %sSinkAdvertisedListener.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = SinkAdvertisedListenerValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = SinkAdvertisedListenerValidationError{}

// Validate checks the field values on CreateSinkEndpointRequest 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 *CreateSinkEndpointRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on CreateSinkEndpointRequest 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
// CreateSinkEndpointRequestMultiError, or nil if none found.
func (m *CreateSinkEndpointRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *CreateSinkEndpointRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	if all {
		switch v := interface{}(m.GetSinkEndpoint()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, CreateSinkEndpointRequestValidationError{
					field:  "SinkEndpoint",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, CreateSinkEndpointRequestValidationError{
					field:  "SinkEndpoint",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetSinkEndpoint()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return CreateSinkEndpointRequestValidationError{
				field:  "SinkEndpoint",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return CreateSinkEndpointRequestMultiError(errors)
	}

	return nil
}

// CreateSinkEndpointRequestMultiError is an error wrapping multiple validation
// errors returned by CreateSinkEndpointRequest.ValidateAll() if the
// designated constraints aren't met.
type CreateSinkEndpointRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m CreateSinkEndpointRequestMultiError) 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 CreateSinkEndpointRequestMultiError) AllErrors() []error { return m }

// CreateSinkEndpointRequestValidationError is the validation error returned by
// CreateSinkEndpointRequest.Validate if the designated constraints aren't met.
type CreateSinkEndpointRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e CreateSinkEndpointRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e CreateSinkEndpointRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e CreateSinkEndpointRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e CreateSinkEndpointRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e CreateSinkEndpointRequestValidationError) ErrorName() string {
	return "CreateSinkEndpointRequestValidationError"
}

// Error satisfies the builtin error interface
func (e CreateSinkEndpointRequestValidationError) 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 %sCreateSinkEndpointRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = CreateSinkEndpointRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = CreateSinkEndpointRequestValidationError{}

// Validate checks the field values on ListSinkEndpointsRequest 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 *ListSinkEndpointsRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListSinkEndpointsRequest 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
// ListSinkEndpointsRequestMultiError, or nil if none found.
func (m *ListSinkEndpointsRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *ListSinkEndpointsRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	if _, ok := SinkEndpointStatus_name[int32(m.GetStatus())]; !ok {
		err := ListSinkEndpointsRequestValidationError{
			field:  "Status",
			reason: "value must be one of the defined enum values",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(errors) > 0 {
		return ListSinkEndpointsRequestMultiError(errors)
	}

	return nil
}

// ListSinkEndpointsRequestMultiError is an error wrapping multiple validation
// errors returned by ListSinkEndpointsRequest.ValidateAll() if the designated
// constraints aren't met.
type ListSinkEndpointsRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListSinkEndpointsRequestMultiError) 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 ListSinkEndpointsRequestMultiError) AllErrors() []error { return m }

// ListSinkEndpointsRequestValidationError is the validation error returned by
// ListSinkEndpointsRequest.Validate if the designated constraints aren't met.
type ListSinkEndpointsRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListSinkEndpointsRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListSinkEndpointsRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListSinkEndpointsRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListSinkEndpointsRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListSinkEndpointsRequestValidationError) ErrorName() string {
	return "ListSinkEndpointsRequestValidationError"
}

// Error satisfies the builtin error interface
func (e ListSinkEndpointsRequestValidationError) 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 %sListSinkEndpointsRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListSinkEndpointsRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListSinkEndpointsRequestValidationError{}

// Validate checks the field values on ListSinkEndpointsResponse 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 *ListSinkEndpointsResponse) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListSinkEndpointsResponse 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
// ListSinkEndpointsResponseMultiError, or nil if none found.
func (m *ListSinkEndpointsResponse) ValidateAll() error {
	return m.validate(true)
}

func (m *ListSinkEndpointsResponse) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	for idx, item := range m.GetSinkEndpoints() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ListSinkEndpointsResponseValidationError{
						field:  fmt.Sprintf("SinkEndpoints[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ListSinkEndpointsResponseValidationError{
						field:  fmt.Sprintf("SinkEndpoints[%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 ListSinkEndpointsResponseValidationError{
					field:  fmt.Sprintf("SinkEndpoints[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return ListSinkEndpointsResponseMultiError(errors)
	}

	return nil
}

// ListSinkEndpointsResponseMultiError is an error wrapping multiple validation
// errors returned by ListSinkEndpointsResponse.ValidateAll() if the
// designated constraints aren't met.
type ListSinkEndpointsResponseMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListSinkEndpointsResponseMultiError) 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 ListSinkEndpointsResponseMultiError) AllErrors() []error { return m }

// ListSinkEndpointsResponseValidationError is the validation error returned by
// ListSinkEndpointsResponse.Validate if the designated constraints aren't met.
type ListSinkEndpointsResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListSinkEndpointsResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListSinkEndpointsResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListSinkEndpointsResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListSinkEndpointsResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListSinkEndpointsResponseValidationError) ErrorName() string {
	return "ListSinkEndpointsResponseValidationError"
}

// Error satisfies the builtin error interface
func (e ListSinkEndpointsResponseValidationError) 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 %sListSinkEndpointsResponse.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListSinkEndpointsResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListSinkEndpointsResponseValidationError{}

// Validate checks the field values on GetSinkEndpointRequest 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 *GetSinkEndpointRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetSinkEndpointRequest 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
// GetSinkEndpointRequestMultiError, or nil if none found.
func (m *GetSinkEndpointRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *GetSinkEndpointRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for SinkEndpointId

	if len(errors) > 0 {
		return GetSinkEndpointRequestMultiError(errors)
	}

	return nil
}

// GetSinkEndpointRequestMultiError is an error wrapping multiple validation
// errors returned by GetSinkEndpointRequest.ValidateAll() if the designated
// constraints aren't met.
type GetSinkEndpointRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetSinkEndpointRequestMultiError) 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 GetSinkEndpointRequestMultiError) AllErrors() []error { return m }

// GetSinkEndpointRequestValidationError is the validation error returned by
// GetSinkEndpointRequest.Validate if the designated constraints aren't met.
type GetSinkEndpointRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetSinkEndpointRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetSinkEndpointRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetSinkEndpointRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetSinkEndpointRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetSinkEndpointRequestValidationError) ErrorName() string {
	return "GetSinkEndpointRequestValidationError"
}

// Error satisfies the builtin error interface
func (e GetSinkEndpointRequestValidationError) 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 %sGetSinkEndpointRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetSinkEndpointRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetSinkEndpointRequestValidationError{}

// Validate checks the field values on DeleteSinkEndpointRequest 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 *DeleteSinkEndpointRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DeleteSinkEndpointRequest 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
// DeleteSinkEndpointRequestMultiError, or nil if none found.
func (m *DeleteSinkEndpointRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *DeleteSinkEndpointRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for SinkEndpointId

	if len(errors) > 0 {
		return DeleteSinkEndpointRequestMultiError(errors)
	}

	return nil
}

// DeleteSinkEndpointRequestMultiError is an error wrapping multiple validation
// errors returned by DeleteSinkEndpointRequest.ValidateAll() if the
// designated constraints aren't met.
type DeleteSinkEndpointRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DeleteSinkEndpointRequestMultiError) 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 DeleteSinkEndpointRequestMultiError) AllErrors() []error { return m }

// DeleteSinkEndpointRequestValidationError is the validation error returned by
// DeleteSinkEndpointRequest.Validate if the designated constraints aren't met.
type DeleteSinkEndpointRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DeleteSinkEndpointRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DeleteSinkEndpointRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DeleteSinkEndpointRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DeleteSinkEndpointRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DeleteSinkEndpointRequestValidationError) ErrorName() string {
	return "DeleteSinkEndpointRequestValidationError"
}

// Error satisfies the builtin error interface
func (e DeleteSinkEndpointRequestValidationError) 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 %sDeleteSinkEndpointRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DeleteSinkEndpointRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DeleteSinkEndpointRequestValidationError{}

// Validate checks the field values on ListSinkAvailabilityZonesRequest 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 *ListSinkAvailabilityZonesRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListSinkAvailabilityZonesRequest 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
// ListSinkAvailabilityZonesRequestMultiError, or nil if none found.
func (m *ListSinkAvailabilityZonesRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *ListSinkAvailabilityZonesRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	if len(errors) > 0 {
		return ListSinkAvailabilityZonesRequestMultiError(errors)
	}

	return nil
}

// ListSinkAvailabilityZonesRequestMultiError is an error wrapping multiple
// validation errors returned by
// ListSinkAvailabilityZonesRequest.ValidateAll() if the designated
// constraints aren't met.
type ListSinkAvailabilityZonesRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListSinkAvailabilityZonesRequestMultiError) 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 ListSinkAvailabilityZonesRequestMultiError) AllErrors() []error { return m }

// ListSinkAvailabilityZonesRequestValidationError is the validation error
// returned by ListSinkAvailabilityZonesRequest.Validate if the designated
// constraints aren't met.
type ListSinkAvailabilityZonesRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListSinkAvailabilityZonesRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListSinkAvailabilityZonesRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListSinkAvailabilityZonesRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListSinkAvailabilityZonesRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListSinkAvailabilityZonesRequestValidationError) ErrorName() string {
	return "ListSinkAvailabilityZonesRequestValidationError"
}

// Error satisfies the builtin error interface
func (e ListSinkAvailabilityZonesRequestValidationError) 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 %sListSinkAvailabilityZonesRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListSinkAvailabilityZonesRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListSinkAvailabilityZonesRequestValidationError{}

// Validate checks the field values on ListSinkAvailabilityZonesResponse 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 *ListSinkAvailabilityZonesResponse) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListSinkAvailabilityZonesResponse
// 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
// ListSinkAvailabilityZonesResponseMultiError, or nil if none found.
func (m *ListSinkAvailabilityZonesResponse) ValidateAll() error {
	return m.validate(true)
}

func (m *ListSinkAvailabilityZonesResponse) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return ListSinkAvailabilityZonesResponseMultiError(errors)
	}

	return nil
}

// ListSinkAvailabilityZonesResponseMultiError is an error wrapping multiple
// validation errors returned by
// ListSinkAvailabilityZonesResponse.ValidateAll() if the designated
// constraints aren't met.
type ListSinkAvailabilityZonesResponseMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListSinkAvailabilityZonesResponseMultiError) 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 ListSinkAvailabilityZonesResponseMultiError) AllErrors() []error { return m }

// ListSinkAvailabilityZonesResponseValidationError is the validation error
// returned by ListSinkAvailabilityZonesResponse.Validate if the designated
// constraints aren't met.
type ListSinkAvailabilityZonesResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListSinkAvailabilityZonesResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListSinkAvailabilityZonesResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListSinkAvailabilityZonesResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListSinkAvailabilityZonesResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListSinkAvailabilityZonesResponseValidationError) ErrorName() string {
	return "ListSinkAvailabilityZonesResponseValidationError"
}

// Error satisfies the builtin error interface
func (e ListSinkAvailabilityZonesResponseValidationError) 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 %sListSinkAvailabilityZonesResponse.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListSinkAvailabilityZonesResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListSinkAvailabilityZonesResponseValidationError{}

// Validate checks the field values on EndpointServiceAvailabilityZone 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 *EndpointServiceAvailabilityZone) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on EndpointServiceAvailabilityZone 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
// EndpointServiceAvailabilityZoneMultiError, or nil if none found.
func (m *EndpointServiceAvailabilityZone) ValidateAll() error {
	return m.validate(true)
}

func (m *EndpointServiceAvailabilityZone) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for AvailabilityZone

	// no validation rules for AvailabilityZoneId

	if len(errors) > 0 {
		return EndpointServiceAvailabilityZoneMultiError(errors)
	}

	return nil
}

// EndpointServiceAvailabilityZoneMultiError is an error wrapping multiple
// validation errors returned by EndpointServiceAvailabilityZone.ValidateAll()
// if the designated constraints aren't met.
type EndpointServiceAvailabilityZoneMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m EndpointServiceAvailabilityZoneMultiError) 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 EndpointServiceAvailabilityZoneMultiError) AllErrors() []error { return m }

// EndpointServiceAvailabilityZoneValidationError is the validation error
// returned by EndpointServiceAvailabilityZone.Validate if the designated
// constraints aren't met.
type EndpointServiceAvailabilityZoneValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e EndpointServiceAvailabilityZoneValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e EndpointServiceAvailabilityZoneValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e EndpointServiceAvailabilityZoneValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e EndpointServiceAvailabilityZoneValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e EndpointServiceAvailabilityZoneValidationError) ErrorName() string {
	return "EndpointServiceAvailabilityZoneValidationError"
}

// Error satisfies the builtin error interface
func (e EndpointServiceAvailabilityZoneValidationError) 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 %sEndpointServiceAvailabilityZone.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = EndpointServiceAvailabilityZoneValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = EndpointServiceAvailabilityZoneValidationError{}

// Validate checks the field values on
// DescribeEndpointServiceAvailabilityZonesRequest 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 *DescribeEndpointServiceAvailabilityZonesRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// DescribeEndpointServiceAvailabilityZonesRequest 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
// DescribeEndpointServiceAvailabilityZonesRequestMultiError, or nil if none found.
func (m *DescribeEndpointServiceAvailabilityZonesRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *DescribeEndpointServiceAvailabilityZonesRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for EndpointServiceName

	// no validation rules for ServiceRegion

	if len(errors) > 0 {
		return DescribeEndpointServiceAvailabilityZonesRequestMultiError(errors)
	}

	return nil
}

// DescribeEndpointServiceAvailabilityZonesRequestMultiError is an error
// wrapping multiple validation errors returned by
// DescribeEndpointServiceAvailabilityZonesRequest.ValidateAll() if the
// designated constraints aren't met.
type DescribeEndpointServiceAvailabilityZonesRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DescribeEndpointServiceAvailabilityZonesRequestMultiError) 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 DescribeEndpointServiceAvailabilityZonesRequestMultiError) AllErrors() []error { return m }

// DescribeEndpointServiceAvailabilityZonesRequestValidationError is the
// validation error returned by
// DescribeEndpointServiceAvailabilityZonesRequest.Validate if the designated
// constraints aren't met.
type DescribeEndpointServiceAvailabilityZonesRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DescribeEndpointServiceAvailabilityZonesRequestValidationError) Field() string {
	return e.field
}

// Reason function returns reason value.
func (e DescribeEndpointServiceAvailabilityZonesRequestValidationError) Reason() string {
	return e.reason
}

// Cause function returns cause value.
func (e DescribeEndpointServiceAvailabilityZonesRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DescribeEndpointServiceAvailabilityZonesRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DescribeEndpointServiceAvailabilityZonesRequestValidationError) ErrorName() string {
	return "DescribeEndpointServiceAvailabilityZonesRequestValidationError"
}

// Error satisfies the builtin error interface
func (e DescribeEndpointServiceAvailabilityZonesRequestValidationError) 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 %sDescribeEndpointServiceAvailabilityZonesRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DescribeEndpointServiceAvailabilityZonesRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DescribeEndpointServiceAvailabilityZonesRequestValidationError{}

// Validate checks the field values on
// DescribeEndpointServiceAvailabilityZonesResponse 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 *DescribeEndpointServiceAvailabilityZonesResponse) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// DescribeEndpointServiceAvailabilityZonesResponse 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
// DescribeEndpointServiceAvailabilityZonesResponseMultiError, or nil if none found.
func (m *DescribeEndpointServiceAvailabilityZonesResponse) ValidateAll() error {
	return m.validate(true)
}

func (m *DescribeEndpointServiceAvailabilityZonesResponse) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	for idx, item := range m.GetZones() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, DescribeEndpointServiceAvailabilityZonesResponseValidationError{
						field:  fmt.Sprintf("Zones[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, DescribeEndpointServiceAvailabilityZonesResponseValidationError{
						field:  fmt.Sprintf("Zones[%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 DescribeEndpointServiceAvailabilityZonesResponseValidationError{
					field:  fmt.Sprintf("Zones[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return DescribeEndpointServiceAvailabilityZonesResponseMultiError(errors)
	}

	return nil
}

// DescribeEndpointServiceAvailabilityZonesResponseMultiError is an error
// wrapping multiple validation errors returned by
// DescribeEndpointServiceAvailabilityZonesResponse.ValidateAll() if the
// designated constraints aren't met.
type DescribeEndpointServiceAvailabilityZonesResponseMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DescribeEndpointServiceAvailabilityZonesResponseMultiError) 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 DescribeEndpointServiceAvailabilityZonesResponseMultiError) AllErrors() []error { return m }

// DescribeEndpointServiceAvailabilityZonesResponseValidationError is the
// validation error returned by
// DescribeEndpointServiceAvailabilityZonesResponse.Validate if the designated
// constraints aren't met.
type DescribeEndpointServiceAvailabilityZonesResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DescribeEndpointServiceAvailabilityZonesResponseValidationError) Field() string {
	return e.field
}

// Reason function returns reason value.
func (e DescribeEndpointServiceAvailabilityZonesResponseValidationError) Reason() string {
	return e.reason
}

// Cause function returns cause value.
func (e DescribeEndpointServiceAvailabilityZonesResponseValidationError) Cause() error {
	return e.cause
}

// Key function returns key value.
func (e DescribeEndpointServiceAvailabilityZonesResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DescribeEndpointServiceAvailabilityZonesResponseValidationError) ErrorName() string {
	return "DescribeEndpointServiceAvailabilityZonesResponseValidationError"
}

// Error satisfies the builtin error interface
func (e DescribeEndpointServiceAvailabilityZonesResponseValidationError) 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 %sDescribeEndpointServiceAvailabilityZonesResponse.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DescribeEndpointServiceAvailabilityZonesResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DescribeEndpointServiceAvailabilityZonesResponseValidationError{}

// Validate checks the field values on GenerateSinkAdvertisedListenerRequest
// 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 *GenerateSinkAdvertisedListenerRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GenerateSinkAdvertisedListenerRequest
// 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
// GenerateSinkAdvertisedListenerRequestMultiError, or nil if none found.
func (m *GenerateSinkAdvertisedListenerRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *GenerateSinkAdvertisedListenerRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for EndpointServiceName

	if utf8.RuneCountInString(m.GetDownstreamId()) < 1 {
		err := GenerateSinkAdvertisedListenerRequestValidationError{
			field:  "DownstreamId",
			reason: "value length must be at least 1 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if !_GenerateSinkAdvertisedListenerRequest_DownstreamId_Pattern.MatchString(m.GetDownstreamId()) {
		err := GenerateSinkAdvertisedListenerRequestValidationError{
			field:  "DownstreamId",
			reason: "value does not match regex pattern \"^[a-z0-9]+$\"",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(errors) > 0 {
		return GenerateSinkAdvertisedListenerRequestMultiError(errors)
	}

	return nil
}

// GenerateSinkAdvertisedListenerRequestMultiError is an error wrapping
// multiple validation errors returned by
// GenerateSinkAdvertisedListenerRequest.ValidateAll() if the designated
// constraints aren't met.
type GenerateSinkAdvertisedListenerRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GenerateSinkAdvertisedListenerRequestMultiError) 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 GenerateSinkAdvertisedListenerRequestMultiError) AllErrors() []error { return m }

// GenerateSinkAdvertisedListenerRequestValidationError is the validation error
// returned by GenerateSinkAdvertisedListenerRequest.Validate if the
// designated constraints aren't met.
type GenerateSinkAdvertisedListenerRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GenerateSinkAdvertisedListenerRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GenerateSinkAdvertisedListenerRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GenerateSinkAdvertisedListenerRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GenerateSinkAdvertisedListenerRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GenerateSinkAdvertisedListenerRequestValidationError) ErrorName() string {
	return "GenerateSinkAdvertisedListenerRequestValidationError"
}

// Error satisfies the builtin error interface
func (e GenerateSinkAdvertisedListenerRequestValidationError) 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 %sGenerateSinkAdvertisedListenerRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GenerateSinkAdvertisedListenerRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GenerateSinkAdvertisedListenerRequestValidationError{}

var _GenerateSinkAdvertisedListenerRequest_DownstreamId_Pattern = regexp.MustCompile("^[a-z0-9]+$")

// Validate checks the field values on GenerateSinkAdvertisedListenerResponse
// 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 *GenerateSinkAdvertisedListenerResponse) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// GenerateSinkAdvertisedListenerResponse 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
// GenerateSinkAdvertisedListenerResponseMultiError, or nil if none found.
func (m *GenerateSinkAdvertisedListenerResponse) ValidateAll() error {
	return m.validate(true)
}

func (m *GenerateSinkAdvertisedListenerResponse) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetAdvertisedListener()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, GenerateSinkAdvertisedListenerResponseValidationError{
					field:  "AdvertisedListener",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, GenerateSinkAdvertisedListenerResponseValidationError{
					field:  "AdvertisedListener",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetAdvertisedListener()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return GenerateSinkAdvertisedListenerResponseValidationError{
				field:  "AdvertisedListener",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return GenerateSinkAdvertisedListenerResponseMultiError(errors)
	}

	return nil
}

// GenerateSinkAdvertisedListenerResponseMultiError is an error wrapping
// multiple validation errors returned by
// GenerateSinkAdvertisedListenerResponse.ValidateAll() if the designated
// constraints aren't met.
type GenerateSinkAdvertisedListenerResponseMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GenerateSinkAdvertisedListenerResponseMultiError) 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 GenerateSinkAdvertisedListenerResponseMultiError) AllErrors() []error { return m }

// GenerateSinkAdvertisedListenerResponseValidationError is the validation
// error returned by GenerateSinkAdvertisedListenerResponse.Validate if the
// designated constraints aren't met.
type GenerateSinkAdvertisedListenerResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GenerateSinkAdvertisedListenerResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GenerateSinkAdvertisedListenerResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GenerateSinkAdvertisedListenerResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GenerateSinkAdvertisedListenerResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GenerateSinkAdvertisedListenerResponseValidationError) ErrorName() string {
	return "GenerateSinkAdvertisedListenerResponseValidationError"
}

// Error satisfies the builtin error interface
func (e GenerateSinkAdvertisedListenerResponseValidationError) 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 %sGenerateSinkAdvertisedListenerResponse.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GenerateSinkAdvertisedListenerResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GenerateSinkAdvertisedListenerResponseValidationError{}

// Validate checks the field values on
// ValidateSinkAdvertisedListenerDomainRequest 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 *ValidateSinkAdvertisedListenerDomainRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// ValidateSinkAdvertisedListenerDomainRequest 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
// ValidateSinkAdvertisedListenerDomainRequestMultiError, or nil if none found.
func (m *ValidateSinkAdvertisedListenerDomainRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *ValidateSinkAdvertisedListenerDomainRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for EndpointServiceName

	// no validation rules for RootDomainName

	if len(errors) > 0 {
		return ValidateSinkAdvertisedListenerDomainRequestMultiError(errors)
	}

	return nil
}

// ValidateSinkAdvertisedListenerDomainRequestMultiError is an error wrapping
// multiple validation errors returned by
// ValidateSinkAdvertisedListenerDomainRequest.ValidateAll() if the designated
// constraints aren't met.
type ValidateSinkAdvertisedListenerDomainRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ValidateSinkAdvertisedListenerDomainRequestMultiError) 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 ValidateSinkAdvertisedListenerDomainRequestMultiError) AllErrors() []error { return m }

// ValidateSinkAdvertisedListenerDomainRequestValidationError is the validation
// error returned by ValidateSinkAdvertisedListenerDomainRequest.Validate if
// the designated constraints aren't met.
type ValidateSinkAdvertisedListenerDomainRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ValidateSinkAdvertisedListenerDomainRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ValidateSinkAdvertisedListenerDomainRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ValidateSinkAdvertisedListenerDomainRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ValidateSinkAdvertisedListenerDomainRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ValidateSinkAdvertisedListenerDomainRequestValidationError) ErrorName() string {
	return "ValidateSinkAdvertisedListenerDomainRequestValidationError"
}

// Error satisfies the builtin error interface
func (e ValidateSinkAdvertisedListenerDomainRequestValidationError) 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 %sValidateSinkAdvertisedListenerDomainRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ValidateSinkAdvertisedListenerDomainRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ValidateSinkAdvertisedListenerDomainRequestValidationError{}

// Validate checks the field values on
// ValidateSinkAdvertisedListenerDomainResponse 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 *ValidateSinkAdvertisedListenerDomainResponse) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// ValidateSinkAdvertisedListenerDomainResponse 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
// ValidateSinkAdvertisedListenerDomainResponseMultiError, or nil if none found.
func (m *ValidateSinkAdvertisedListenerDomainResponse) ValidateAll() error {
	return m.validate(true)
}

func (m *ValidateSinkAdvertisedListenerDomainResponse) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetAdvertisedListener()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ValidateSinkAdvertisedListenerDomainResponseValidationError{
					field:  "AdvertisedListener",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ValidateSinkAdvertisedListenerDomainResponseValidationError{
					field:  "AdvertisedListener",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetAdvertisedListener()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ValidateSinkAdvertisedListenerDomainResponseValidationError{
				field:  "AdvertisedListener",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return ValidateSinkAdvertisedListenerDomainResponseMultiError(errors)
	}

	return nil
}

// ValidateSinkAdvertisedListenerDomainResponseMultiError is an error wrapping
// multiple validation errors returned by
// ValidateSinkAdvertisedListenerDomainResponse.ValidateAll() if the
// designated constraints aren't met.
type ValidateSinkAdvertisedListenerDomainResponseMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ValidateSinkAdvertisedListenerDomainResponseMultiError) 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 ValidateSinkAdvertisedListenerDomainResponseMultiError) AllErrors() []error { return m }

// ValidateSinkAdvertisedListenerDomainResponseValidationError is the
// validation error returned by
// ValidateSinkAdvertisedListenerDomainResponse.Validate if the designated
// constraints aren't met.
type ValidateSinkAdvertisedListenerDomainResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ValidateSinkAdvertisedListenerDomainResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ValidateSinkAdvertisedListenerDomainResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ValidateSinkAdvertisedListenerDomainResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ValidateSinkAdvertisedListenerDomainResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ValidateSinkAdvertisedListenerDomainResponseValidationError) ErrorName() string {
	return "ValidateSinkAdvertisedListenerDomainResponseValidationError"
}

// Error satisfies the builtin error interface
func (e ValidateSinkAdvertisedListenerDomainResponseValidationError) 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 %sValidateSinkAdvertisedListenerDomainResponse.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ValidateSinkAdvertisedListenerDomainResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ValidateSinkAdvertisedListenerDomainResponseValidationError{}

// Validate checks the field values on GetSinkEndpointAuthInfoRequest 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 *GetSinkEndpointAuthInfoRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetSinkEndpointAuthInfoRequest 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
// GetSinkEndpointAuthInfoRequestMultiError, or nil if none found.
func (m *GetSinkEndpointAuthInfoRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *GetSinkEndpointAuthInfoRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	if len(errors) > 0 {
		return GetSinkEndpointAuthInfoRequestMultiError(errors)
	}

	return nil
}

// GetSinkEndpointAuthInfoRequestMultiError is an error wrapping multiple
// validation errors returned by GetSinkEndpointAuthInfoRequest.ValidateAll()
// if the designated constraints aren't met.
type GetSinkEndpointAuthInfoRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetSinkEndpointAuthInfoRequestMultiError) 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 GetSinkEndpointAuthInfoRequestMultiError) AllErrors() []error { return m }

// GetSinkEndpointAuthInfoRequestValidationError is the validation error
// returned by GetSinkEndpointAuthInfoRequest.Validate if the designated
// constraints aren't met.
type GetSinkEndpointAuthInfoRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetSinkEndpointAuthInfoRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetSinkEndpointAuthInfoRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetSinkEndpointAuthInfoRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetSinkEndpointAuthInfoRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetSinkEndpointAuthInfoRequestValidationError) ErrorName() string {
	return "GetSinkEndpointAuthInfoRequestValidationError"
}

// Error satisfies the builtin error interface
func (e GetSinkEndpointAuthInfoRequestValidationError) 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 %sGetSinkEndpointAuthInfoRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetSinkEndpointAuthInfoRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetSinkEndpointAuthInfoRequestValidationError{}

// Validate checks the field values on GetSinkEndpointAuthInfoResponse 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 *GetSinkEndpointAuthInfoResponse) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetSinkEndpointAuthInfoResponse 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
// GetSinkEndpointAuthInfoResponseMultiError, or nil if none found.
func (m *GetSinkEndpointAuthInfoResponse) ValidateAll() error {
	return m.validate(true)
}

func (m *GetSinkEndpointAuthInfoResponse) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for CloudAccountId

	// no validation rules for AwsPrincipalId

	if len(errors) > 0 {
		return GetSinkEndpointAuthInfoResponseMultiError(errors)
	}

	return nil
}

// GetSinkEndpointAuthInfoResponseMultiError is an error wrapping multiple
// validation errors returned by GetSinkEndpointAuthInfoResponse.ValidateAll()
// if the designated constraints aren't met.
type GetSinkEndpointAuthInfoResponseMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetSinkEndpointAuthInfoResponseMultiError) 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 GetSinkEndpointAuthInfoResponseMultiError) AllErrors() []error { return m }

// GetSinkEndpointAuthInfoResponseValidationError is the validation error
// returned by GetSinkEndpointAuthInfoResponse.Validate if the designated
// constraints aren't met.
type GetSinkEndpointAuthInfoResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetSinkEndpointAuthInfoResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetSinkEndpointAuthInfoResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetSinkEndpointAuthInfoResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetSinkEndpointAuthInfoResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetSinkEndpointAuthInfoResponseValidationError) ErrorName() string {
	return "GetSinkEndpointAuthInfoResponseValidationError"
}

// Error satisfies the builtin error interface
func (e GetSinkEndpointAuthInfoResponseValidationError) 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 %sGetSinkEndpointAuthInfoResponse.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetSinkEndpointAuthInfoResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetSinkEndpointAuthInfoResponseValidationError{}

// Validate checks the field values on GetDataPipelineStagingTrustRequest 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 *GetDataPipelineStagingTrustRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetDataPipelineStagingTrustRequest
// 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
// GetDataPipelineStagingTrustRequestMultiError, or nil if none found.
func (m *GetDataPipelineStagingTrustRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *GetDataPipelineStagingTrustRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if l := utf8.RuneCountInString(m.GetLakeOrgId()); l < 1 || l > 64 {
		err := GetDataPipelineStagingTrustRequestValidationError{
			field:  "LakeOrgId",
			reason: "value length must be between 1 and 64 runes, inclusive",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if !_GetDataPipelineStagingTrustRequest_LakeOrgId_Pattern.MatchString(m.GetLakeOrgId()) {
		err := GetDataPipelineStagingTrustRequestValidationError{
			field:  "LakeOrgId",
			reason: "value does not match regex pattern \"^[0-9]+$\"",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetClusterId() <= 0 {
		err := GetDataPipelineStagingTrustRequestValidationError{
			field:  "ClusterId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(errors) > 0 {
		return GetDataPipelineStagingTrustRequestMultiError(errors)
	}

	return nil
}

// GetDataPipelineStagingTrustRequestMultiError is an error wrapping multiple
// validation errors returned by
// GetDataPipelineStagingTrustRequest.ValidateAll() if the designated
// constraints aren't met.
type GetDataPipelineStagingTrustRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetDataPipelineStagingTrustRequestMultiError) 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 GetDataPipelineStagingTrustRequestMultiError) AllErrors() []error { return m }

// GetDataPipelineStagingTrustRequestValidationError is the validation error
// returned by GetDataPipelineStagingTrustRequest.Validate if the designated
// constraints aren't met.
type GetDataPipelineStagingTrustRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetDataPipelineStagingTrustRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetDataPipelineStagingTrustRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetDataPipelineStagingTrustRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetDataPipelineStagingTrustRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetDataPipelineStagingTrustRequestValidationError) ErrorName() string {
	return "GetDataPipelineStagingTrustRequestValidationError"
}

// Error satisfies the builtin error interface
func (e GetDataPipelineStagingTrustRequestValidationError) 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 %sGetDataPipelineStagingTrustRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetDataPipelineStagingTrustRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetDataPipelineStagingTrustRequestValidationError{}

var _GetDataPipelineStagingTrustRequest_LakeOrgId_Pattern = regexp.MustCompile("^[0-9]+$")

// Validate checks the field values on DataPipelineStagingTrustPrincipal 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 *DataPipelineStagingTrustPrincipal) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineStagingTrustPrincipal
// 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
// DataPipelineStagingTrustPrincipalMultiError, or nil if none found.
func (m *DataPipelineStagingTrustPrincipal) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineStagingTrustPrincipal) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Name

	// no validation rules for RoleArn

	// no validation rules for ExternalId

	if len(errors) > 0 {
		return DataPipelineStagingTrustPrincipalMultiError(errors)
	}

	return nil
}

// DataPipelineStagingTrustPrincipalMultiError is an error wrapping multiple
// validation errors returned by
// DataPipelineStagingTrustPrincipal.ValidateAll() if the designated
// constraints aren't met.
type DataPipelineStagingTrustPrincipalMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineStagingTrustPrincipalMultiError) 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 DataPipelineStagingTrustPrincipalMultiError) AllErrors() []error { return m }

// DataPipelineStagingTrustPrincipalValidationError is the validation error
// returned by DataPipelineStagingTrustPrincipal.Validate if the designated
// constraints aren't met.
type DataPipelineStagingTrustPrincipalValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineStagingTrustPrincipalValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineStagingTrustPrincipalValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineStagingTrustPrincipalValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineStagingTrustPrincipalValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineStagingTrustPrincipalValidationError) ErrorName() string {
	return "DataPipelineStagingTrustPrincipalValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineStagingTrustPrincipalValidationError) 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 %sDataPipelineStagingTrustPrincipal.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineStagingTrustPrincipalValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineStagingTrustPrincipalValidationError{}

// Validate checks the field values on DataPipelineStagingTrust 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 *DataPipelineStagingTrust) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineStagingTrust 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
// DataPipelineStagingTrustMultiError, or nil if none found.
func (m *DataPipelineStagingTrust) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineStagingTrust) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	for idx, item := range m.GetPrincipals() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, DataPipelineStagingTrustValidationError{
						field:  fmt.Sprintf("Principals[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, DataPipelineStagingTrustValidationError{
						field:  fmt.Sprintf("Principals[%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 DataPipelineStagingTrustValidationError{
					field:  fmt.Sprintf("Principals[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return DataPipelineStagingTrustMultiError(errors)
	}

	return nil
}

// DataPipelineStagingTrustMultiError is an error wrapping multiple validation
// errors returned by DataPipelineStagingTrust.ValidateAll() if the designated
// constraints aren't met.
type DataPipelineStagingTrustMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineStagingTrustMultiError) 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 DataPipelineStagingTrustMultiError) AllErrors() []error { return m }

// DataPipelineStagingTrustValidationError is the validation error returned by
// DataPipelineStagingTrust.Validate if the designated constraints aren't met.
type DataPipelineStagingTrustValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineStagingTrustValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineStagingTrustValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineStagingTrustValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineStagingTrustValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineStagingTrustValidationError) ErrorName() string {
	return "DataPipelineStagingTrustValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineStagingTrustValidationError) 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 %sDataPipelineStagingTrust.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineStagingTrustValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineStagingTrustValidationError{}

// Validate checks the field values on DataPipelineSourceInput 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 *DataPipelineSourceInput) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineSourceInput 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
// DataPipelineSourceInputMultiError, or nil if none found.
func (m *DataPipelineSourceInput) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineSourceInput) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if l := utf8.RuneCountInString(m.GetUsername()); l < 1 || l > 256 {
		err := DataPipelineSourceInputValidationError{
			field:  "Username",
			reason: "value length must be between 1 and 256 runes, inclusive",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if l := utf8.RuneCountInString(m.GetPassword()); l < 1 || l > 4096 {
		err := DataPipelineSourceInputValidationError{
			field:  "Password",
			reason: "value length must be between 1 and 4096 runes, inclusive",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(m.GetTableFilter()) < 1 {
		err := DataPipelineSourceInputValidationError{
			field:  "TableFilter",
			reason: "value must contain at least 1 item(s)",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	_DataPipelineSourceInput_TableFilter_Unique := make(map[string]struct{}, len(m.GetTableFilter()))

	for idx, item := range m.GetTableFilter() {
		_, _ = idx, item

		if _, exists := _DataPipelineSourceInput_TableFilter_Unique[item]; exists {
			err := DataPipelineSourceInputValidationError{
				field:  fmt.Sprintf("TableFilter[%v]", idx),
				reason: "repeated value must contain unique items",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		} else {
			_DataPipelineSourceInput_TableFilter_Unique[item] = struct{}{}
		}

		if l := utf8.RuneCountInString(item); l < 1 || l > 512 {
			err := DataPipelineSourceInputValidationError{
				field:  fmt.Sprintf("TableFilter[%v]", idx),
				reason: "value length must be between 1 and 512 runes, inclusive",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}

	}

	// no validation rules for CaseSensitive

	if len(errors) > 0 {
		return DataPipelineSourceInputMultiError(errors)
	}

	return nil
}

// DataPipelineSourceInputMultiError is an error wrapping multiple validation
// errors returned by DataPipelineSourceInput.ValidateAll() if the designated
// constraints aren't met.
type DataPipelineSourceInputMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineSourceInputMultiError) 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 DataPipelineSourceInputMultiError) AllErrors() []error { return m }

// DataPipelineSourceInputValidationError is the validation error returned by
// DataPipelineSourceInput.Validate if the designated constraints aren't met.
type DataPipelineSourceInputValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineSourceInputValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineSourceInputValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineSourceInputValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineSourceInputValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineSourceInputValidationError) ErrorName() string {
	return "DataPipelineSourceInputValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineSourceInputValidationError) 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 %sDataPipelineSourceInput.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineSourceInputValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineSourceInputValidationError{}

// Validate checks the field values on DataPipelineSource 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 *DataPipelineSource) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineSource 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
// DataPipelineSourceMultiError, or nil if none found.
func (m *DataPipelineSource) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineSource) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Username

	// no validation rules for CaseSensitive

	if m.MatchedTableCount != nil {
		// no validation rules for MatchedTableCount
	}

	if len(errors) > 0 {
		return DataPipelineSourceMultiError(errors)
	}

	return nil
}

// DataPipelineSourceMultiError is an error wrapping multiple validation errors
// returned by DataPipelineSource.ValidateAll() if the designated constraints
// aren't met.
type DataPipelineSourceMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineSourceMultiError) 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 DataPipelineSourceMultiError) AllErrors() []error { return m }

// DataPipelineSourceValidationError is the validation error returned by
// DataPipelineSource.Validate if the designated constraints aren't met.
type DataPipelineSourceValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineSourceValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineSourceValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineSourceValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineSourceValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineSourceValidationError) ErrorName() string {
	return "DataPipelineSourceValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineSourceValidationError) 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 %sDataPipelineSource.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineSourceValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineSourceValidationError{}

// Validate checks the field values on DataPipelineTableSelection 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 *DataPipelineTableSelection) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineTableSelection 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
// DataPipelineTableSelectionMultiError, or nil if none found.
func (m *DataPipelineTableSelection) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineTableSelection) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(m.GetTableFilter()) < 1 {
		err := DataPipelineTableSelectionValidationError{
			field:  "TableFilter",
			reason: "value must contain at least 1 item(s)",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	_DataPipelineTableSelection_TableFilter_Unique := make(map[string]struct{}, len(m.GetTableFilter()))

	for idx, item := range m.GetTableFilter() {
		_, _ = idx, item

		if _, exists := _DataPipelineTableSelection_TableFilter_Unique[item]; exists {
			err := DataPipelineTableSelectionValidationError{
				field:  fmt.Sprintf("TableFilter[%v]", idx),
				reason: "repeated value must contain unique items",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		} else {
			_DataPipelineTableSelection_TableFilter_Unique[item] = struct{}{}
		}

		if l := utf8.RuneCountInString(item); l < 1 || l > 512 {
			err := DataPipelineTableSelectionValidationError{
				field:  fmt.Sprintf("TableFilter[%v]", idx),
				reason: "value length must be between 1 and 512 runes, inclusive",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}

	}

	// no validation rules for CaseSensitive

	if len(errors) > 0 {
		return DataPipelineTableSelectionMultiError(errors)
	}

	return nil
}

// DataPipelineTableSelectionMultiError is an error wrapping multiple
// validation errors returned by DataPipelineTableSelection.ValidateAll() if
// the designated constraints aren't met.
type DataPipelineTableSelectionMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineTableSelectionMultiError) 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 DataPipelineTableSelectionMultiError) AllErrors() []error { return m }

// DataPipelineTableSelectionValidationError is the validation error returned
// by DataPipelineTableSelection.Validate if the designated constraints aren't met.
type DataPipelineTableSelectionValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineTableSelectionValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineTableSelectionValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineTableSelectionValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineTableSelectionValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineTableSelectionValidationError) ErrorName() string {
	return "DataPipelineTableSelectionValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineTableSelectionValidationError) 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 %sDataPipelineTableSelection.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineTableSelectionValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineTableSelectionValidationError{}

// Validate checks the field values on DataPipelineTargetNaming 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 *DataPipelineTargetNaming) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineTargetNaming 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
// DataPipelineTargetNamingMultiError, or nil if none found.
func (m *DataPipelineTargetNaming) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineTargetNaming) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if utf8.RuneCountInString(m.GetDatabasePrefix()) > 128 {
		err := DataPipelineTargetNamingValidationError{
			field:  "DatabasePrefix",
			reason: "value length must be at most 128 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if utf8.RuneCountInString(m.GetDatabaseSuffix()) > 128 {
		err := DataPipelineTargetNamingValidationError{
			field:  "DatabaseSuffix",
			reason: "value length must be at most 128 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if utf8.RuneCountInString(m.GetTablePrefix()) > 128 {
		err := DataPipelineTargetNamingValidationError{
			field:  "TablePrefix",
			reason: "value length must be at most 128 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if utf8.RuneCountInString(m.GetTableSuffix()) > 128 {
		err := DataPipelineTargetNamingValidationError{
			field:  "TableSuffix",
			reason: "value length must be at most 128 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(errors) > 0 {
		return DataPipelineTargetNamingMultiError(errors)
	}

	return nil
}

// DataPipelineTargetNamingMultiError is an error wrapping multiple validation
// errors returned by DataPipelineTargetNaming.ValidateAll() if the designated
// constraints aren't met.
type DataPipelineTargetNamingMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineTargetNamingMultiError) 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 DataPipelineTargetNamingMultiError) AllErrors() []error { return m }

// DataPipelineTargetNamingValidationError is the validation error returned by
// DataPipelineTargetNaming.Validate if the designated constraints aren't met.
type DataPipelineTargetNamingValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineTargetNamingValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineTargetNamingValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineTargetNamingValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineTargetNamingValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineTargetNamingValidationError) ErrorName() string {
	return "DataPipelineTargetNamingValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineTargetNamingValidationError) 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 %sDataPipelineTargetNaming.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineTargetNamingValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineTargetNamingValidationError{}

// Validate checks the field values on DataPipelineDestination 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 *DataPipelineDestination) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineDestination 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
// DataPipelineDestinationMultiError, or nil if none found.
func (m *DataPipelineDestination) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineDestination) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if _, ok := _DataPipelineDestination_Type_NotInLookup[m.GetType()]; ok {
		err := DataPipelineDestinationValidationError{
			field:  "Type",
			reason: "value must not be in list [0]",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if _, ok := DataPipelineDestinationType_name[int32(m.GetType())]; !ok {
		err := DataPipelineDestinationValidationError{
			field:  "Type",
			reason: "value must be one of the defined enum values",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if l := utf8.RuneCountInString(m.GetLakeOrgId()); l < 1 || l > 64 {
		err := DataPipelineDestinationValidationError{
			field:  "LakeOrgId",
			reason: "value length must be between 1 and 64 runes, inclusive",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if !_DataPipelineDestination_LakeOrgId_Pattern.MatchString(m.GetLakeOrgId()) {
		err := DataPipelineDestinationValidationError{
			field:  "LakeOrgId",
			reason: "value does not match regex pattern \"^[0-9]+$\"",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if l := utf8.RuneCountInString(m.GetWarehouse()); l < 1 || l > 256 {
		err := DataPipelineDestinationValidationError{
			field:  "Warehouse",
			reason: "value length must be between 1 and 256 runes, inclusive",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetTargetNaming() == nil {
		err := DataPipelineDestinationValidationError{
			field:  "TargetNaming",
			reason: "value is required",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if all {
		switch v := interface{}(m.GetTargetNaming()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineDestinationValidationError{
					field:  "TargetNaming",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineDestinationValidationError{
					field:  "TargetNaming",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetTargetNaming()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineDestinationValidationError{
				field:  "TargetNaming",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for FlushIntervalSeconds

	if len(errors) > 0 {
		return DataPipelineDestinationMultiError(errors)
	}

	return nil
}

// DataPipelineDestinationMultiError is an error wrapping multiple validation
// errors returned by DataPipelineDestination.ValidateAll() if the designated
// constraints aren't met.
type DataPipelineDestinationMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineDestinationMultiError) 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 DataPipelineDestinationMultiError) AllErrors() []error { return m }

// DataPipelineDestinationValidationError is the validation error returned by
// DataPipelineDestination.Validate if the designated constraints aren't met.
type DataPipelineDestinationValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineDestinationValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineDestinationValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineDestinationValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineDestinationValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineDestinationValidationError) ErrorName() string {
	return "DataPipelineDestinationValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineDestinationValidationError) 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 %sDataPipelineDestination.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineDestinationValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineDestinationValidationError{}

var _DataPipelineDestination_Type_NotInLookup = map[DataPipelineDestinationType]struct{}{
	0: {},
}

var _DataPipelineDestination_LakeOrgId_Pattern = regexp.MustCompile("^[0-9]+$")

// Validate checks the field values on DataPipelineEditableDestination 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 *DataPipelineEditableDestination) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineEditableDestination 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
// DataPipelineEditableDestinationMultiError, or nil if none found.
func (m *DataPipelineEditableDestination) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineEditableDestination) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if l := utf8.RuneCountInString(m.GetWarehouse()); l < 1 || l > 256 {
		err := DataPipelineEditableDestinationValidationError{
			field:  "Warehouse",
			reason: "value length must be between 1 and 256 runes, inclusive",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetTargetNaming() == nil {
		err := DataPipelineEditableDestinationValidationError{
			field:  "TargetNaming",
			reason: "value is required",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if all {
		switch v := interface{}(m.GetTargetNaming()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineEditableDestinationValidationError{
					field:  "TargetNaming",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineEditableDestinationValidationError{
					field:  "TargetNaming",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetTargetNaming()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineEditableDestinationValidationError{
				field:  "TargetNaming",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for FlushIntervalSeconds

	if len(errors) > 0 {
		return DataPipelineEditableDestinationMultiError(errors)
	}

	return nil
}

// DataPipelineEditableDestinationMultiError is an error wrapping multiple
// validation errors returned by DataPipelineEditableDestination.ValidateAll()
// if the designated constraints aren't met.
type DataPipelineEditableDestinationMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineEditableDestinationMultiError) 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 DataPipelineEditableDestinationMultiError) AllErrors() []error { return m }

// DataPipelineEditableDestinationValidationError is the validation error
// returned by DataPipelineEditableDestination.Validate if the designated
// constraints aren't met.
type DataPipelineEditableDestinationValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineEditableDestinationValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineEditableDestinationValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineEditableDestinationValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineEditableDestinationValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineEditableDestinationValidationError) ErrorName() string {
	return "DataPipelineEditableDestinationValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineEditableDestinationValidationError) 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 %sDataPipelineEditableDestination.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineEditableDestinationValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineEditableDestinationValidationError{}

// Validate checks the field values on DataPipelineS3StagingInput 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 *DataPipelineS3StagingInput) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineS3StagingInput 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
// DataPipelineS3StagingInputMultiError, or nil if none found.
func (m *DataPipelineS3StagingInput) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineS3StagingInput) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if l := utf8.RuneCountInString(m.GetUri()); l < 6 || l > 2048 {
		err := DataPipelineS3StagingInputValidationError{
			field:  "Uri",
			reason: "value length must be between 6 and 2048 runes, inclusive",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if !_DataPipelineS3StagingInput_Uri_Pattern.MatchString(m.GetUri()) {
		err := DataPipelineS3StagingInputValidationError{
			field:  "Uri",
			reason: "value does not match regex pattern \"^(s3|oss)://[^/]+(/.*)?$\"",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if l := utf8.RuneCountInString(m.GetRegion()); l < 1 || l > 128 {
		err := DataPipelineS3StagingInputValidationError{
			field:  "Region",
			reason: "value length must be between 1 and 128 runes, inclusive",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if utf8.RuneCountInString(m.GetAccessKeyId()) > 256 {
		err := DataPipelineS3StagingInputValidationError{
			field:  "AccessKeyId",
			reason: "value length must be at most 256 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if utf8.RuneCountInString(m.GetSecretAccessKey()) > 4096 {
		err := DataPipelineS3StagingInputValidationError{
			field:  "SecretAccessKey",
			reason: "value length must be at most 4096 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if utf8.RuneCountInString(m.GetEndpoint()) > 2048 {
		err := DataPipelineS3StagingInputValidationError{
			field:  "Endpoint",
			reason: "value length must be at most 2048 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if _, ok := _DataPipelineS3StagingInput_AuthType_NotInLookup[m.GetAuthType()]; ok {
		err := DataPipelineS3StagingInputValidationError{
			field:  "AuthType",
			reason: "value must not be in list [0]",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if _, ok := DataPipelineS3AuthType_name[int32(m.GetAuthType())]; !ok {
		err := DataPipelineS3StagingInputValidationError{
			field:  "AuthType",
			reason: "value must be one of the defined enum values",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if utf8.RuneCountInString(m.GetRoleArn()) > 2048 {
		err := DataPipelineS3StagingInputValidationError{
			field:  "RoleArn",
			reason: "value length must be at most 2048 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if utf8.RuneCountInString(m.GetSqsQueueUrl()) > 2048 {
		err := DataPipelineS3StagingInputValidationError{
			field:  "SqsQueueUrl",
			reason: "value length must be at most 2048 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if !_DataPipelineS3StagingInput_SqsQueueUrl_Pattern.MatchString(m.GetSqsQueueUrl()) {
		err := DataPipelineS3StagingInputValidationError{
			field:  "SqsQueueUrl",
			reason: "value does not match regex pattern \"^$|^https://sqs\\\\.[a-z0-9-]+\\\\.amazonaws\\\\.com/[0-9]{12}/[A-Za-z0-9_.-]+$\"",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if utf8.RuneCountInString(m.GetSqsRegion()) > 128 {
		err := DataPipelineS3StagingInputValidationError{
			field:  "SqsRegion",
			reason: "value length must be at most 128 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	// no validation rules for Provider

	if len(errors) > 0 {
		return DataPipelineS3StagingInputMultiError(errors)
	}

	return nil
}

// DataPipelineS3StagingInputMultiError is an error wrapping multiple
// validation errors returned by DataPipelineS3StagingInput.ValidateAll() if
// the designated constraints aren't met.
type DataPipelineS3StagingInputMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineS3StagingInputMultiError) 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 DataPipelineS3StagingInputMultiError) AllErrors() []error { return m }

// DataPipelineS3StagingInputValidationError is the validation error returned
// by DataPipelineS3StagingInput.Validate if the designated constraints aren't met.
type DataPipelineS3StagingInputValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineS3StagingInputValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineS3StagingInputValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineS3StagingInputValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineS3StagingInputValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineS3StagingInputValidationError) ErrorName() string {
	return "DataPipelineS3StagingInputValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineS3StagingInputValidationError) 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 %sDataPipelineS3StagingInput.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineS3StagingInputValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineS3StagingInputValidationError{}

var _DataPipelineS3StagingInput_Uri_Pattern = regexp.MustCompile("^(s3|oss)://[^/]+(/.*)?$")

var _DataPipelineS3StagingInput_AuthType_NotInLookup = map[DataPipelineS3AuthType]struct{}{
	0: {},
}

var _DataPipelineS3StagingInput_SqsQueueUrl_Pattern = regexp.MustCompile("^$|^https://sqs\\.[a-z0-9-]+\\.amazonaws\\.com/[0-9]{12}/[A-Za-z0-9_.-]+$")

// Validate checks the field values on DataPipelineStagingInput 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 *DataPipelineStagingInput) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineStagingInput 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
// DataPipelineStagingInputMultiError, or nil if none found.
func (m *DataPipelineStagingInput) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineStagingInput) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if _, ok := _DataPipelineStagingInput_Type_NotInLookup[m.GetType()]; ok {
		err := DataPipelineStagingInputValidationError{
			field:  "Type",
			reason: "value must not be in list [0]",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if _, ok := DataPipelineStagingType_name[int32(m.GetType())]; !ok {
		err := DataPipelineStagingInputValidationError{
			field:  "Type",
			reason: "value must be one of the defined enum values",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if all {
		switch v := interface{}(m.GetS3()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineStagingInputValidationError{
					field:  "S3",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineStagingInputValidationError{
					field:  "S3",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetS3()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineStagingInputValidationError{
				field:  "S3",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return DataPipelineStagingInputMultiError(errors)
	}

	return nil
}

// DataPipelineStagingInputMultiError is an error wrapping multiple validation
// errors returned by DataPipelineStagingInput.ValidateAll() if the designated
// constraints aren't met.
type DataPipelineStagingInputMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineStagingInputMultiError) 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 DataPipelineStagingInputMultiError) AllErrors() []error { return m }

// DataPipelineStagingInputValidationError is the validation error returned by
// DataPipelineStagingInput.Validate if the designated constraints aren't met.
type DataPipelineStagingInputValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineStagingInputValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineStagingInputValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineStagingInputValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineStagingInputValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineStagingInputValidationError) ErrorName() string {
	return "DataPipelineStagingInputValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineStagingInputValidationError) 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 %sDataPipelineStagingInput.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineStagingInputValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineStagingInputValidationError{}

var _DataPipelineStagingInput_Type_NotInLookup = map[DataPipelineStagingType]struct{}{
	0: {},
}

// Validate checks the field values on DataPipelineS3Staging 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 *DataPipelineS3Staging) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineS3Staging 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
// DataPipelineS3StagingMultiError, or nil if none found.
func (m *DataPipelineS3Staging) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineS3Staging) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Uri

	// no validation rules for Region

	// no validation rules for AccessKeyId

	// no validation rules for Endpoint

	// no validation rules for SnapshotUri

	// no validation rules for IncrementalUri

	// no validation rules for AuthType

	// no validation rules for RoleArn

	// no validation rules for SqsQueueUrl

	// no validation rules for SqsRegion

	// no validation rules for Provider

	if len(errors) > 0 {
		return DataPipelineS3StagingMultiError(errors)
	}

	return nil
}

// DataPipelineS3StagingMultiError is an error wrapping multiple validation
// errors returned by DataPipelineS3Staging.ValidateAll() if the designated
// constraints aren't met.
type DataPipelineS3StagingMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineS3StagingMultiError) 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 DataPipelineS3StagingMultiError) AllErrors() []error { return m }

// DataPipelineS3StagingValidationError is the validation error returned by
// DataPipelineS3Staging.Validate if the designated constraints aren't met.
type DataPipelineS3StagingValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineS3StagingValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineS3StagingValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineS3StagingValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineS3StagingValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineS3StagingValidationError) ErrorName() string {
	return "DataPipelineS3StagingValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineS3StagingValidationError) 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 %sDataPipelineS3Staging.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineS3StagingValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineS3StagingValidationError{}

// Validate checks the field values on DataPipelineStaging 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 *DataPipelineStaging) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineStaging 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
// DataPipelineStagingMultiError, or nil if none found.
func (m *DataPipelineStaging) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineStaging) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Type

	if all {
		switch v := interface{}(m.GetS3()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineStagingValidationError{
					field:  "S3",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineStagingValidationError{
					field:  "S3",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetS3()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineStagingValidationError{
				field:  "S3",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return DataPipelineStagingMultiError(errors)
	}

	return nil
}

// DataPipelineStagingMultiError is an error wrapping multiple validation
// errors returned by DataPipelineStaging.ValidateAll() if the designated
// constraints aren't met.
type DataPipelineStagingMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineStagingMultiError) 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 DataPipelineStagingMultiError) AllErrors() []error { return m }

// DataPipelineStagingValidationError is the validation error returned by
// DataPipelineStaging.Validate if the designated constraints aren't met.
type DataPipelineStagingValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineStagingValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineStagingValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineStagingValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineStagingValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineStagingValidationError) ErrorName() string {
	return "DataPipelineStagingValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineStagingValidationError) 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 %sDataPipelineStaging.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineStagingValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineStagingValidationError{}

// Validate checks the field values on DataPipelineExecutionPlan 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 *DataPipelineExecutionPlan) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineExecutionPlan 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
// DataPipelineExecutionPlanMultiError, or nil if none found.
func (m *DataPipelineExecutionPlan) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineExecutionPlan) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for SnapshotEngine

	// no validation rules for SnapshotFormat

	// no validation rules for IncrementalEngine

	// no validation rules for IncrementalFormat

	// no validation rules for SnapshotTso

	if len(errors) > 0 {
		return DataPipelineExecutionPlanMultiError(errors)
	}

	return nil
}

// DataPipelineExecutionPlanMultiError is an error wrapping multiple validation
// errors returned by DataPipelineExecutionPlan.ValidateAll() if the
// designated constraints aren't met.
type DataPipelineExecutionPlanMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineExecutionPlanMultiError) 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 DataPipelineExecutionPlanMultiError) AllErrors() []error { return m }

// DataPipelineExecutionPlanValidationError is the validation error returned by
// DataPipelineExecutionPlan.Validate if the designated constraints aren't met.
type DataPipelineExecutionPlanValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineExecutionPlanValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineExecutionPlanValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineExecutionPlanValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineExecutionPlanValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineExecutionPlanValidationError) ErrorName() string {
	return "DataPipelineExecutionPlanValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineExecutionPlanValidationError) 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 %sDataPipelineExecutionPlan.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineExecutionPlanValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineExecutionPlanValidationError{}

// Validate checks the field values on DataPipelineDeliveryIntervalPlan 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 *DataPipelineDeliveryIntervalPlan) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineDeliveryIntervalPlan 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
// DataPipelineDeliveryIntervalPlanMultiError, or nil if none found.
func (m *DataPipelineDeliveryIntervalPlan) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineDeliveryIntervalPlan) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for EndToEndSeconds

	// no validation rules for ProducerFlushIntervalSeconds

	// no validation rules for ConsumerPollIntervalSeconds

	if len(errors) > 0 {
		return DataPipelineDeliveryIntervalPlanMultiError(errors)
	}

	return nil
}

// DataPipelineDeliveryIntervalPlanMultiError is an error wrapping multiple
// validation errors returned by
// DataPipelineDeliveryIntervalPlan.ValidateAll() if the designated
// constraints aren't met.
type DataPipelineDeliveryIntervalPlanMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineDeliveryIntervalPlanMultiError) 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 DataPipelineDeliveryIntervalPlanMultiError) AllErrors() []error { return m }

// DataPipelineDeliveryIntervalPlanValidationError is the validation error
// returned by DataPipelineDeliveryIntervalPlan.Validate if the designated
// constraints aren't met.
type DataPipelineDeliveryIntervalPlanValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineDeliveryIntervalPlanValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineDeliveryIntervalPlanValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineDeliveryIntervalPlanValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineDeliveryIntervalPlanValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineDeliveryIntervalPlanValidationError) ErrorName() string {
	return "DataPipelineDeliveryIntervalPlanValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineDeliveryIntervalPlanValidationError) 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 %sDataPipelineDeliveryIntervalPlan.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineDeliveryIntervalPlanValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineDeliveryIntervalPlanValidationError{}

// Validate checks the field values on DataPipelineExportResource 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 *DataPipelineExportResource) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineExportResource 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
// DataPipelineExportResourceMultiError, or nil if none found.
func (m *DataPipelineExportResource) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineExportResource) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ExportId

	// no validation rules for Status

	// no validation rules for ErrorMessage

	if len(errors) > 0 {
		return DataPipelineExportResourceMultiError(errors)
	}

	return nil
}

// DataPipelineExportResourceMultiError is an error wrapping multiple
// validation errors returned by DataPipelineExportResource.ValidateAll() if
// the designated constraints aren't met.
type DataPipelineExportResourceMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineExportResourceMultiError) 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 DataPipelineExportResourceMultiError) AllErrors() []error { return m }

// DataPipelineExportResourceValidationError is the validation error returned
// by DataPipelineExportResource.Validate if the designated constraints aren't met.
type DataPipelineExportResourceValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineExportResourceValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineExportResourceValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineExportResourceValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineExportResourceValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineExportResourceValidationError) ErrorName() string {
	return "DataPipelineExportResourceValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineExportResourceValidationError) 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 %sDataPipelineExportResource.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineExportResourceValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineExportResourceValidationError{}

// Validate checks the field values on DataPipelineChangefeedResource 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 *DataPipelineChangefeedResource) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineChangefeedResource 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
// DataPipelineChangefeedResourceMultiError, or nil if none found.
func (m *DataPipelineChangefeedResource) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineChangefeedResource) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ChangefeedId

	// no validation rules for Status

	// no validation rules for ErrorMessage

	if len(errors) > 0 {
		return DataPipelineChangefeedResourceMultiError(errors)
	}

	return nil
}

// DataPipelineChangefeedResourceMultiError is an error wrapping multiple
// validation errors returned by DataPipelineChangefeedResource.ValidateAll()
// if the designated constraints aren't met.
type DataPipelineChangefeedResourceMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineChangefeedResourceMultiError) 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 DataPipelineChangefeedResourceMultiError) AllErrors() []error { return m }

// DataPipelineChangefeedResourceValidationError is the validation error
// returned by DataPipelineChangefeedResource.Validate if the designated
// constraints aren't met.
type DataPipelineChangefeedResourceValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineChangefeedResourceValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineChangefeedResourceValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineChangefeedResourceValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineChangefeedResourceValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineChangefeedResourceValidationError) ErrorName() string {
	return "DataPipelineChangefeedResourceValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineChangefeedResourceValidationError) 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 %sDataPipelineChangefeedResource.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineChangefeedResourceValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineChangefeedResourceValidationError{}

// Validate checks the field values on DataPipelineLakeResources 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 *DataPipelineLakeResources) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineLakeResources 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
// DataPipelineLakeResourcesMultiError, or nil if none found.
func (m *DataPipelineLakeResources) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineLakeResources) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for DatasourceStatus

	// no validation rules for IntegrationStatus

	// no validation rules for ErrorMessage

	// no validation rules for DatasourceName

	// no validation rules for IntegrationName

	if len(errors) > 0 {
		return DataPipelineLakeResourcesMultiError(errors)
	}

	return nil
}

// DataPipelineLakeResourcesMultiError is an error wrapping multiple validation
// errors returned by DataPipelineLakeResources.ValidateAll() if the
// designated constraints aren't met.
type DataPipelineLakeResourcesMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineLakeResourcesMultiError) 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 DataPipelineLakeResourcesMultiError) AllErrors() []error { return m }

// DataPipelineLakeResourcesValidationError is the validation error returned by
// DataPipelineLakeResources.Validate if the designated constraints aren't met.
type DataPipelineLakeResourcesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineLakeResourcesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineLakeResourcesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineLakeResourcesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineLakeResourcesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineLakeResourcesValidationError) ErrorName() string {
	return "DataPipelineLakeResourcesValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineLakeResourcesValidationError) 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 %sDataPipelineLakeResources.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineLakeResourcesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineLakeResourcesValidationError{}

// Validate checks the field values on DataPipelineChildResources 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 *DataPipelineChildResources) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineChildResources 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
// DataPipelineChildResourcesMultiError, or nil if none found.
func (m *DataPipelineChildResources) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineChildResources) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetExport()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineChildResourcesValidationError{
					field:  "Export",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineChildResourcesValidationError{
					field:  "Export",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetExport()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineChildResourcesValidationError{
				field:  "Export",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetChangefeed()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineChildResourcesValidationError{
					field:  "Changefeed",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineChildResourcesValidationError{
					field:  "Changefeed",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetChangefeed()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineChildResourcesValidationError{
				field:  "Changefeed",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetLake()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineChildResourcesValidationError{
					field:  "Lake",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineChildResourcesValidationError{
					field:  "Lake",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetLake()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineChildResourcesValidationError{
				field:  "Lake",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return DataPipelineChildResourcesMultiError(errors)
	}

	return nil
}

// DataPipelineChildResourcesMultiError is an error wrapping multiple
// validation errors returned by DataPipelineChildResources.ValidateAll() if
// the designated constraints aren't met.
type DataPipelineChildResourcesMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineChildResourcesMultiError) 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 DataPipelineChildResourcesMultiError) AllErrors() []error { return m }

// DataPipelineChildResourcesValidationError is the validation error returned
// by DataPipelineChildResources.Validate if the designated constraints aren't met.
type DataPipelineChildResourcesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineChildResourcesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineChildResourcesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineChildResourcesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineChildResourcesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineChildResourcesValidationError) ErrorName() string {
	return "DataPipelineChildResourcesValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineChildResourcesValidationError) 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 %sDataPipelineChildResources.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineChildResourcesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineChildResourcesValidationError{}

// Validate checks the field values on DataPipelineObservation 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 *DataPipelineObservation) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineObservation 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
// DataPipelineObservationMultiError, or nil if none found.
func (m *DataPipelineObservation) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineObservation) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ChangefeedCheckpointTso

	if all {
		switch v := interface{}(m.GetChangefeedCheckpointTime()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineObservationValidationError{
					field:  "ChangefeedCheckpointTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineObservationValidationError{
					field:  "ChangefeedCheckpointTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetChangefeedCheckpointTime()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineObservationValidationError{
				field:  "ChangefeedCheckpointTime",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for LakeResolvedTso

	if all {
		switch v := interface{}(m.GetLakeResolvedTime()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineObservationValidationError{
					field:  "LakeResolvedTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineObservationValidationError{
					field:  "LakeResolvedTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetLakeResolvedTime()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineObservationValidationError{
				field:  "LakeResolvedTime",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for LatencySeconds

	if all {
		switch v := interface{}(m.GetObservedAt()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineObservationValidationError{
					field:  "ObservedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineObservationValidationError{
					field:  "ObservedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetObservedAt()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineObservationValidationError{
				field:  "ObservedAt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for Stale

	// no validation rules for ObservationError

	// no validation rules for RowsSynced

	// no validation rules for InsertCount

	// no validation rules for UpdateCount

	// no validation rules for DeleteCount

	// no validation rules for TablesActive

	// no validation rules for TablesError

	// no validation rules for DatabasesActive

	if len(errors) > 0 {
		return DataPipelineObservationMultiError(errors)
	}

	return nil
}

// DataPipelineObservationMultiError is an error wrapping multiple validation
// errors returned by DataPipelineObservation.ValidateAll() if the designated
// constraints aren't met.
type DataPipelineObservationMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineObservationMultiError) 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 DataPipelineObservationMultiError) AllErrors() []error { return m }

// DataPipelineObservationValidationError is the validation error returned by
// DataPipelineObservation.Validate if the designated constraints aren't met.
type DataPipelineObservationValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineObservationValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineObservationValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineObservationValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineObservationValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineObservationValidationError) ErrorName() string {
	return "DataPipelineObservationValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineObservationValidationError) 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 %sDataPipelineObservation.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineObservationValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineObservationValidationError{}

// Validate checks the field values on DataPipelineError 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 *DataPipelineError) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineError 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
// DataPipelineErrorMultiError, or nil if none found.
func (m *DataPipelineError) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineError) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Code

	// no validation rules for Message

	if len(errors) > 0 {
		return DataPipelineErrorMultiError(errors)
	}

	return nil
}

// DataPipelineErrorMultiError is an error wrapping multiple validation errors
// returned by DataPipelineError.ValidateAll() if the designated constraints
// aren't met.
type DataPipelineErrorMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineErrorMultiError) 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 DataPipelineErrorMultiError) AllErrors() []error { return m }

// DataPipelineErrorValidationError is the validation error returned by
// DataPipelineError.Validate if the designated constraints aren't met.
type DataPipelineErrorValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineErrorValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineErrorValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineErrorValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineErrorValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineErrorValidationError) ErrorName() string {
	return "DataPipelineErrorValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineErrorValidationError) 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 %sDataPipelineError.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineErrorValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineErrorValidationError{}

// Validate checks the field values on DataPipeline 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 *DataPipeline) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipeline 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 DataPipelineMultiError, or
// nil if none found.
func (m *DataPipeline) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipeline) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for PipelineId

	// no validation rules for ClusterId

	// no validation rules for Name

	if all {
		switch v := interface{}(m.GetSource()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "Source",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "Source",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetSource()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineValidationError{
				field:  "Source",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetDestination()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "Destination",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "Destination",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetDestination()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineValidationError{
				field:  "Destination",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetStaging()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "Staging",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "Staging",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetStaging()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineValidationError{
				field:  "Staging",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for SyncMode

	// no validation rules for ChangefeedSpecification

	// no validation rules for Status

	if all {
		switch v := interface{}(m.GetExecutionPlan()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "ExecutionPlan",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "ExecutionPlan",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetExecutionPlan()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineValidationError{
				field:  "ExecutionPlan",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetDeliveryIntervalPlan()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "DeliveryIntervalPlan",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "DeliveryIntervalPlan",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetDeliveryIntervalPlan()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineValidationError{
				field:  "DeliveryIntervalPlan",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetChildResources()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "ChildResources",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "ChildResources",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetChildResources()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineValidationError{
				field:  "ChildResources",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetObservation()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "Observation",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "Observation",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetObservation()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineValidationError{
				field:  "Observation",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetError()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "Error",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "Error",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineValidationError{
				field:  "Error",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetCreatedAt()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "CreatedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "CreatedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetCreatedAt()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineValidationError{
				field:  "CreatedAt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetUpdatedAt()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "UpdatedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, DataPipelineValidationError{
					field:  "UpdatedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetUpdatedAt()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DataPipelineValidationError{
				field:  "UpdatedAt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for Phase

	// no validation rules for CreatorId

	// no validation rules for Creator

	if len(errors) > 0 {
		return DataPipelineMultiError(errors)
	}

	return nil
}

// DataPipelineMultiError is an error wrapping multiple validation errors
// returned by DataPipeline.ValidateAll() if the designated constraints aren't met.
type DataPipelineMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineMultiError) 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 DataPipelineMultiError) AllErrors() []error { return m }

// DataPipelineValidationError is the validation error returned by
// DataPipeline.Validate if the designated constraints aren't met.
type DataPipelineValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineValidationError) ErrorName() string { return "DataPipelineValidationError" }

// Error satisfies the builtin error interface
func (e DataPipelineValidationError) 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 %sDataPipeline.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineValidationError{}

// Validate checks the field values on DataPipelineID 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 *DataPipelineID) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineID 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 DataPipelineIDMultiError,
// or nil if none found.
func (m *DataPipelineID) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineID) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if m.GetClusterId() <= 0 {
		err := DataPipelineIDValidationError{
			field:  "ClusterId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetPipelineId() <= 0 {
		err := DataPipelineIDValidationError{
			field:  "PipelineId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(errors) > 0 {
		return DataPipelineIDMultiError(errors)
	}

	return nil
}

// DataPipelineIDMultiError is an error wrapping multiple validation errors
// returned by DataPipelineID.ValidateAll() if the designated constraints
// aren't met.
type DataPipelineIDMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineIDMultiError) 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 DataPipelineIDMultiError) AllErrors() []error { return m }

// DataPipelineIDValidationError is the validation error returned by
// DataPipelineID.Validate if the designated constraints aren't met.
type DataPipelineIDValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineIDValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineIDValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineIDValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineIDValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineIDValidationError) ErrorName() string { return "DataPipelineIDValidationError" }

// Error satisfies the builtin error interface
func (e DataPipelineIDValidationError) 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 %sDataPipelineID.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineIDValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineIDValidationError{}

// Validate checks the field values on CreateDataPipelineRequest 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 *CreateDataPipelineRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on CreateDataPipelineRequest 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
// CreateDataPipelineRequestMultiError, or nil if none found.
func (m *CreateDataPipelineRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *CreateDataPipelineRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if m.GetClusterId() <= 0 {
		err := CreateDataPipelineRequestValidationError{
			field:  "ClusterId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if l := utf8.RuneCountInString(m.GetName()); l < 1 || l > 64 {
		err := CreateDataPipelineRequestValidationError{
			field:  "Name",
			reason: "value length must be between 1 and 64 runes, inclusive",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetSource() == nil {
		err := CreateDataPipelineRequestValidationError{
			field:  "Source",
			reason: "value is required",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if all {
		switch v := interface{}(m.GetSource()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, CreateDataPipelineRequestValidationError{
					field:  "Source",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, CreateDataPipelineRequestValidationError{
					field:  "Source",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetSource()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return CreateDataPipelineRequestValidationError{
				field:  "Source",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if m.GetDestination() == nil {
		err := CreateDataPipelineRequestValidationError{
			field:  "Destination",
			reason: "value is required",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if all {
		switch v := interface{}(m.GetDestination()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, CreateDataPipelineRequestValidationError{
					field:  "Destination",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, CreateDataPipelineRequestValidationError{
					field:  "Destination",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetDestination()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return CreateDataPipelineRequestValidationError{
				field:  "Destination",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if m.GetStaging() == nil {
		err := CreateDataPipelineRequestValidationError{
			field:  "Staging",
			reason: "value is required",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if all {
		switch v := interface{}(m.GetStaging()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, CreateDataPipelineRequestValidationError{
					field:  "Staging",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, CreateDataPipelineRequestValidationError{
					field:  "Staging",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetStaging()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return CreateDataPipelineRequestValidationError{
				field:  "Staging",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if _, ok := _CreateDataPipelineRequest_SyncMode_NotInLookup[m.GetSyncMode()]; ok {
		err := CreateDataPipelineRequestValidationError{
			field:  "SyncMode",
			reason: "value must not be in list [0]",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if _, ok := DataPipelineSyncMode_name[int32(m.GetSyncMode())]; !ok {
		err := CreateDataPipelineRequestValidationError{
			field:  "SyncMode",
			reason: "value must be one of the defined enum values",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if utf8.RuneCountInString(m.GetChangefeedSpecification()) > 128 {
		err := CreateDataPipelineRequestValidationError{
			field:  "ChangefeedSpecification",
			reason: "value length must be at most 128 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(errors) > 0 {
		return CreateDataPipelineRequestMultiError(errors)
	}

	return nil
}

// CreateDataPipelineRequestMultiError is an error wrapping multiple validation
// errors returned by CreateDataPipelineRequest.ValidateAll() if the
// designated constraints aren't met.
type CreateDataPipelineRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m CreateDataPipelineRequestMultiError) 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 CreateDataPipelineRequestMultiError) AllErrors() []error { return m }

// CreateDataPipelineRequestValidationError is the validation error returned by
// CreateDataPipelineRequest.Validate if the designated constraints aren't met.
type CreateDataPipelineRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e CreateDataPipelineRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e CreateDataPipelineRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e CreateDataPipelineRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e CreateDataPipelineRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e CreateDataPipelineRequestValidationError) ErrorName() string {
	return "CreateDataPipelineRequestValidationError"
}

// Error satisfies the builtin error interface
func (e CreateDataPipelineRequestValidationError) 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 %sCreateDataPipelineRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = CreateDataPipelineRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = CreateDataPipelineRequestValidationError{}

var _CreateDataPipelineRequest_SyncMode_NotInLookup = map[DataPipelineSyncMode]struct{}{
	0: {},
}

// Validate checks the field values on ListDataPipelinesRequest 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 *ListDataPipelinesRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListDataPipelinesRequest 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
// ListDataPipelinesRequestMultiError, or nil if none found.
func (m *ListDataPipelinesRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *ListDataPipelinesRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if m.GetClusterId() <= 0 {
		err := ListDataPipelinesRequestValidationError{
			field:  "ClusterId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetPage() <= 0 {
		err := ListDataPipelinesRequestValidationError{
			field:  "Page",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if val := m.GetPerPage(); val <= 0 || val > 100 {
		err := ListDataPipelinesRequestValidationError{
			field:  "PerPage",
			reason: "value must be inside range (0, 100]",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if _, ok := DataPipelineStatus_name[int32(m.GetStatus())]; !ok {
		err := ListDataPipelinesRequestValidationError{
			field:  "Status",
			reason: "value must be one of the defined enum values",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(errors) > 0 {
		return ListDataPipelinesRequestMultiError(errors)
	}

	return nil
}

// ListDataPipelinesRequestMultiError is an error wrapping multiple validation
// errors returned by ListDataPipelinesRequest.ValidateAll() if the designated
// constraints aren't met.
type ListDataPipelinesRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListDataPipelinesRequestMultiError) 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 ListDataPipelinesRequestMultiError) AllErrors() []error { return m }

// ListDataPipelinesRequestValidationError is the validation error returned by
// ListDataPipelinesRequest.Validate if the designated constraints aren't met.
type ListDataPipelinesRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListDataPipelinesRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListDataPipelinesRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListDataPipelinesRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListDataPipelinesRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListDataPipelinesRequestValidationError) ErrorName() string {
	return "ListDataPipelinesRequestValidationError"
}

// Error satisfies the builtin error interface
func (e ListDataPipelinesRequestValidationError) 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 %sListDataPipelinesRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListDataPipelinesRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListDataPipelinesRequestValidationError{}

// Validate checks the field values on ListDataPipelinesResponse 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 *ListDataPipelinesResponse) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListDataPipelinesResponse 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
// ListDataPipelinesResponseMultiError, or nil if none found.
func (m *ListDataPipelinesResponse) ValidateAll() error {
	return m.validate(true)
}

func (m *ListDataPipelinesResponse) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	for idx, item := range m.GetItems() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ListDataPipelinesResponseValidationError{
						field:  fmt.Sprintf("Items[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ListDataPipelinesResponseValidationError{
						field:  fmt.Sprintf("Items[%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 ListDataPipelinesResponseValidationError{
					field:  fmt.Sprintf("Items[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for Total

	if len(errors) > 0 {
		return ListDataPipelinesResponseMultiError(errors)
	}

	return nil
}

// ListDataPipelinesResponseMultiError is an error wrapping multiple validation
// errors returned by ListDataPipelinesResponse.ValidateAll() if the
// designated constraints aren't met.
type ListDataPipelinesResponseMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListDataPipelinesResponseMultiError) 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 ListDataPipelinesResponseMultiError) AllErrors() []error { return m }

// ListDataPipelinesResponseValidationError is the validation error returned by
// ListDataPipelinesResponse.Validate if the designated constraints aren't met.
type ListDataPipelinesResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListDataPipelinesResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListDataPipelinesResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListDataPipelinesResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListDataPipelinesResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListDataPipelinesResponseValidationError) ErrorName() string {
	return "ListDataPipelinesResponseValidationError"
}

// Error satisfies the builtin error interface
func (e ListDataPipelinesResponseValidationError) 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 %sListDataPipelinesResponse.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListDataPipelinesResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListDataPipelinesResponseValidationError{}

// Validate checks the field values on EditDataPipelineRequest 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 *EditDataPipelineRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on EditDataPipelineRequest 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
// EditDataPipelineRequestMultiError, or nil if none found.
func (m *EditDataPipelineRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *EditDataPipelineRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if m.GetClusterId() <= 0 {
		err := EditDataPipelineRequestValidationError{
			field:  "ClusterId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetPipelineId() <= 0 {
		err := EditDataPipelineRequestValidationError{
			field:  "PipelineId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if l := utf8.RuneCountInString(m.GetName()); l < 1 || l > 64 {
		err := EditDataPipelineRequestValidationError{
			field:  "Name",
			reason: "value length must be between 1 and 64 runes, inclusive",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetSource() == nil {
		err := EditDataPipelineRequestValidationError{
			field:  "Source",
			reason: "value is required",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if all {
		switch v := interface{}(m.GetSource()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, EditDataPipelineRequestValidationError{
					field:  "Source",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, EditDataPipelineRequestValidationError{
					field:  "Source",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetSource()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return EditDataPipelineRequestValidationError{
				field:  "Source",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if m.GetDestination() == nil {
		err := EditDataPipelineRequestValidationError{
			field:  "Destination",
			reason: "value is required",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if all {
		switch v := interface{}(m.GetDestination()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, EditDataPipelineRequestValidationError{
					field:  "Destination",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, EditDataPipelineRequestValidationError{
					field:  "Destination",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetDestination()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return EditDataPipelineRequestValidationError{
				field:  "Destination",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetStaging()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, EditDataPipelineRequestValidationError{
					field:  "Staging",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, EditDataPipelineRequestValidationError{
					field:  "Staging",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetStaging()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return EditDataPipelineRequestValidationError{
				field:  "Staging",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return EditDataPipelineRequestMultiError(errors)
	}

	return nil
}

// EditDataPipelineRequestMultiError is an error wrapping multiple validation
// errors returned by EditDataPipelineRequest.ValidateAll() if the designated
// constraints aren't met.
type EditDataPipelineRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m EditDataPipelineRequestMultiError) 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 EditDataPipelineRequestMultiError) AllErrors() []error { return m }

// EditDataPipelineRequestValidationError is the validation error returned by
// EditDataPipelineRequest.Validate if the designated constraints aren't met.
type EditDataPipelineRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e EditDataPipelineRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e EditDataPipelineRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e EditDataPipelineRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e EditDataPipelineRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e EditDataPipelineRequestValidationError) ErrorName() string {
	return "EditDataPipelineRequestValidationError"
}

// Error satisfies the builtin error interface
func (e EditDataPipelineRequestValidationError) 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 %sEditDataPipelineRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = EditDataPipelineRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = EditDataPipelineRequestValidationError{}

// Validate checks the field values on DataPipelineEditableStaging 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 *DataPipelineEditableStaging) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DataPipelineEditableStaging 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
// DataPipelineEditableStagingMultiError, or nil if none found.
func (m *DataPipelineEditableStaging) ValidateAll() error {
	return m.validate(true)
}

func (m *DataPipelineEditableStaging) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if utf8.RuneCountInString(m.GetSqsQueueUrl()) > 2048 {
		err := DataPipelineEditableStagingValidationError{
			field:  "SqsQueueUrl",
			reason: "value length must be at most 2048 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if !_DataPipelineEditableStaging_SqsQueueUrl_Pattern.MatchString(m.GetSqsQueueUrl()) {
		err := DataPipelineEditableStagingValidationError{
			field:  "SqsQueueUrl",
			reason: "value does not match regex pattern \"^$|^https://sqs\\\\.[a-z0-9-]+\\\\.amazonaws\\\\.com/[0-9]{12}/[A-Za-z0-9_.-]+$\"",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if utf8.RuneCountInString(m.GetSqsRegion()) > 128 {
		err := DataPipelineEditableStagingValidationError{
			field:  "SqsRegion",
			reason: "value length must be at most 128 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(errors) > 0 {
		return DataPipelineEditableStagingMultiError(errors)
	}

	return nil
}

// DataPipelineEditableStagingMultiError is an error wrapping multiple
// validation errors returned by DataPipelineEditableStaging.ValidateAll() if
// the designated constraints aren't met.
type DataPipelineEditableStagingMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DataPipelineEditableStagingMultiError) 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 DataPipelineEditableStagingMultiError) AllErrors() []error { return m }

// DataPipelineEditableStagingValidationError is the validation error returned
// by DataPipelineEditableStaging.Validate if the designated constraints
// aren't met.
type DataPipelineEditableStagingValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DataPipelineEditableStagingValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DataPipelineEditableStagingValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DataPipelineEditableStagingValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DataPipelineEditableStagingValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DataPipelineEditableStagingValidationError) ErrorName() string {
	return "DataPipelineEditableStagingValidationError"
}

// Error satisfies the builtin error interface
func (e DataPipelineEditableStagingValidationError) 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 %sDataPipelineEditableStaging.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DataPipelineEditableStagingValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DataPipelineEditableStagingValidationError{}

var _DataPipelineEditableStaging_SqsQueueUrl_Pattern = regexp.MustCompile("^$|^https://sqs\\.[a-z0-9-]+\\.amazonaws\\.com/[0-9]{12}/[A-Za-z0-9_.-]+$")

// Validate checks the field values on ScaleDataPipelineRequest 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 *ScaleDataPipelineRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ScaleDataPipelineRequest 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
// ScaleDataPipelineRequestMultiError, or nil if none found.
func (m *ScaleDataPipelineRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *ScaleDataPipelineRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if m.GetClusterId() <= 0 {
		err := ScaleDataPipelineRequestValidationError{
			field:  "ClusterId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetPipelineId() <= 0 {
		err := ScaleDataPipelineRequestValidationError{
			field:  "PipelineId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if l := utf8.RuneCountInString(m.GetChangefeedSpecification()); l < 1 || l > 128 {
		err := ScaleDataPipelineRequestValidationError{
			field:  "ChangefeedSpecification",
			reason: "value length must be between 1 and 128 runes, inclusive",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(errors) > 0 {
		return ScaleDataPipelineRequestMultiError(errors)
	}

	return nil
}

// ScaleDataPipelineRequestMultiError is an error wrapping multiple validation
// errors returned by ScaleDataPipelineRequest.ValidateAll() if the designated
// constraints aren't met.
type ScaleDataPipelineRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ScaleDataPipelineRequestMultiError) 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 ScaleDataPipelineRequestMultiError) AllErrors() []error { return m }

// ScaleDataPipelineRequestValidationError is the validation error returned by
// ScaleDataPipelineRequest.Validate if the designated constraints aren't met.
type ScaleDataPipelineRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ScaleDataPipelineRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ScaleDataPipelineRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ScaleDataPipelineRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ScaleDataPipelineRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ScaleDataPipelineRequestValidationError) ErrorName() string {
	return "ScaleDataPipelineRequestValidationError"
}

// Error satisfies the builtin error interface
func (e ScaleDataPipelineRequestValidationError) 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 %sScaleDataPipelineRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ScaleDataPipelineRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ScaleDataPipelineRequestValidationError{}

// Validate checks the field values on ValidateDataPipelineDestinationRequest
// 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 *ValidateDataPipelineDestinationRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// ValidateDataPipelineDestinationRequest 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
// ValidateDataPipelineDestinationRequestMultiError, or nil if none found.
func (m *ValidateDataPipelineDestinationRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *ValidateDataPipelineDestinationRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if m.GetClusterId() <= 0 {
		err := ValidateDataPipelineDestinationRequestValidationError{
			field:  "ClusterId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetDestination() == nil {
		err := ValidateDataPipelineDestinationRequestValidationError{
			field:  "Destination",
			reason: "value is required",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if all {
		switch v := interface{}(m.GetDestination()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ValidateDataPipelineDestinationRequestValidationError{
					field:  "Destination",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ValidateDataPipelineDestinationRequestValidationError{
					field:  "Destination",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetDestination()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ValidateDataPipelineDestinationRequestValidationError{
				field:  "Destination",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if _, ok := _ValidateDataPipelineDestinationRequest_SyncMode_NotInLookup[m.GetSyncMode()]; ok {
		err := ValidateDataPipelineDestinationRequestValidationError{
			field:  "SyncMode",
			reason: "value must not be in list [0]",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if _, ok := DataPipelineSyncMode_name[int32(m.GetSyncMode())]; !ok {
		err := ValidateDataPipelineDestinationRequestValidationError{
			field:  "SyncMode",
			reason: "value must be one of the defined enum values",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(errors) > 0 {
		return ValidateDataPipelineDestinationRequestMultiError(errors)
	}

	return nil
}

// ValidateDataPipelineDestinationRequestMultiError is an error wrapping
// multiple validation errors returned by
// ValidateDataPipelineDestinationRequest.ValidateAll() if the designated
// constraints aren't met.
type ValidateDataPipelineDestinationRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ValidateDataPipelineDestinationRequestMultiError) 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 ValidateDataPipelineDestinationRequestMultiError) AllErrors() []error { return m }

// ValidateDataPipelineDestinationRequestValidationError is the validation
// error returned by ValidateDataPipelineDestinationRequest.Validate if the
// designated constraints aren't met.
type ValidateDataPipelineDestinationRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ValidateDataPipelineDestinationRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ValidateDataPipelineDestinationRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ValidateDataPipelineDestinationRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ValidateDataPipelineDestinationRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ValidateDataPipelineDestinationRequestValidationError) ErrorName() string {
	return "ValidateDataPipelineDestinationRequestValidationError"
}

// Error satisfies the builtin error interface
func (e ValidateDataPipelineDestinationRequestValidationError) 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 %sValidateDataPipelineDestinationRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ValidateDataPipelineDestinationRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ValidateDataPipelineDestinationRequestValidationError{}

var _ValidateDataPipelineDestinationRequest_SyncMode_NotInLookup = map[DataPipelineSyncMode]struct{}{
	0: {},
}

// Validate checks the field values on
// ValidateDataPipelineSourceConnectionRequest 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 *ValidateDataPipelineSourceConnectionRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// ValidateDataPipelineSourceConnectionRequest 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
// ValidateDataPipelineSourceConnectionRequestMultiError, or nil if none found.
func (m *ValidateDataPipelineSourceConnectionRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *ValidateDataPipelineSourceConnectionRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if m.GetClusterId() <= 0 {
		err := ValidateDataPipelineSourceConnectionRequestValidationError{
			field:  "ClusterId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if l := utf8.RuneCountInString(m.GetUsername()); l < 1 || l > 256 {
		err := ValidateDataPipelineSourceConnectionRequestValidationError{
			field:  "Username",
			reason: "value length must be between 1 and 256 runes, inclusive",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if l := utf8.RuneCountInString(m.GetPassword()); l < 1 || l > 4096 {
		err := ValidateDataPipelineSourceConnectionRequestValidationError{
			field:  "Password",
			reason: "value length must be between 1 and 4096 runes, inclusive",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(errors) > 0 {
		return ValidateDataPipelineSourceConnectionRequestMultiError(errors)
	}

	return nil
}

// ValidateDataPipelineSourceConnectionRequestMultiError is an error wrapping
// multiple validation errors returned by
// ValidateDataPipelineSourceConnectionRequest.ValidateAll() if the designated
// constraints aren't met.
type ValidateDataPipelineSourceConnectionRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ValidateDataPipelineSourceConnectionRequestMultiError) 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 ValidateDataPipelineSourceConnectionRequestMultiError) AllErrors() []error { return m }

// ValidateDataPipelineSourceConnectionRequestValidationError is the validation
// error returned by ValidateDataPipelineSourceConnectionRequest.Validate if
// the designated constraints aren't met.
type ValidateDataPipelineSourceConnectionRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ValidateDataPipelineSourceConnectionRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ValidateDataPipelineSourceConnectionRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ValidateDataPipelineSourceConnectionRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ValidateDataPipelineSourceConnectionRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ValidateDataPipelineSourceConnectionRequestValidationError) ErrorName() string {
	return "ValidateDataPipelineSourceConnectionRequestValidationError"
}

// Error satisfies the builtin error interface
func (e ValidateDataPipelineSourceConnectionRequestValidationError) 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 %sValidateDataPipelineSourceConnectionRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ValidateDataPipelineSourceConnectionRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ValidateDataPipelineSourceConnectionRequestValidationError{}

// Validate checks the field values on ValidateDataPipelineStagingRequest 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 *ValidateDataPipelineStagingRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ValidateDataPipelineStagingRequest
// 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
// ValidateDataPipelineStagingRequestMultiError, or nil if none found.
func (m *ValidateDataPipelineStagingRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *ValidateDataPipelineStagingRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if l := utf8.RuneCountInString(m.GetLakeOrgId()); l < 1 || l > 64 {
		err := ValidateDataPipelineStagingRequestValidationError{
			field:  "LakeOrgId",
			reason: "value length must be between 1 and 64 runes, inclusive",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if !_ValidateDataPipelineStagingRequest_LakeOrgId_Pattern.MatchString(m.GetLakeOrgId()) {
		err := ValidateDataPipelineStagingRequestValidationError{
			field:  "LakeOrgId",
			reason: "value does not match regex pattern \"^[0-9]+$\"",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetClusterId() <= 0 {
		err := ValidateDataPipelineStagingRequestValidationError{
			field:  "ClusterId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetStaging() == nil {
		err := ValidateDataPipelineStagingRequestValidationError{
			field:  "Staging",
			reason: "value is required",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if all {
		switch v := interface{}(m.GetStaging()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ValidateDataPipelineStagingRequestValidationError{
					field:  "Staging",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ValidateDataPipelineStagingRequestValidationError{
					field:  "Staging",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetStaging()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ValidateDataPipelineStagingRequestValidationError{
				field:  "Staging",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return ValidateDataPipelineStagingRequestMultiError(errors)
	}

	return nil
}

// ValidateDataPipelineStagingRequestMultiError is an error wrapping multiple
// validation errors returned by
// ValidateDataPipelineStagingRequest.ValidateAll() if the designated
// constraints aren't met.
type ValidateDataPipelineStagingRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ValidateDataPipelineStagingRequestMultiError) 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 ValidateDataPipelineStagingRequestMultiError) AllErrors() []error { return m }

// ValidateDataPipelineStagingRequestValidationError is the validation error
// returned by ValidateDataPipelineStagingRequest.Validate if the designated
// constraints aren't met.
type ValidateDataPipelineStagingRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ValidateDataPipelineStagingRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ValidateDataPipelineStagingRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ValidateDataPipelineStagingRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ValidateDataPipelineStagingRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ValidateDataPipelineStagingRequestValidationError) ErrorName() string {
	return "ValidateDataPipelineStagingRequestValidationError"
}

// Error satisfies the builtin error interface
func (e ValidateDataPipelineStagingRequestValidationError) 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 %sValidateDataPipelineStagingRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ValidateDataPipelineStagingRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ValidateDataPipelineStagingRequestValidationError{}

var _ValidateDataPipelineStagingRequest_LakeOrgId_Pattern = regexp.MustCompile("^[0-9]+$")

// Validate checks the field values on SinkAdvertisedListener_Record 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 *SinkAdvertisedListener_Record) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on SinkAdvertisedListener_Record 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
// SinkAdvertisedListener_RecordMultiError, or nil if none found.
func (m *SinkAdvertisedListener_Record) ValidateAll() error {
	return m.validate(true)
}

func (m *SinkAdvertisedListener_Record) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Zone

	// no validation rules for SubdomainName

	if len(errors) > 0 {
		return SinkAdvertisedListener_RecordMultiError(errors)
	}

	return nil
}

// SinkAdvertisedListener_RecordMultiError is an error wrapping multiple
// validation errors returned by SinkAdvertisedListener_Record.ValidateAll()
// if the designated constraints aren't met.
type SinkAdvertisedListener_RecordMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m SinkAdvertisedListener_RecordMultiError) 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 SinkAdvertisedListener_RecordMultiError) AllErrors() []error { return m }

// SinkAdvertisedListener_RecordValidationError is the validation error
// returned by SinkAdvertisedListener_Record.Validate if the designated
// constraints aren't met.
type SinkAdvertisedListener_RecordValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e SinkAdvertisedListener_RecordValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e SinkAdvertisedListener_RecordValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e SinkAdvertisedListener_RecordValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e SinkAdvertisedListener_RecordValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e SinkAdvertisedListener_RecordValidationError) ErrorName() string {
	return "SinkAdvertisedListener_RecordValidationError"
}

// Error satisfies the builtin error interface
func (e SinkAdvertisedListener_RecordValidationError) 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 %sSinkAdvertisedListener_Record.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = SinkAdvertisedListener_RecordValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = SinkAdvertisedListener_RecordValidationError{}
