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

package dataflow

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

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

	agent "github.com/tidbcloud/dataflow-service/idl/pbgen/proto/agent"
)

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

	_ = agent.ImportPrecheckStatusType_Enum(0)
)

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

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

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

	var errors []error

	// no validation rules for Separator

	// no validation rules for Delimiter

	// no validation rules for Header

	// no validation rules for BackslashEscape

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = CustomCSVFormatValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for SourceUrl

	// no validation rules for Region

	// no validation rules for DataFormat

	// no validation rules for DataSourceType

	// no validation rules for TargetUsername

	// no validation rules for TargetPassword

	// no validation rules for Filter

	// no validation rules for OrgId

	// no validation rules for ProjectId

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

	// no validation rules for AwsRoleArn

	// no validation rules for ObjectNamePattern

	// no validation rules for TargetTablePattern

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

	if utf8.RuneCountInString(m.GetName()) > 128 {
		err := ImportCreateReqValidationError{
			field:  "Name",
			reason: "value length must be at most 128 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	// no validation rules for DupHandlingForSql

	// no validation rules for AwsAccessKeyId

	// no validation rules for AwsSecretAccessKey

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

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

	}

	// no validation rules for NeedDropTables

	// no validation rules for AzblobSasToken

	if _, ok := _ImportCreateReq_ConnMethod_InLookup[m.GetConnMethod()]; !ok {
		err := ImportCreateReqValidationError{
			field:  "ConnMethod",
			reason: "value must be in list [ direct vpc-peering private-link]",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	// no validation rules for SkipChecksum

	if m.EndpointServiceName != nil {

		if utf8.RuneCountInString(m.GetEndpointServiceName()) > 512 {
			err := ImportCreateReqValidationError{
				field:  "EndpointServiceName",
				reason: "value length must be at most 512 runes",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}

		if !_ImportCreateReq_EndpointServiceName_Pattern.MatchString(m.GetEndpointServiceName()) {
			err := ImportCreateReqValidationError{
				field:  "EndpointServiceName",
				reason: "value does not match regex pattern \"^(com.amazonaws.vpce|/subscriptions/).*$\"",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportCreateReqValidationError{}

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

var _ImportCreateReq_ConnMethod_InLookup = map[string]struct{}{
	"":             {},
	"direct":       {},
	"vpc-peering":  {},
	"private-link": {},
}

var _ImportCreateReq_EndpointServiceName_Pattern = regexp.MustCompile("^(com.amazonaws.vpce|/subscriptions/).*$")

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

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

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

	var errors []error

	if utf8.RuneCountInString(m.GetFileName()) < 1 {
		err := LocalImportCfgValidationError{
			field:  "FileName",
			reason: "value length must be at least 1 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

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

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

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

	}

	// no validation rules for OriginalFileName

	// no validation rules for TotalSize

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = LocalImportCfgValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Name

	// no validation rules for Size

	// no validation rules for CompletedPercent

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = CurrentTableValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for TotalSize

	// no validation rules for TotalFiles

	// no validation rules for SourceUrl

	// no validation rules for CompletedTables

	// no validation rules for PendingTables

	if all {
		switch v := interface{}(m.GetCreatedAt()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ImportGetRespValidationError{
					field:  "CreatedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ImportGetRespValidationError{
					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 ImportGetRespValidationError{
				field:  "CreatedAt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for Status

	// no validation rules for CompletedPercent

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

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

	}

	// no validation rules for DataFormat

	// no validation rules for DataSourceType

	// no validation rules for Message

	// no validation rules for ElapsedTimeSeconds

	// no validation rules for Id

	// no validation rules for ProcessedSourceDataSize

	// no validation rules for TotalTablesCount

	// no validation rules for PostImportCompletedPercent

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

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

	}

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

	// no validation rules for Name

	// no validation rules for CreatedBy

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportGetRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TableName

	// no validation rules for Result

	// no validation rules for Message

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportTableCompletionInfoValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for Id

	// no validation rules for OrgId

	// no validation rules for ProjectId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ClusterImportIdValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Type

	// no validation rules for AwsExternalId

	// no validation rules for AwsAccountId

	// no validation rules for GcpAccountId

	// no validation rules for ImportRoleArn

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = DataIngestionProfileValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

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

	}

	// no validation rules for SourceUri

	// no validation rules for DataFormat

	// no validation rules for DataSourceType

	// no validation rules for AwsRoleArn

	// no validation rules for AwsAccessKeyId

	// no validation rules for AwsSecretAccessKey

	// no validation rules for AzblobSasToken

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsSearchImportFilesReqValidationError{}

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

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

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

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

	var errors []error

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

	// no validation rules for CustomFile

	// no validation rules for MatchedUri

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportTargetTableInfoValidationError{}

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

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

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

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

	var errors []error

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

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

	}

	// no validation rules for WarningMessage

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsSearchImportFilesRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

	// no validation rules for SourceUri

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

	// no validation rules for FirstN

	// no validation rules for AwsRoleArn

	// no validation rules for AwsAccessKeyId

	// no validation rules for AwsSecretAccessKey

	// no validation rules for AzblobSasToken

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsPreviewCsvFileReqValidationError{}

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

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

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

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

	var errors []error

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

	// no validation rules for WarningMessage

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsPreviewCsvFileRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsGetClusterTablesReqValidationError{}

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

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

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

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

	var errors []error

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsGetClusterTablesRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for Db

	// no validation rules for Table

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsGetTableColumnsReqValidationError{}

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

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

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

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

	var errors []error

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsGetTableColumnsRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ColumnName

	// no validation rules for ColumnType

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ColumnInfoValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsListDataTypesRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for FileName

	// no validation rules for DataFormat

	// no validation rules for Region

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

	// no validation rules for N

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsPreviewLocalReqValidationError{}

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

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

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

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

	var errors []error

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsPreviewLocalRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for FileName

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

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsGenerateUploadUrlReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Url

	// no validation rules for FileName

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsGenerateUploadUrlRespValidationError{}

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

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

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

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

	var errors []error

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

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsPreviewReqValidationError{}

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

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

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

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

	var errors []error

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

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

	}

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsPreviewRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for Page

	// no validation rules for PageSize

	// no validation rules for CreatedByDm

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ListImportReqValidationError{}

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

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

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

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

	var errors []error

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

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

	}

	// no validation rules for Total

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ListImportRespValidationError{}

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

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

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

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

	var errors []error

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

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsGetSchemasMetaReqValidationError{}

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

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

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

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

	var errors []error

	{
		sorted_keys := make([]string, len(m.GetSchemasMeta()))
		i := 0
		for key := range m.GetSchemasMeta() {
			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.GetSchemasMeta()[key]
			_ = val

			// no validation rules for SchemasMeta[key]

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

		}
	}

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsGetSchemasMetaRespValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsApplyTableFiltersReqValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsApplyTableFiltersRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for S3Url

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = GetS3BucketRegionReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Region

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = GetS3BucketRegionRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportsValidateTargetTableEmptyReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

	if all {
		switch v := interface{}(m.GetSource()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ImportPrecheckReqValidationError{
					field:  "Source",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ImportPrecheckReqValidationError{
					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 ImportPrecheckReqValidationError{
				field:  "Source",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportPrecheckReqValidationError{}

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

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

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

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

	var errors []error

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

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

	}

	// no validation rules for ErrorMessage

	// no validation rules for TotalDataFilesCount

	// no validation rules for TotalTablesCount

	// no validation rules for IsTruncated

	// no validation rules for Status

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportPrecheckRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for SourceUrl

	// no validation rules for Region

	// no validation rules for DataSourceType

	// no validation rules for TargetUsername

	// no validation rules for TargetPassword

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for AwsRoleArn

	// no validation rules for DbTblFilter

	// no validation rules for ObjNamePattern

	// no validation rules for TargetTblName

	// no validation rules for DataFormat

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

	// no validation rules for AwsAccessKeyId

	// no validation rules for AwsSecretAccessKey

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

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

	}

	// no validation rules for AzblobSasToken

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ImportValidateReqValidationError{}

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

// 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 OrgId

	// no validation rules for ProjectId

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

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

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

	var errors []error

	// no validation rules for OrgId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = DeleteAllManualBackupsReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for BackupType

	// no validation rules for OrgId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = DeleteAllBackupsReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ProjectId

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ListRestoreOfProjectReqValidationError{}

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

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

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

func (m *ListRestoreOfProjectResp) 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, ListRestoreOfProjectRespValidationError{
						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, ListRestoreOfProjectRespValidationError{
						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 ListRestoreOfProjectRespValidationError{
					field:  fmt.Sprintf("Items[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for Total

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ListRestoreOfProjectRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Id

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

	// no validation rules for BackupId

	// no validation rules for ClusterId

	// no validation rules for Status

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ListRestoreRespItemValidationError{}

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

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

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

func (m *ClusterInfoOfRestore) 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 Status

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ClusterInfoOfRestoreValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for RestoreId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = GetRestoreReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Id

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

	// no validation rules for BackupId

	// no validation rules for ClusterId

	// no validation rules for Status

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = GetRestoreRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for BackupId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = GetBackupReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for BackupId

	// no validation rules for TenantId

	// no validation rules for ClusterId

	// no validation rules for ClusterVersion

	// no validation rules for DataSizeBytes

	// no validation rules for CloudProvider

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = GetBackupRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for BucketId

	// no validation rules for BucketName

	// no validation rules for Prefix

	// no validation rules for Region

	// no validation rules for AwsKmsArn

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = BackupStorageInfoValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for BucketId

	// no validation rules for CloudProviderIdentity

	// no validation rules for CloudProvider

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = GrantAccessBackupBucketReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for BucketId

	// no validation rules for CloudProviderIdentity

	// no validation rules for CloudProvider

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = RevokeAccessBackupBucketReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = CreateFinalBackupReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for BackupId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = CreateFinalBackupRespValidationError{}

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

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

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

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

	var errors []error

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e QueryServerlessBackupSettingReqValidationError) 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 %sQueryServerlessBackupSettingReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = QueryServerlessBackupSettingReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = QueryServerlessBackupSettingReqValidationError{}

// Validate checks the field values on QueryServerlessBackupSettingResp 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 *QueryServerlessBackupSettingResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on QueryServerlessBackupSettingResp 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
// QueryServerlessBackupSettingRespMultiError, or nil if none found.
func (m *QueryServerlessBackupSettingResp) ValidateAll() error {
	return m.validate(true)
}

func (m *QueryServerlessBackupSettingResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Id

	if all {
		switch v := interface{}(m.GetAutoBackupSetting()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, QueryServerlessBackupSettingRespValidationError{
					field:  "AutoBackupSetting",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, QueryServerlessBackupSettingRespValidationError{
					field:  "AutoBackupSetting",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetAutoBackupSetting()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return QueryServerlessBackupSettingRespValidationError{
				field:  "AutoBackupSetting",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return QueryServerlessBackupSettingRespMultiError(errors)
	}

	return nil
}

// QueryServerlessBackupSettingRespMultiError is an error wrapping multiple
// validation errors returned by
// QueryServerlessBackupSettingResp.ValidateAll() if the designated
// constraints aren't met.
type QueryServerlessBackupSettingRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m QueryServerlessBackupSettingRespMultiError) 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 QueryServerlessBackupSettingRespMultiError) AllErrors() []error { return m }

// QueryServerlessBackupSettingRespValidationError is the validation error
// returned by QueryServerlessBackupSettingResp.Validate if the designated
// constraints aren't met.
type QueryServerlessBackupSettingRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e QueryServerlessBackupSettingRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e QueryServerlessBackupSettingRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e QueryServerlessBackupSettingRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e QueryServerlessBackupSettingRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e QueryServerlessBackupSettingRespValidationError) ErrorName() string {
	return "QueryServerlessBackupSettingRespValidationError"
}

// Error satisfies the builtin error interface
func (e QueryServerlessBackupSettingRespValidationError) 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 %sQueryServerlessBackupSettingResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = QueryServerlessBackupSettingRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = QueryServerlessBackupSettingRespValidationError{}

// Validate checks the field values on ServerlessAutoBackupSetting 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 *ServerlessAutoBackupSetting) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ServerlessAutoBackupSetting 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
// ServerlessAutoBackupSettingMultiError, or nil if none found.
func (m *ServerlessAutoBackupSetting) ValidateAll() error {
	return m.validate(true)
}

func (m *ServerlessAutoBackupSetting) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if m.GetEnabled() != true {
		err := ServerlessAutoBackupSettingValidationError{
			field:  "Enabled",
			reason: "value must equal true",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if utf8.RuneCountInString(m.GetBackupTime()) < 1 {
		err := ServerlessAutoBackupSettingValidationError{
			field:  "BackupTime",
			reason: "value length must be at least 1 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetRetentionPeriod() < 7 {
		err := ServerlessAutoBackupSettingValidationError{
			field:  "RetentionPeriod",
			reason: "value must be greater than or equal to 7",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(errors) > 0 {
		return ServerlessAutoBackupSettingMultiError(errors)
	}

	return nil
}

// ServerlessAutoBackupSettingMultiError is an error wrapping multiple
// validation errors returned by ServerlessAutoBackupSetting.ValidateAll() if
// the designated constraints aren't met.
type ServerlessAutoBackupSettingMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ServerlessAutoBackupSettingMultiError) 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 ServerlessAutoBackupSettingMultiError) AllErrors() []error { return m }

// ServerlessAutoBackupSettingValidationError is the validation error returned
// by ServerlessAutoBackupSetting.Validate if the designated constraints
// aren't met.
type ServerlessAutoBackupSettingValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ServerlessAutoBackupSettingValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ServerlessAutoBackupSettingValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ServerlessAutoBackupSettingValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ServerlessAutoBackupSettingValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ServerlessAutoBackupSettingValidationError) ErrorName() string {
	return "ServerlessAutoBackupSettingValidationError"
}

// Error satisfies the builtin error interface
func (e ServerlessAutoBackupSettingValidationError) 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 %sServerlessAutoBackupSetting.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ServerlessAutoBackupSettingValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ServerlessAutoBackupSettingValidationError{}

// Validate checks the field values on ModifyServerlessBackupSettingReq 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 *ModifyServerlessBackupSettingReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ModifyServerlessBackupSettingReq 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
// ModifyServerlessBackupSettingReqMultiError, or nil if none found.
func (m *ModifyServerlessBackupSettingReq) ValidateAll() error {
	return m.validate(true)
}

func (m *ModifyServerlessBackupSettingReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if m.GetOrgId() <= 0 {
		err := ModifyServerlessBackupSettingReqValidationError{
			field:  "OrgId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetProjectId() <= 0 {
		err := ModifyServerlessBackupSettingReqValidationError{
			field:  "ProjectId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetClusterId() <= 0 {
		err := ModifyServerlessBackupSettingReqValidationError{
			field:  "ClusterId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if all {
		switch v := interface{}(m.GetAutoBackupSetting()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ModifyServerlessBackupSettingReqValidationError{
					field:  "AutoBackupSetting",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ModifyServerlessBackupSettingReqValidationError{
					field:  "AutoBackupSetting",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetAutoBackupSetting()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ModifyServerlessBackupSettingReqValidationError{
				field:  "AutoBackupSetting",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return ModifyServerlessBackupSettingReqMultiError(errors)
	}

	return nil
}

// ModifyServerlessBackupSettingReqMultiError is an error wrapping multiple
// validation errors returned by
// ModifyServerlessBackupSettingReq.ValidateAll() if the designated
// constraints aren't met.
type ModifyServerlessBackupSettingReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ModifyServerlessBackupSettingReqMultiError) 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 ModifyServerlessBackupSettingReqMultiError) AllErrors() []error { return m }

// ModifyServerlessBackupSettingReqValidationError is the validation error
// returned by ModifyServerlessBackupSettingReq.Validate if the designated
// constraints aren't met.
type ModifyServerlessBackupSettingReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ModifyServerlessBackupSettingReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ModifyServerlessBackupSettingReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ModifyServerlessBackupSettingReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ModifyServerlessBackupSettingReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ModifyServerlessBackupSettingReqValidationError) ErrorName() string {
	return "ModifyServerlessBackupSettingReqValidationError"
}

// Error satisfies the builtin error interface
func (e ModifyServerlessBackupSettingReqValidationError) 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 %sModifyServerlessBackupSettingReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ModifyServerlessBackupSettingReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ModifyServerlessBackupSettingReqValidationError{}

// Validate checks the field values on ModifyServerlessBackupSettingResp 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 *ModifyServerlessBackupSettingResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ModifyServerlessBackupSettingResp
// 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
// ModifyServerlessBackupSettingRespMultiError, or nil if none found.
func (m *ModifyServerlessBackupSettingResp) ValidateAll() error {
	return m.validate(true)
}

func (m *ModifyServerlessBackupSettingResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return ModifyServerlessBackupSettingRespMultiError(errors)
	}

	return nil
}

// ModifyServerlessBackupSettingRespMultiError is an error wrapping multiple
// validation errors returned by
// ModifyServerlessBackupSettingResp.ValidateAll() if the designated
// constraints aren't met.
type ModifyServerlessBackupSettingRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ModifyServerlessBackupSettingRespMultiError) 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 ModifyServerlessBackupSettingRespMultiError) AllErrors() []error { return m }

// ModifyServerlessBackupSettingRespValidationError is the validation error
// returned by ModifyServerlessBackupSettingResp.Validate if the designated
// constraints aren't met.
type ModifyServerlessBackupSettingRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ModifyServerlessBackupSettingRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ModifyServerlessBackupSettingRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ModifyServerlessBackupSettingRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ModifyServerlessBackupSettingRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ModifyServerlessBackupSettingRespValidationError) ErrorName() string {
	return "ModifyServerlessBackupSettingRespValidationError"
}

// Error satisfies the builtin error interface
func (e ModifyServerlessBackupSettingRespValidationError) 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 %sModifyServerlessBackupSettingResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ModifyServerlessBackupSettingRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ModifyServerlessBackupSettingRespValidationError{}

// Validate checks the field values on BackupInternalRestoreReq 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 *BackupInternalRestoreReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BackupInternalRestoreReq 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
// BackupInternalRestoreReqMultiError, or nil if none found.
func (m *BackupInternalRestoreReq) ValidateAll() error {
	return m.validate(true)
}

func (m *BackupInternalRestoreReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Id

	if m.GetOrgId() <= 0 {
		err := BackupInternalRestoreReqValidationError{
			field:  "OrgId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if _, ok := RestoreMode_name[int32(m.GetRestoreMode())]; !ok {
		err := BackupInternalRestoreReqValidationError{
			field:  "RestoreMode",
			reason: "value must be one of the defined enum values",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	// no validation rules for TargetClusterId

	// no validation rules for TargetProjectId

	// no validation rules for BrVersion

	// no validation rules for BrImageTag

	// no validation rules for BrCustomOptions

	// no validation rules for BackupRegion

	if len(errors) > 0 {
		return BackupInternalRestoreReqMultiError(errors)
	}

	return nil
}

// BackupInternalRestoreReqMultiError is an error wrapping multiple validation
// errors returned by BackupInternalRestoreReq.ValidateAll() if the designated
// constraints aren't met.
type BackupInternalRestoreReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BackupInternalRestoreReqMultiError) 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 BackupInternalRestoreReqMultiError) AllErrors() []error { return m }

// BackupInternalRestoreReqValidationError is the validation error returned by
// BackupInternalRestoreReq.Validate if the designated constraints aren't met.
type BackupInternalRestoreReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BackupInternalRestoreReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BackupInternalRestoreReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BackupInternalRestoreReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BackupInternalRestoreReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BackupInternalRestoreReqValidationError) ErrorName() string {
	return "BackupInternalRestoreReqValidationError"
}

// Error satisfies the builtin error interface
func (e BackupInternalRestoreReqValidationError) 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 %sBackupInternalRestoreReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BackupInternalRestoreReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BackupInternalRestoreReqValidationError{}

// Validate checks the field values on ListServerlessBackupSettingsReq 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 *ListServerlessBackupSettingsReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListServerlessBackupSettingsReq 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
// ListServerlessBackupSettingsReqMultiError, or nil if none found.
func (m *ListServerlessBackupSettingsReq) ValidateAll() error {
	return m.validate(true)
}

func (m *ListServerlessBackupSettingsReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return ListServerlessBackupSettingsReqMultiError(errors)
	}

	return nil
}

// ListServerlessBackupSettingsReqMultiError is an error wrapping multiple
// validation errors returned by ListServerlessBackupSettingsReq.ValidateAll()
// if the designated constraints aren't met.
type ListServerlessBackupSettingsReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListServerlessBackupSettingsReqMultiError) 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 ListServerlessBackupSettingsReqMultiError) AllErrors() []error { return m }

// ListServerlessBackupSettingsReqValidationError is the validation error
// returned by ListServerlessBackupSettingsReq.Validate if the designated
// constraints aren't met.
type ListServerlessBackupSettingsReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListServerlessBackupSettingsReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListServerlessBackupSettingsReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListServerlessBackupSettingsReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListServerlessBackupSettingsReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListServerlessBackupSettingsReqValidationError) ErrorName() string {
	return "ListServerlessBackupSettingsReqValidationError"
}

// Error satisfies the builtin error interface
func (e ListServerlessBackupSettingsReqValidationError) 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 %sListServerlessBackupSettingsReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListServerlessBackupSettingsReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListServerlessBackupSettingsReqValidationError{}

// Validate checks the field values on ListServerlessBackupSettingsResp 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 *ListServerlessBackupSettingsResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListServerlessBackupSettingsResp 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
// ListServerlessBackupSettingsRespMultiError, or nil if none found.
func (m *ListServerlessBackupSettingsResp) ValidateAll() error {
	return m.validate(true)
}

func (m *ListServerlessBackupSettingsResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	for idx, item := range m.GetSettings() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ListServerlessBackupSettingsRespValidationError{
						field:  fmt.Sprintf("Settings[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ListServerlessBackupSettingsRespValidationError{
						field:  fmt.Sprintf("Settings[%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 ListServerlessBackupSettingsRespValidationError{
					field:  fmt.Sprintf("Settings[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return ListServerlessBackupSettingsRespMultiError(errors)
	}

	return nil
}

// ListServerlessBackupSettingsRespMultiError is an error wrapping multiple
// validation errors returned by
// ListServerlessBackupSettingsResp.ValidateAll() if the designated
// constraints aren't met.
type ListServerlessBackupSettingsRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListServerlessBackupSettingsRespMultiError) 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 ListServerlessBackupSettingsRespMultiError) AllErrors() []error { return m }

// ListServerlessBackupSettingsRespValidationError is the validation error
// returned by ListServerlessBackupSettingsResp.Validate if the designated
// constraints aren't met.
type ListServerlessBackupSettingsRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListServerlessBackupSettingsRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListServerlessBackupSettingsRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListServerlessBackupSettingsRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListServerlessBackupSettingsRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListServerlessBackupSettingsRespValidationError) ErrorName() string {
	return "ListServerlessBackupSettingsRespValidationError"
}

// Error satisfies the builtin error interface
func (e ListServerlessBackupSettingsRespValidationError) 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 %sListServerlessBackupSettingsResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListServerlessBackupSettingsRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListServerlessBackupSettingsRespValidationError{}

// Validate checks the field values on ServerlessBackupSetting 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 *ServerlessBackupSetting) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ServerlessBackupSetting 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
// ServerlessBackupSettingMultiError, or nil if none found.
func (m *ServerlessBackupSetting) ValidateAll() error {
	return m.validate(true)
}

func (m *ServerlessBackupSetting) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for BackupCron

	// no validation rules for Retention

	// no validation rules for ClusterId

	if len(errors) > 0 {
		return ServerlessBackupSettingMultiError(errors)
	}

	return nil
}

// ServerlessBackupSettingMultiError is an error wrapping multiple validation
// errors returned by ServerlessBackupSetting.ValidateAll() if the designated
// constraints aren't met.
type ServerlessBackupSettingMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ServerlessBackupSettingMultiError) 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 ServerlessBackupSettingMultiError) AllErrors() []error { return m }

// ServerlessBackupSettingValidationError is the validation error returned by
// ServerlessBackupSetting.Validate if the designated constraints aren't met.
type ServerlessBackupSettingValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ServerlessBackupSettingValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ServerlessBackupSettingValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ServerlessBackupSettingValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ServerlessBackupSettingValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ServerlessBackupSettingValidationError) ErrorName() string {
	return "ServerlessBackupSettingValidationError"
}

// Error satisfies the builtin error interface
func (e ServerlessBackupSettingValidationError) 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 %sServerlessBackupSetting.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ServerlessBackupSettingValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ServerlessBackupSettingValidationError{}

// Validate checks the field values on ListServerlessBackupsReq 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 *ListServerlessBackupsReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListServerlessBackupsReq 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
// ListServerlessBackupsReqMultiError, or nil if none found.
func (m *ListServerlessBackupsReq) ValidateAll() error {
	return m.validate(true)
}

func (m *ListServerlessBackupsReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	if all {
		switch v := interface{}(m.GetBackupTimeLt()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ListServerlessBackupsReqValidationError{
					field:  "BackupTimeLt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ListServerlessBackupsReqValidationError{
					field:  "BackupTimeLt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetBackupTimeLt()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ListServerlessBackupsReqValidationError{
				field:  "BackupTimeLt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return ListServerlessBackupsReqMultiError(errors)
	}

	return nil
}

// ListServerlessBackupsReqMultiError is an error wrapping multiple validation
// errors returned by ListServerlessBackupsReq.ValidateAll() if the designated
// constraints aren't met.
type ListServerlessBackupsReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListServerlessBackupsReqMultiError) 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 ListServerlessBackupsReqMultiError) AllErrors() []error { return m }

// ListServerlessBackupsReqValidationError is the validation error returned by
// ListServerlessBackupsReq.Validate if the designated constraints aren't met.
type ListServerlessBackupsReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListServerlessBackupsReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListServerlessBackupsReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListServerlessBackupsReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListServerlessBackupsReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListServerlessBackupsReqValidationError) ErrorName() string {
	return "ListServerlessBackupsReqValidationError"
}

// Error satisfies the builtin error interface
func (e ListServerlessBackupsReqValidationError) 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 %sListServerlessBackupsReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListServerlessBackupsReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListServerlessBackupsReqValidationError{}

// Validate checks the field values on ListServerlessBackupsResp 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 *ListServerlessBackupsResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListServerlessBackupsResp 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
// ListServerlessBackupsRespMultiError, or nil if none found.
func (m *ListServerlessBackupsResp) ValidateAll() error {
	return m.validate(true)
}

func (m *ListServerlessBackupsResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	for idx, item := range m.GetBackups() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ListServerlessBackupsRespValidationError{
						field:  fmt.Sprintf("Backups[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ListServerlessBackupsRespValidationError{
						field:  fmt.Sprintf("Backups[%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 ListServerlessBackupsRespValidationError{
					field:  fmt.Sprintf("Backups[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return ListServerlessBackupsRespMultiError(errors)
	}

	return nil
}

// ListServerlessBackupsRespMultiError is an error wrapping multiple validation
// errors returned by ListServerlessBackupsResp.ValidateAll() if the
// designated constraints aren't met.
type ListServerlessBackupsRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListServerlessBackupsRespMultiError) 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 ListServerlessBackupsRespMultiError) AllErrors() []error { return m }

// ListServerlessBackupsRespValidationError is the validation error returned by
// ListServerlessBackupsResp.Validate if the designated constraints aren't met.
type ListServerlessBackupsRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListServerlessBackupsRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListServerlessBackupsRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListServerlessBackupsRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListServerlessBackupsRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListServerlessBackupsRespValidationError) ErrorName() string {
	return "ListServerlessBackupsRespValidationError"
}

// Error satisfies the builtin error interface
func (e ListServerlessBackupsRespValidationError) 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 %sListServerlessBackupsResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListServerlessBackupsRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListServerlessBackupsRespValidationError{}

// Validate checks the field values on GetServerlessBackupReq 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 *GetServerlessBackupReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetServerlessBackupReq 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
// GetServerlessBackupReqMultiError, or nil if none found.
func (m *GetServerlessBackupReq) ValidateAll() error {
	return m.validate(true)
}

func (m *GetServerlessBackupReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for BackupId

	if len(errors) > 0 {
		return GetServerlessBackupReqMultiError(errors)
	}

	return nil
}

// GetServerlessBackupReqMultiError is an error wrapping multiple validation
// errors returned by GetServerlessBackupReq.ValidateAll() if the designated
// constraints aren't met.
type GetServerlessBackupReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetServerlessBackupReqMultiError) 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 GetServerlessBackupReqMultiError) AllErrors() []error { return m }

// GetServerlessBackupReqValidationError is the validation error returned by
// GetServerlessBackupReq.Validate if the designated constraints aren't met.
type GetServerlessBackupReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetServerlessBackupReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetServerlessBackupReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetServerlessBackupReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetServerlessBackupReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetServerlessBackupReqValidationError) ErrorName() string {
	return "GetServerlessBackupReqValidationError"
}

// Error satisfies the builtin error interface
func (e GetServerlessBackupReqValidationError) 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 %sGetServerlessBackupReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetServerlessBackupReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetServerlessBackupReqValidationError{}

// Validate checks the field values on BasicServerlessBackup 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 *BasicServerlessBackup) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BasicServerlessBackup 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
// BasicServerlessBackupMultiError, or nil if none found.
func (m *BasicServerlessBackup) ValidateAll() error {
	return m.validate(true)
}

func (m *BasicServerlessBackup) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for BackupId

	if all {
		switch v := interface{}(m.GetBackupTime()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BasicServerlessBackupValidationError{
					field:  "BackupTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BasicServerlessBackupValidationError{
					field:  "BackupTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetBackupTime()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return BasicServerlessBackupValidationError{
				field:  "BackupTime",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetExpireTime()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BasicServerlessBackupValidationError{
					field:  "ExpireTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BasicServerlessBackupValidationError{
					field:  "ExpireTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetExpireTime()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return BasicServerlessBackupValidationError{
				field:  "ExpireTime",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return BasicServerlessBackupMultiError(errors)
	}

	return nil
}

// BasicServerlessBackupMultiError is an error wrapping multiple validation
// errors returned by BasicServerlessBackup.ValidateAll() if the designated
// constraints aren't met.
type BasicServerlessBackupMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BasicServerlessBackupMultiError) 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 BasicServerlessBackupMultiError) AllErrors() []error { return m }

// BasicServerlessBackupValidationError is the validation error returned by
// BasicServerlessBackup.Validate if the designated constraints aren't met.
type BasicServerlessBackupValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BasicServerlessBackupValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BasicServerlessBackupValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BasicServerlessBackupValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BasicServerlessBackupValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BasicServerlessBackupValidationError) ErrorName() string {
	return "BasicServerlessBackupValidationError"
}

// Error satisfies the builtin error interface
func (e BasicServerlessBackupValidationError) 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 %sBasicServerlessBackup.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BasicServerlessBackupValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BasicServerlessBackupValidationError{}

// Validate checks the field values on FullServerlessBackup 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 *FullServerlessBackup) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on FullServerlessBackup 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
// FullServerlessBackupMultiError, or nil if none found.
func (m *FullServerlessBackup) ValidateAll() error {
	return m.validate(true)
}

func (m *FullServerlessBackup) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for BackupId

	// no validation rules for ClusterId

	// no validation rules for ProjectId

	if all {
		switch v := interface{}(m.GetBackupTime()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, FullServerlessBackupValidationError{
					field:  "BackupTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, FullServerlessBackupValidationError{
					field:  "BackupTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetBackupTime()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return FullServerlessBackupValidationError{
				field:  "BackupTime",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for ServerlessBackupId

	// no validation rules for ServerlessBackupName

	if all {
		switch v := interface{}(m.GetExpireTime()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, FullServerlessBackupValidationError{
					field:  "ExpireTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, FullServerlessBackupValidationError{
					field:  "ExpireTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetExpireTime()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return FullServerlessBackupValidationError{
				field:  "ExpireTime",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return FullServerlessBackupMultiError(errors)
	}

	return nil
}

// FullServerlessBackupMultiError is an error wrapping multiple validation
// errors returned by FullServerlessBackup.ValidateAll() if the designated
// constraints aren't met.
type FullServerlessBackupMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m FullServerlessBackupMultiError) 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 FullServerlessBackupMultiError) AllErrors() []error { return m }

// FullServerlessBackupValidationError is the validation error returned by
// FullServerlessBackup.Validate if the designated constraints aren't met.
type FullServerlessBackupValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e FullServerlessBackupValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e FullServerlessBackupValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e FullServerlessBackupValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e FullServerlessBackupValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e FullServerlessBackupValidationError) ErrorName() string {
	return "FullServerlessBackupValidationError"
}

// Error satisfies the builtin error interface
func (e FullServerlessBackupValidationError) 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 %sFullServerlessBackup.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = FullServerlessBackupValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = FullServerlessBackupValidationError{}

// Validate checks the field values on BackupListReq 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 *BackupListReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BackupListReq 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 BackupListReqMultiError, or
// nil if none found.
func (m *BackupListReq) ValidateAll() error {
	return m.validate(true)
}

func (m *BackupListReq) 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 OrgId

	// no validation rules for ProjectId

	if m.BackupId != nil {
		// no validation rules for BackupId
	}

	if m.Status != nil {
		// no validation rules for Status
	}

	if m.Region != nil {
		// no validation rules for Region
	}

	if len(errors) > 0 {
		return BackupListReqMultiError(errors)
	}

	return nil
}

// BackupListReqMultiError is an error wrapping multiple validation errors
// returned by BackupListReq.ValidateAll() if the designated constraints
// aren't met.
type BackupListReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BackupListReqMultiError) 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 BackupListReqMultiError) AllErrors() []error { return m }

// BackupListReqValidationError is the validation error returned by
// BackupListReq.Validate if the designated constraints aren't met.
type BackupListReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BackupListReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BackupListReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BackupListReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BackupListReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BackupListReqValidationError) ErrorName() string { return "BackupListReqValidationError" }

// Error satisfies the builtin error interface
func (e BackupListReqValidationError) 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 %sBackupListReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BackupListReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BackupListReqValidationError{}

// Validate checks the field values on FlatClusterComponent 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 *FlatClusterComponent) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on FlatClusterComponent 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
// FlatClusterComponentMultiError, or nil if none found.
func (m *FlatClusterComponent) ValidateAll() error {
	return m.validate(true)
}

func (m *FlatClusterComponent) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ComponentType

	// no validation rules for NodeProfileName

	// no validation rules for Replicas

	// no validation rules for ComputeInstanceType

	// no validation rules for CpuNum

	// no validation rules for MemoryGi

	// no validation rules for StorageInstanceType

	// no validation rules for StorageSizeGi

	if len(errors) > 0 {
		return FlatClusterComponentMultiError(errors)
	}

	return nil
}

// FlatClusterComponentMultiError is an error wrapping multiple validation
// errors returned by FlatClusterComponent.ValidateAll() if the designated
// constraints aren't met.
type FlatClusterComponentMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m FlatClusterComponentMultiError) 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 FlatClusterComponentMultiError) AllErrors() []error { return m }

// FlatClusterComponentValidationError is the validation error returned by
// FlatClusterComponent.Validate if the designated constraints aren't met.
type FlatClusterComponentValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e FlatClusterComponentValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e FlatClusterComponentValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e FlatClusterComponentValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e FlatClusterComponentValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e FlatClusterComponentValidationError) ErrorName() string {
	return "FlatClusterComponentValidationError"
}

// Error satisfies the builtin error interface
func (e FlatClusterComponentValidationError) 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 %sFlatClusterComponent.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = FlatClusterComponentValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = FlatClusterComponentValidationError{}

// Validate checks the field values on SimpleClusterComponent 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 *SimpleClusterComponent) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on SimpleClusterComponent 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
// SimpleClusterComponentMultiError, or nil if none found.
func (m *SimpleClusterComponent) ValidateAll() error {
	return m.validate(true)
}

func (m *SimpleClusterComponent) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ComponentType

	// no validation rules for NodeProfileName

	// no validation rules for Replicas

	// no validation rules for StorageSizeGi

	// no validation rules for StorageType

	// no validation rules for RaftIops

	if m.GetDataStoreIops() < 0 {
		err := SimpleClusterComponentValidationError{
			field:  "DataStoreIops",
			reason: "value must be greater than or equal to 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(errors) > 0 {
		return SimpleClusterComponentMultiError(errors)
	}

	return nil
}

// SimpleClusterComponentMultiError is an error wrapping multiple validation
// errors returned by SimpleClusterComponent.ValidateAll() if the designated
// constraints aren't met.
type SimpleClusterComponentMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m SimpleClusterComponentMultiError) 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 SimpleClusterComponentMultiError) AllErrors() []error { return m }

// SimpleClusterComponentValidationError is the validation error returned by
// SimpleClusterComponent.Validate if the designated constraints aren't met.
type SimpleClusterComponentValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e SimpleClusterComponentValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e SimpleClusterComponentValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e SimpleClusterComponentValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e SimpleClusterComponentValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e SimpleClusterComponentValidationError) ErrorName() string {
	return "SimpleClusterComponentValidationError"
}

// Error satisfies the builtin error interface
func (e SimpleClusterComponentValidationError) 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 %sSimpleClusterComponent.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = SimpleClusterComponentValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = SimpleClusterComponentValidationError{}

// Validate checks the field values on Compute 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 *Compute) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on Compute 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 ComputeMultiError, or nil if none found.
func (m *Compute) ValidateAll() error {
	return m.validate(true)
}

func (m *Compute) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Cpu

	// no validation rules for MemoryMi

	if len(errors) > 0 {
		return ComputeMultiError(errors)
	}

	return nil
}

// ComputeMultiError is an error wrapping multiple validation errors returned
// by Compute.ValidateAll() if the designated constraints aren't met.
type ComputeMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ComputeMultiError) 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 ComputeMultiError) AllErrors() []error { return m }

// ComputeValidationError is the validation error returned by Compute.Validate
// if the designated constraints aren't met.
type ComputeValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ComputeValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ComputeValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ComputeValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ComputeValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ComputeValidationError) ErrorName() string { return "ComputeValidationError" }

// Error satisfies the builtin error interface
func (e ComputeValidationError) 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 %sCompute.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ComputeValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ComputeValidationError{}

// Validate checks the field values on NodeProfile 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 *NodeProfile) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on NodeProfile 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 NodeProfileMultiError, or
// nil if none found.
func (m *NodeProfile) ValidateAll() error {
	return m.validate(true)
}

func (m *NodeProfile) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetCompute()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, NodeProfileValidationError{
					field:  "Compute",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, NodeProfileValidationError{
					field:  "Compute",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetCompute()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return NodeProfileValidationError{
				field:  "Compute",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for StorageGi

	// no validation rules for Name

	if len(errors) > 0 {
		return NodeProfileMultiError(errors)
	}

	return nil
}

// NodeProfileMultiError is an error wrapping multiple validation errors
// returned by NodeProfile.ValidateAll() if the designated constraints aren't met.
type NodeProfileMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m NodeProfileMultiError) 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 NodeProfileMultiError) AllErrors() []error { return m }

// NodeProfileValidationError is the validation error returned by
// NodeProfile.Validate if the designated constraints aren't met.
type NodeProfileValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e NodeProfileValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e NodeProfileValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e NodeProfileValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e NodeProfileValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e NodeProfileValidationError) ErrorName() string { return "NodeProfileValidationError" }

// Error satisfies the builtin error interface
func (e NodeProfileValidationError) 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 %sNodeProfile.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = NodeProfileValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = NodeProfileValidationError{}

// Validate checks the field values on ClusterComponent 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 *ClusterComponent) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ClusterComponent 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
// ClusterComponentMultiError, or nil if none found.
func (m *ClusterComponent) ValidateAll() error {
	return m.validate(true)
}

func (m *ClusterComponent) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Replicas

	if all {
		switch v := interface{}(m.GetNodeProfile()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ClusterComponentValidationError{
					field:  "NodeProfile",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ClusterComponentValidationError{
					field:  "NodeProfile",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetNodeProfile()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ClusterComponentValidationError{
				field:  "NodeProfile",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return ClusterComponentMultiError(errors)
	}

	return nil
}

// ClusterComponentMultiError is an error wrapping multiple validation errors
// returned by ClusterComponent.ValidateAll() if the designated constraints
// aren't met.
type ClusterComponentMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ClusterComponentMultiError) 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 ClusterComponentMultiError) AllErrors() []error { return m }

// ClusterComponentValidationError is the validation error returned by
// ClusterComponent.Validate if the designated constraints aren't met.
type ClusterComponentValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ClusterComponentValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ClusterComponentValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ClusterComponentValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ClusterComponentValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ClusterComponentValidationError) ErrorName() string { return "ClusterComponentValidationError" }

// Error satisfies the builtin error interface
func (e ClusterComponentValidationError) 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 %sClusterComponent.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ClusterComponentValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ClusterComponentValidationError{}

// Validate checks the field values on ClusterComponents 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 *ClusterComponents) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ClusterComponents 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
// ClusterComponentsMultiError, or nil if none found.
func (m *ClusterComponents) ValidateAll() error {
	return m.validate(true)
}

func (m *ClusterComponents) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetTikv()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ClusterComponentsValidationError{
					field:  "Tikv",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ClusterComponentsValidationError{
					field:  "Tikv",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetTikv()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ClusterComponentsValidationError{
				field:  "Tikv",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetTidb()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ClusterComponentsValidationError{
					field:  "Tidb",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ClusterComponentsValidationError{
					field:  "Tidb",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetTidb()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ClusterComponentsValidationError{
				field:  "Tidb",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetTiflash()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ClusterComponentsValidationError{
					field:  "Tiflash",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ClusterComponentsValidationError{
					field:  "Tiflash",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetTiflash()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ClusterComponentsValidationError{
				field:  "Tiflash",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return ClusterComponentsMultiError(errors)
	}

	return nil
}

// ClusterComponentsMultiError is an error wrapping multiple validation errors
// returned by ClusterComponents.ValidateAll() if the designated constraints
// aren't met.
type ClusterComponentsMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ClusterComponentsMultiError) 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 ClusterComponentsMultiError) AllErrors() []error { return m }

// ClusterComponentsValidationError is the validation error returned by
// ClusterComponents.Validate if the designated constraints aren't met.
type ClusterComponentsValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ClusterComponentsValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ClusterComponentsValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ClusterComponentsValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ClusterComponentsValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ClusterComponentsValidationError) ErrorName() string {
	return "ClusterComponentsValidationError"
}

// Error satisfies the builtin error interface
func (e ClusterComponentsValidationError) 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 %sClusterComponents.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ClusterComponentsValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ClusterComponentsValidationError{}

// Validate checks the field values on BackupRestoreReq 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 *BackupRestoreReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BackupRestoreReq 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
// BackupRestoreReqMultiError, or nil if none found.
func (m *BackupRestoreReq) ValidateAll() error {
	return m.validate(true)
}

func (m *BackupRestoreReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Id

	if m.GetClusterId() <= 0 {
		err := BackupRestoreReqValidationError{
			field:  "ClusterId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	// no validation rules for ClusterName

	// no validation rules for Description

	// no validation rules for Password

	if m.GetOrgId() <= 0 {
		err := BackupRestoreReqValidationError{
			field:  "OrgId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetProjectId() <= 0 {
		err := BackupRestoreReqValidationError{
			field:  "ProjectId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	for idx, item := range m.GetComponents() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, BackupRestoreReqValidationError{
						field:  fmt.Sprintf("Components[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, BackupRestoreReqValidationError{
						field:  fmt.Sprintf("Components[%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 BackupRestoreReqValidationError{
					field:  fmt.Sprintf("Components[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for Port

	if _, ok := RestoreMode_name[int32(m.GetRestoreMode())]; !ok {
		err := BackupRestoreReqValidationError{
			field:  "RestoreMode",
			reason: "value must be one of the defined enum values",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	// no validation rules for RestoredTs

	// no validation rules for Region

	// no validation rules for BackupRegion

	if len(errors) > 0 {
		return BackupRestoreReqMultiError(errors)
	}

	return nil
}

// BackupRestoreReqMultiError is an error wrapping multiple validation errors
// returned by BackupRestoreReq.ValidateAll() if the designated constraints
// aren't met.
type BackupRestoreReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BackupRestoreReqMultiError) 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 BackupRestoreReqMultiError) AllErrors() []error { return m }

// BackupRestoreReqValidationError is the validation error returned by
// BackupRestoreReq.Validate if the designated constraints aren't met.
type BackupRestoreReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BackupRestoreReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BackupRestoreReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BackupRestoreReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BackupRestoreReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BackupRestoreReqValidationError) ErrorName() string { return "BackupRestoreReqValidationError" }

// Error satisfies the builtin error interface
func (e BackupRestoreReqValidationError) 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 %sBackupRestoreReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BackupRestoreReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BackupRestoreReqValidationError{}

// Validate checks the field values on BackupCreateReq 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 *BackupCreateReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BackupCreateReq 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
// BackupCreateReqMultiError, or nil if none found.
func (m *BackupCreateReq) ValidateAll() error {
	return m.validate(true)
}

func (m *BackupCreateReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for Description

	// no validation rules for Name

	// no validation rules for OrgId

	// no validation rules for BackupType

	// no validation rules for BackupTime

	// no validation rules for BackupMode

	// no validation rules for ProjectId

	// no validation rules for RetentionPeriod

	if len(errors) > 0 {
		return BackupCreateReqMultiError(errors)
	}

	return nil
}

// BackupCreateReqMultiError is an error wrapping multiple validation errors
// returned by BackupCreateReq.ValidateAll() if the designated constraints
// aren't met.
type BackupCreateReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BackupCreateReqMultiError) 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 BackupCreateReqMultiError) AllErrors() []error { return m }

// BackupCreateReqValidationError is the validation error returned by
// BackupCreateReq.Validate if the designated constraints aren't met.
type BackupCreateReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BackupCreateReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BackupCreateReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BackupCreateReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BackupCreateReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BackupCreateReqValidationError) ErrorName() string { return "BackupCreateReqValidationError" }

// Error satisfies the builtin error interface
func (e BackupCreateReqValidationError) 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 %sBackupCreateReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BackupCreateReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BackupCreateReqValidationError{}

// Validate checks the field values on BackupOptionsReq 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 *BackupOptionsReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BackupOptionsReq 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
// BackupOptionsReqMultiError, or nil if none found.
func (m *BackupOptionsReq) ValidateAll() error {
	return m.validate(true)
}

func (m *BackupOptionsReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if m.GetClusterId() <= 0 {
		err := BackupOptionsReqValidationError{
			field:  "ClusterId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetOrgId() <= 0 {
		err := BackupOptionsReqValidationError{
			field:  "OrgId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetProjectId() <= 0 {
		err := BackupOptionsReqValidationError{
			field:  "ProjectId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(errors) > 0 {
		return BackupOptionsReqMultiError(errors)
	}

	return nil
}

// BackupOptionsReqMultiError is an error wrapping multiple validation errors
// returned by BackupOptionsReq.ValidateAll() if the designated constraints
// aren't met.
type BackupOptionsReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BackupOptionsReqMultiError) 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 BackupOptionsReqMultiError) AllErrors() []error { return m }

// BackupOptionsReqValidationError is the validation error returned by
// BackupOptionsReq.Validate if the designated constraints aren't met.
type BackupOptionsReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BackupOptionsReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BackupOptionsReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BackupOptionsReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BackupOptionsReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BackupOptionsReqValidationError) ErrorName() string { return "BackupOptionsReqValidationError" }

// Error satisfies the builtin error interface
func (e BackupOptionsReqValidationError) 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 %sBackupOptionsReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BackupOptionsReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BackupOptionsReqValidationError{}

// Validate checks the field values on BackupOptionsResp 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 *BackupOptionsResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BackupOptionsResp 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
// BackupOptionsRespMultiError, or nil if none found.
func (m *BackupOptionsResp) ValidateAll() error {
	return m.validate(true)
}

func (m *BackupOptionsResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	if all {
		switch v := interface{}(m.GetDualRegionOptions()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BackupOptionsRespValidationError{
					field:  "DualRegionOptions",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BackupOptionsRespValidationError{
					field:  "DualRegionOptions",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetDualRegionOptions()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return BackupOptionsRespValidationError{
				field:  "DualRegionOptions",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return BackupOptionsRespMultiError(errors)
	}

	return nil
}

// BackupOptionsRespMultiError is an error wrapping multiple validation errors
// returned by BackupOptionsResp.ValidateAll() if the designated constraints
// aren't met.
type BackupOptionsRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BackupOptionsRespMultiError) 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 BackupOptionsRespMultiError) AllErrors() []error { return m }

// BackupOptionsRespValidationError is the validation error returned by
// BackupOptionsResp.Validate if the designated constraints aren't met.
type BackupOptionsRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BackupOptionsRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BackupOptionsRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BackupOptionsRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BackupOptionsRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BackupOptionsRespValidationError) ErrorName() string {
	return "BackupOptionsRespValidationError"
}

// Error satisfies the builtin error interface
func (e BackupOptionsRespValidationError) 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 %sBackupOptionsResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BackupOptionsRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BackupOptionsRespValidationError{}

// Validate checks the field values on PiTRSetting 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 *PiTRSetting) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PiTRSetting 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 PiTRSettingMultiError, or
// nil if none found.
func (m *PiTRSetting) ValidateAll() error {
	return m.validate(true)
}

func (m *PiTRSetting) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Enable

	// no validation rules for Msg

	if len(errors) > 0 {
		return PiTRSettingMultiError(errors)
	}

	return nil
}

// PiTRSettingMultiError is an error wrapping multiple validation errors
// returned by PiTRSetting.ValidateAll() if the designated constraints aren't met.
type PiTRSettingMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m PiTRSettingMultiError) 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 PiTRSettingMultiError) AllErrors() []error { return m }

// PiTRSettingValidationError is the validation error returned by
// PiTRSetting.Validate if the designated constraints aren't met.
type PiTRSettingValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e PiTRSettingValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e PiTRSettingValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e PiTRSettingValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e PiTRSettingValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e PiTRSettingValidationError) ErrorName() string { return "PiTRSettingValidationError" }

// Error satisfies the builtin error interface
func (e PiTRSettingValidationError) 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 %sPiTRSetting.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = PiTRSettingValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = PiTRSettingValidationError{}

// 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 BackupScheduleSetting 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 *BackupScheduleSetting) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BackupScheduleSetting 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
// BackupScheduleSettingMultiError, or nil if none found.
func (m *BackupScheduleSetting) ValidateAll() error {
	return m.validate(true)
}

func (m *BackupScheduleSetting) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Disable

	// no validation rules for BackupTime

	// no validation rules for RetentionPeriod

	// no validation rules for BackupCycle

	if all {
		switch v := interface{}(m.GetNextBackupTime()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BackupScheduleSettingValidationError{
					field:  "NextBackupTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BackupScheduleSettingValidationError{
					field:  "NextBackupTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetNextBackupTime()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return BackupScheduleSettingValidationError{
				field:  "NextBackupTime",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return BackupScheduleSettingMultiError(errors)
	}

	return nil
}

// BackupScheduleSettingMultiError is an error wrapping multiple validation
// errors returned by BackupScheduleSetting.ValidateAll() if the designated
// constraints aren't met.
type BackupScheduleSettingMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BackupScheduleSettingMultiError) 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 BackupScheduleSettingMultiError) AllErrors() []error { return m }

// BackupScheduleSettingValidationError is the validation error returned by
// BackupScheduleSetting.Validate if the designated constraints aren't met.
type BackupScheduleSettingValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BackupScheduleSettingValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BackupScheduleSettingValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BackupScheduleSettingValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BackupScheduleSettingValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BackupScheduleSettingValidationError) ErrorName() string {
	return "BackupScheduleSettingValidationError"
}

// Error satisfies the builtin error interface
func (e BackupScheduleSettingValidationError) 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 %sBackupScheduleSetting.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BackupScheduleSettingValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BackupScheduleSettingValidationError{}

// Validate checks the field values on BackupSettingReq 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 *BackupSettingReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BackupSettingReq 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
// BackupSettingReqMultiError, or nil if none found.
func (m *BackupSettingReq) ValidateAll() error {
	return m.validate(true)
}

func (m *BackupSettingReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for OrgId

	// no validation rules for ProjectId

	if len(errors) > 0 {
		return BackupSettingReqMultiError(errors)
	}

	return nil
}

// BackupSettingReqMultiError is an error wrapping multiple validation errors
// returned by BackupSettingReq.ValidateAll() if the designated constraints
// aren't met.
type BackupSettingReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BackupSettingReqMultiError) 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 BackupSettingReqMultiError) AllErrors() []error { return m }

// BackupSettingReqValidationError is the validation error returned by
// BackupSettingReq.Validate if the designated constraints aren't met.
type BackupSettingReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BackupSettingReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BackupSettingReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BackupSettingReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BackupSettingReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BackupSettingReqValidationError) ErrorName() string { return "BackupSettingReqValidationError" }

// Error satisfies the builtin error interface
func (e BackupSettingReqValidationError) 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 %sBackupSettingReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BackupSettingReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BackupSettingReqValidationError{}

// Validate checks the field values on ModifyBackupSettingReq 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 *ModifyBackupSettingReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ModifyBackupSettingReq 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
// ModifyBackupSettingReqMultiError, or nil if none found.
func (m *ModifyBackupSettingReq) ValidateAll() error {
	return m.validate(true)
}

func (m *ModifyBackupSettingReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for Description

	if all {
		switch v := interface{}(m.GetPitr()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ModifyBackupSettingReqValidationError{
					field:  "Pitr",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ModifyBackupSettingReqValidationError{
					field:  "Pitr",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetPitr()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ModifyBackupSettingReqValidationError{
				field:  "Pitr",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for SwitchImmediately

	if all {
		switch v := interface{}(m.GetVolumeBackup()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ModifyBackupSettingReqValidationError{
					field:  "VolumeBackup",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ModifyBackupSettingReqValidationError{
					field:  "VolumeBackup",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetVolumeBackup()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ModifyBackupSettingReqValidationError{
				field:  "VolumeBackup",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetBackupSchedule()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ModifyBackupSettingReqValidationError{
					field:  "BackupSchedule",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ModifyBackupSettingReqValidationError{
					field:  "BackupSchedule",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetBackupSchedule()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ModifyBackupSettingReqValidationError{
				field:  "BackupSchedule",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return ModifyBackupSettingReqMultiError(errors)
	}

	return nil
}

// ModifyBackupSettingReqMultiError is an error wrapping multiple validation
// errors returned by ModifyBackupSettingReq.ValidateAll() if the designated
// constraints aren't met.
type ModifyBackupSettingReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ModifyBackupSettingReqMultiError) 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 ModifyBackupSettingReqMultiError) AllErrors() []error { return m }

// ModifyBackupSettingReqValidationError is the validation error returned by
// ModifyBackupSettingReq.Validate if the designated constraints aren't met.
type ModifyBackupSettingReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ModifyBackupSettingReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ModifyBackupSettingReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ModifyBackupSettingReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ModifyBackupSettingReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ModifyBackupSettingReqValidationError) ErrorName() string {
	return "ModifyBackupSettingReqValidationError"
}

// Error satisfies the builtin error interface
func (e ModifyBackupSettingReqValidationError) 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 %sModifyBackupSettingReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ModifyBackupSettingReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ModifyBackupSettingReqValidationError{}

// Validate checks the field values on BackupSettingResp 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 *BackupSettingResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BackupSettingResp 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
// BackupSettingRespMultiError, or nil if none found.
func (m *BackupSettingResp) ValidateAll() error {
	return m.validate(true)
}

func (m *BackupSettingResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for Provider

	for idx, item := range m.GetRegions() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, BackupSettingRespValidationError{
						field:  fmt.Sprintf("Regions[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, BackupSettingRespValidationError{
						field:  fmt.Sprintf("Regions[%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 BackupSettingRespValidationError{
					field:  fmt.Sprintf("Regions[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for Description

	if all {
		switch v := interface{}(m.GetPitr()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BackupSettingRespValidationError{
					field:  "Pitr",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BackupSettingRespValidationError{
					field:  "Pitr",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetPitr()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return BackupSettingRespValidationError{
				field:  "Pitr",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetVolumeBackup()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BackupSettingRespValidationError{
					field:  "VolumeBackup",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BackupSettingRespValidationError{
					field:  "VolumeBackup",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetVolumeBackup()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return BackupSettingRespValidationError{
				field:  "VolumeBackup",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetBackupSchedule()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BackupSettingRespValidationError{
					field:  "BackupSchedule",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BackupSettingRespValidationError{
					field:  "BackupSchedule",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetBackupSchedule()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return BackupSettingRespValidationError{
				field:  "BackupSchedule",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	for idx, item := range m.GetRestoreRegions() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, BackupSettingRespValidationError{
						field:  fmt.Sprintf("RestoreRegions[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, BackupSettingRespValidationError{
						field:  fmt.Sprintf("RestoreRegions[%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 BackupSettingRespValidationError{
					field:  fmt.Sprintf("RestoreRegions[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for Status

	if len(errors) > 0 {
		return BackupSettingRespMultiError(errors)
	}

	return nil
}

// BackupSettingRespMultiError is an error wrapping multiple validation errors
// returned by BackupSettingResp.ValidateAll() if the designated constraints
// aren't met.
type BackupSettingRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BackupSettingRespMultiError) 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 BackupSettingRespMultiError) AllErrors() []error { return m }

// BackupSettingRespValidationError is the validation error returned by
// BackupSettingResp.Validate if the designated constraints aren't met.
type BackupSettingRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BackupSettingRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BackupSettingRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BackupSettingRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BackupSettingRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BackupSettingRespValidationError) ErrorName() string {
	return "BackupSettingRespValidationError"
}

// Error satisfies the builtin error interface
func (e BackupSettingRespValidationError) 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 %sBackupSettingResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BackupSettingRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BackupSettingRespValidationError{}

// Validate checks the field values on AutoBackupSettingReq 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 *AutoBackupSettingReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on AutoBackupSettingReq 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
// AutoBackupSettingReqMultiError, or nil if none found.
func (m *AutoBackupSettingReq) ValidateAll() error {
	return m.validate(true)
}

func (m *AutoBackupSettingReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for OrgId

	// no validation rules for ProjectId

	if len(errors) > 0 {
		return AutoBackupSettingReqMultiError(errors)
	}

	return nil
}

// AutoBackupSettingReqMultiError is an error wrapping multiple validation
// errors returned by AutoBackupSettingReq.ValidateAll() if the designated
// constraints aren't met.
type AutoBackupSettingReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m AutoBackupSettingReqMultiError) 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 AutoBackupSettingReqMultiError) AllErrors() []error { return m }

// AutoBackupSettingReqValidationError is the validation error returned by
// AutoBackupSettingReq.Validate if the designated constraints aren't met.
type AutoBackupSettingReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e AutoBackupSettingReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e AutoBackupSettingReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e AutoBackupSettingReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e AutoBackupSettingReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e AutoBackupSettingReqValidationError) ErrorName() string {
	return "AutoBackupSettingReqValidationError"
}

// Error satisfies the builtin error interface
func (e AutoBackupSettingReqValidationError) 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 %sAutoBackupSettingReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = AutoBackupSettingReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = AutoBackupSettingReqValidationError{}

// Validate checks the field values on AutoBackupSetting 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 *AutoBackupSetting) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on AutoBackupSetting 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
// AutoBackupSettingMultiError, or nil if none found.
func (m *AutoBackupSetting) ValidateAll() error {
	return m.validate(true)
}

func (m *AutoBackupSetting) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for BackupMode

	// no validation rules for BackupTime

	// no validation rules for MaxBackups

	// no validation rules for RetentionPeriod

	if len(errors) > 0 {
		return AutoBackupSettingMultiError(errors)
	}

	return nil
}

// AutoBackupSettingMultiError is an error wrapping multiple validation errors
// returned by AutoBackupSetting.ValidateAll() if the designated constraints
// aren't met.
type AutoBackupSettingMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m AutoBackupSettingMultiError) 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 AutoBackupSettingMultiError) AllErrors() []error { return m }

// AutoBackupSettingValidationError is the validation error returned by
// AutoBackupSetting.Validate if the designated constraints aren't met.
type AutoBackupSettingValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e AutoBackupSettingValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e AutoBackupSettingValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e AutoBackupSettingValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e AutoBackupSettingValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e AutoBackupSettingValidationError) ErrorName() string {
	return "AutoBackupSettingValidationError"
}

// Error satisfies the builtin error interface
func (e AutoBackupSettingValidationError) 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 %sAutoBackupSetting.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = AutoBackupSettingValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = AutoBackupSettingValidationError{}

// Validate checks the field values on CreateBackupScheduleResp 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 *CreateBackupScheduleResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on CreateBackupScheduleResp 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
// CreateBackupScheduleRespMultiError, or nil if none found.
func (m *CreateBackupScheduleResp) ValidateAll() error {
	return m.validate(true)
}

func (m *CreateBackupScheduleResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Id

	// no validation rules for BackupId

	if len(errors) > 0 {
		return CreateBackupScheduleRespMultiError(errors)
	}

	return nil
}

// CreateBackupScheduleRespMultiError is an error wrapping multiple validation
// errors returned by CreateBackupScheduleResp.ValidateAll() if the designated
// constraints aren't met.
type CreateBackupScheduleRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m CreateBackupScheduleRespMultiError) 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 CreateBackupScheduleRespMultiError) AllErrors() []error { return m }

// CreateBackupScheduleRespValidationError is the validation error returned by
// CreateBackupScheduleResp.Validate if the designated constraints aren't met.
type CreateBackupScheduleRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e CreateBackupScheduleRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e CreateBackupScheduleRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e CreateBackupScheduleRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e CreateBackupScheduleRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e CreateBackupScheduleRespValidationError) ErrorName() string {
	return "CreateBackupScheduleRespValidationError"
}

// Error satisfies the builtin error interface
func (e CreateBackupScheduleRespValidationError) 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 %sCreateBackupScheduleResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = CreateBackupScheduleRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = CreateBackupScheduleRespValidationError{}

// Validate checks the field values on BackupReq 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 *BackupReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BackupReq 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 BackupReqMultiError, or nil
// if none found.
func (m *BackupReq) ValidateAll() error {
	return m.validate(true)
}

func (m *BackupReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Id

	// no validation rules for ClusterId

	// no validation rules for OrgId

	// no validation rules for ProjectId

	if len(errors) > 0 {
		return BackupReqMultiError(errors)
	}

	return nil
}

// BackupReqMultiError is an error wrapping multiple validation errors returned
// by BackupReq.ValidateAll() if the designated constraints aren't met.
type BackupReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BackupReqMultiError) 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 BackupReqMultiError) AllErrors() []error { return m }

// BackupReqValidationError is the validation error returned by
// BackupReq.Validate if the designated constraints aren't met.
type BackupReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BackupReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BackupReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BackupReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BackupReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BackupReqValidationError) ErrorName() string { return "BackupReqValidationError" }

// Error satisfies the builtin error interface
func (e BackupReqValidationError) 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 %sBackupReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BackupReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BackupReqValidationError{}

// Validate checks the field values on BackupCluster 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 *BackupCluster) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BackupCluster 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 BackupClusterMultiError, or
// nil if none found.
func (m *BackupCluster) ValidateAll() error {
	return m.validate(true)
}

func (m *BackupCluster) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for ClusterVersion

	if all {
		switch v := interface{}(m.GetClusterComponents()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BackupClusterValidationError{
					field:  "ClusterComponents",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BackupClusterValidationError{
					field:  "ClusterComponents",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetClusterComponents()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return BackupClusterValidationError{
				field:  "ClusterComponents",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return BackupClusterMultiError(errors)
	}

	return nil
}

// BackupClusterMultiError is an error wrapping multiple validation errors
// returned by BackupCluster.ValidateAll() if the designated constraints
// aren't met.
type BackupClusterMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BackupClusterMultiError) 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 BackupClusterMultiError) AllErrors() []error { return m }

// BackupClusterValidationError is the validation error returned by
// BackupCluster.Validate if the designated constraints aren't met.
type BackupClusterValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BackupClusterValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BackupClusterValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BackupClusterValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BackupClusterValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BackupClusterValidationError) ErrorName() string { return "BackupClusterValidationError" }

// Error satisfies the builtin error interface
func (e BackupClusterValidationError) 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 %sBackupCluster.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BackupClusterValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BackupClusterValidationError{}

// Validate checks the field values on Backup 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 *Backup) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on Backup 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 BackupMultiError, or nil if none found.
func (m *Backup) ValidateAll() error {
	return m.validate(true)
}

func (m *Backup) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Id

	if all {
		switch v := interface{}(m.GetCluster()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BackupValidationError{
					field:  "Cluster",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BackupValidationError{
					field:  "Cluster",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return BackupValidationError{
				field:  "Cluster",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for Name

	// no validation rules for Description

	if all {
		switch v := interface{}(m.GetCreatedAt()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BackupValidationError{
					field:  "CreatedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BackupValidationError{
					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 BackupValidationError{
				field:  "CreatedAt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for Size

	// no validation rules for Status

	// no validation rules for Type

	if all {
		switch v := interface{}(m.GetExpirationTime()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BackupValidationError{
					field:  "ExpirationTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BackupValidationError{
					field:  "ExpirationTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetExpirationTime()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return BackupValidationError{
				field:  "ExpirationTime",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetBackupTs()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BackupValidationError{
					field:  "BackupTs",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BackupValidationError{
					field:  "BackupTs",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetBackupTs()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return BackupValidationError{
				field:  "BackupTs",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for IsVolumeBackup

	// no validation rules for BackupTso

	for idx, item := range m.GetRegions() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, BackupValidationError{
						field:  fmt.Sprintf("Regions[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, BackupValidationError{
						field:  fmt.Sprintf("Regions[%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 BackupValidationError{
					field:  fmt.Sprintf("Regions[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if all {
		switch v := interface{}(m.GetFinishedAt()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BackupValidationError{
					field:  "FinishedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BackupValidationError{
					field:  "FinishedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetFinishedAt()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return BackupValidationError{
				field:  "FinishedAt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for Protected

	if len(errors) > 0 {
		return BackupMultiError(errors)
	}

	return nil
}

// BackupMultiError is an error wrapping multiple validation errors returned by
// Backup.ValidateAll() if the designated constraints aren't met.
type BackupMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BackupMultiError) 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 BackupMultiError) AllErrors() []error { return m }

// BackupValidationError is the validation error returned by Backup.Validate if
// the designated constraints aren't met.
type BackupValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BackupValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BackupValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BackupValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BackupValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BackupValidationError) ErrorName() string { return "BackupValidationError" }

// Error satisfies the builtin error interface
func (e BackupValidationError) 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 %sBackup.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BackupValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BackupValidationError{}

// Validate checks the field values on ClusterBackup 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 *ClusterBackup) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ClusterBackup 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 ClusterBackupMultiError, or
// nil if none found.
func (m *ClusterBackup) ValidateAll() error {
	return m.validate(true)
}

func (m *ClusterBackup) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Id

	// no validation rules for TenantId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for Type

	// no validation rules for Status

	// no validation rules for Method

	// no validation rules for Name

	for idx, item := range m.GetComponents() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ClusterBackupValidationError{
						field:  fmt.Sprintf("Components[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ClusterBackupValidationError{
						field:  fmt.Sprintf("Components[%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 ClusterBackupValidationError{
					field:  fmt.Sprintf("Components[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for Description

	// no validation rules for SizeBytes

	// no validation rules for CreatedAt

	// no validation rules for IsVolumeBackup

	if m.ExpirationTime != nil {
		// no validation rules for ExpirationTime
	}

	if m.BackupTs != nil {
		// no validation rules for BackupTs
	}

	if len(errors) > 0 {
		return ClusterBackupMultiError(errors)
	}

	return nil
}

// ClusterBackupMultiError is an error wrapping multiple validation errors
// returned by ClusterBackup.ValidateAll() if the designated constraints
// aren't met.
type ClusterBackupMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ClusterBackupMultiError) 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 ClusterBackupMultiError) AllErrors() []error { return m }

// ClusterBackupValidationError is the validation error returned by
// ClusterBackup.Validate if the designated constraints aren't met.
type ClusterBackupValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ClusterBackupValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ClusterBackupValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ClusterBackupValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ClusterBackupValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ClusterBackupValidationError) ErrorName() string { return "ClusterBackupValidationError" }

// Error satisfies the builtin error interface
func (e ClusterBackupValidationError) 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 %sClusterBackup.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ClusterBackupValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ClusterBackupValidationError{}

// Validate checks the field values on Backups 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 *Backups) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on Backups 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 BackupsMultiError, or nil if none found.
func (m *Backups) ValidateAll() error {
	return m.validate(true)
}

func (m *Backups) 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, BackupsValidationError{
						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, BackupsValidationError{
						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 BackupsValidationError{
					field:  fmt.Sprintf("Items[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for Total

	if len(errors) > 0 {
		return BackupsMultiError(errors)
	}

	return nil
}

// BackupsMultiError is an error wrapping multiple validation errors returned
// by Backups.ValidateAll() if the designated constraints aren't met.
type BackupsMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BackupsMultiError) 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 BackupsMultiError) AllErrors() []error { return m }

// BackupsValidationError is the validation error returned by Backups.Validate
// if the designated constraints aren't met.
type BackupsValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BackupsValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BackupsValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BackupsValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BackupsValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BackupsValidationError) ErrorName() string { return "BackupsValidationError" }

// Error satisfies the builtin error interface
func (e BackupsValidationError) 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 %sBackups.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BackupsValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BackupsValidationError{}

// Validate checks the field values on BackupFilter 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 *BackupFilter) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BackupFilter 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 BackupFilterMultiError, or
// nil if none found.
func (m *BackupFilter) ValidateAll() error {
	return m.validate(true)
}

func (m *BackupFilter) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return BackupFilterMultiError(errors)
	}

	return nil
}

// BackupFilterMultiError is an error wrapping multiple validation errors
// returned by BackupFilter.ValidateAll() if the designated constraints aren't met.
type BackupFilterMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BackupFilterMultiError) 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 BackupFilterMultiError) AllErrors() []error { return m }

// BackupFilterValidationError is the validation error returned by
// BackupFilter.Validate if the designated constraints aren't met.
type BackupFilterValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BackupFilterValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BackupFilterValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BackupFilterValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BackupFilterValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BackupFilterValidationError) ErrorName() string { return "BackupFilterValidationError" }

// Error satisfies the builtin error interface
func (e BackupFilterValidationError) 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 %sBackupFilter.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BackupFilterValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BackupFilterValidationError{}

// Validate checks the field values on RestoreId 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 *RestoreId) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on RestoreId 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 RestoreIdMultiError, or nil
// if none found.
func (m *RestoreId) ValidateAll() error {
	return m.validate(true)
}

func (m *RestoreId) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Id

	// no validation rules for OrgId

	if len(errors) > 0 {
		return RestoreIdMultiError(errors)
	}

	return nil
}

// RestoreIdMultiError is an error wrapping multiple validation errors returned
// by RestoreId.ValidateAll() if the designated constraints aren't met.
type RestoreIdMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m RestoreIdMultiError) 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 RestoreIdMultiError) AllErrors() []error { return m }

// RestoreIdValidationError is the validation error returned by
// RestoreId.Validate if the designated constraints aren't met.
type RestoreIdValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e RestoreIdValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e RestoreIdValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e RestoreIdValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e RestoreIdValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e RestoreIdValidationError) ErrorName() string { return "RestoreIdValidationError" }

// Error satisfies the builtin error interface
func (e RestoreIdValidationError) 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 %sRestoreId.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = RestoreIdValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = RestoreIdValidationError{}

// Validate checks the field values on RestoreResp 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 *RestoreResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on RestoreResp 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 RestoreRespMultiError, or
// nil if none found.
func (m *RestoreResp) ValidateAll() error {
	return m.validate(true)
}

func (m *RestoreResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Id

	// no validation rules for ClusterId

	// no validation rules for OrgId

	if all {
		switch v := interface{}(m.GetBaseResp()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, RestoreRespValidationError{
					field:  "BaseResp",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, RestoreRespValidationError{
					field:  "BaseResp",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetBaseResp()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return RestoreRespValidationError{
				field:  "BaseResp",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return RestoreRespMultiError(errors)
	}

	return nil
}

// RestoreRespMultiError is an error wrapping multiple validation errors
// returned by RestoreResp.ValidateAll() if the designated constraints aren't met.
type RestoreRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m RestoreRespMultiError) 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 RestoreRespMultiError) AllErrors() []error { return m }

// RestoreRespValidationError is the validation error returned by
// RestoreResp.Validate if the designated constraints aren't met.
type RestoreRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e RestoreRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e RestoreRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e RestoreRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e RestoreRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e RestoreRespValidationError) ErrorName() string { return "RestoreRespValidationError" }

// Error satisfies the builtin error interface
func (e RestoreRespValidationError) 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 %sRestoreResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = RestoreRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = RestoreRespValidationError{}

// Validate checks the field values on LogBackupListReq 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 *LogBackupListReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on LogBackupListReq 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
// LogBackupListReqMultiError, or nil if none found.
func (m *LogBackupListReq) ValidateAll() error {
	return m.validate(true)
}

func (m *LogBackupListReq) 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 OrgId

	// no validation rules for ProjectId

	if len(errors) > 0 {
		return LogBackupListReqMultiError(errors)
	}

	return nil
}

// LogBackupListReqMultiError is an error wrapping multiple validation errors
// returned by LogBackupListReq.ValidateAll() if the designated constraints
// aren't met.
type LogBackupListReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m LogBackupListReqMultiError) 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 LogBackupListReqMultiError) AllErrors() []error { return m }

// LogBackupListReqValidationError is the validation error returned by
// LogBackupListReq.Validate if the designated constraints aren't met.
type LogBackupListReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e LogBackupListReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e LogBackupListReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e LogBackupListReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e LogBackupListReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e LogBackupListReqValidationError) ErrorName() string { return "LogBackupListReqValidationError" }

// Error satisfies the builtin error interface
func (e LogBackupListReqValidationError) 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 %sLogBackupListReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = LogBackupListReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = LogBackupListReqValidationError{}

// Validate checks the field values on LogBackup 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 *LogBackup) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on LogBackup 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 LogBackupMultiError, or nil
// if none found.
func (m *LogBackup) ValidateAll() error {
	return m.validate(true)
}

func (m *LogBackup) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Id

	// no validation rules for ClusterId

	// no validation rules for BackupScheduleId

	// no validation rules for Name

	if all {
		switch v := interface{}(m.GetCreatedAt()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, LogBackupValidationError{
					field:  "CreatedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, LogBackupValidationError{
					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 LogBackupValidationError{
				field:  "CreatedAt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetStartTs()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, LogBackupValidationError{
					field:  "StartTs",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, LogBackupValidationError{
					field:  "StartTs",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetStartTs()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return LogBackupValidationError{
				field:  "StartTs",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for Status

	if m.CheckPointTs != nil {

		if all {
			switch v := interface{}(m.GetCheckPointTs()).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, LogBackupValidationError{
						field:  "CheckPointTs",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, LogBackupValidationError{
						field:  "CheckPointTs",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(m.GetCheckPointTs()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return LogBackupValidationError{
					field:  "CheckPointTs",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if m.TruncateUntil != nil {

		if all {
			switch v := interface{}(m.GetTruncateUntil()).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, LogBackupValidationError{
						field:  "TruncateUntil",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, LogBackupValidationError{
						field:  "TruncateUntil",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(m.GetTruncateUntil()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return LogBackupValidationError{
					field:  "TruncateUntil",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return LogBackupMultiError(errors)
	}

	return nil
}

// LogBackupMultiError is an error wrapping multiple validation errors returned
// by LogBackup.ValidateAll() if the designated constraints aren't met.
type LogBackupMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m LogBackupMultiError) 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 LogBackupMultiError) AllErrors() []error { return m }

// LogBackupValidationError is the validation error returned by
// LogBackup.Validate if the designated constraints aren't met.
type LogBackupValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e LogBackupValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e LogBackupValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e LogBackupValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e LogBackupValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e LogBackupValidationError) ErrorName() string { return "LogBackupValidationError" }

// Error satisfies the builtin error interface
func (e LogBackupValidationError) 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 %sLogBackup.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = LogBackupValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = LogBackupValidationError{}

// Validate checks the field values on LogBackupListResp 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 *LogBackupListResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on LogBackupListResp 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
// LogBackupListRespMultiError, or nil if none found.
func (m *LogBackupListResp) ValidateAll() error {
	return m.validate(true)
}

func (m *LogBackupListResp) 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, LogBackupListRespValidationError{
						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, LogBackupListRespValidationError{
						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 LogBackupListRespValidationError{
					field:  fmt.Sprintf("Items[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for Total

	if len(errors) > 0 {
		return LogBackupListRespMultiError(errors)
	}

	return nil
}

// LogBackupListRespMultiError is an error wrapping multiple validation errors
// returned by LogBackupListResp.ValidateAll() if the designated constraints
// aren't met.
type LogBackupListRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m LogBackupListRespMultiError) 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 LogBackupListRespMultiError) AllErrors() []error { return m }

// LogBackupListRespValidationError is the validation error returned by
// LogBackupListResp.Validate if the designated constraints aren't met.
type LogBackupListRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e LogBackupListRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e LogBackupListRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e LogBackupListRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e LogBackupListRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e LogBackupListRespValidationError) ErrorName() string {
	return "LogBackupListRespValidationError"
}

// Error satisfies the builtin error interface
func (e LogBackupListRespValidationError) 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 %sLogBackupListResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = LogBackupListRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = LogBackupListRespValidationError{}

// 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 PiTRTimeRangeListReq 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 *PiTRTimeRangeListReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PiTRTimeRangeListReq 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
// PiTRTimeRangeListReqMultiError, or nil if none found.
func (m *PiTRTimeRangeListReq) ValidateAll() error {
	return m.validate(true)
}

func (m *PiTRTimeRangeListReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for OrgId

	// no validation rules for ProjectId

	if len(errors) > 0 {
		return PiTRTimeRangeListReqMultiError(errors)
	}

	return nil
}

// PiTRTimeRangeListReqMultiError is an error wrapping multiple validation
// errors returned by PiTRTimeRangeListReq.ValidateAll() if the designated
// constraints aren't met.
type PiTRTimeRangeListReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m PiTRTimeRangeListReqMultiError) 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 PiTRTimeRangeListReqMultiError) AllErrors() []error { return m }

// PiTRTimeRangeListReqValidationError is the validation error returned by
// PiTRTimeRangeListReq.Validate if the designated constraints aren't met.
type PiTRTimeRangeListReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e PiTRTimeRangeListReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e PiTRTimeRangeListReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e PiTRTimeRangeListReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e PiTRTimeRangeListReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e PiTRTimeRangeListReqValidationError) ErrorName() string {
	return "PiTRTimeRangeListReqValidationError"
}

// Error satisfies the builtin error interface
func (e PiTRTimeRangeListReqValidationError) 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 %sPiTRTimeRangeListReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = PiTRTimeRangeListReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = PiTRTimeRangeListReqValidationError{}

// Validate checks the field values on PiTRTimeRange 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 *PiTRTimeRange) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PiTRTimeRange 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 PiTRTimeRangeMultiError, or
// nil if none found.
func (m *PiTRTimeRange) ValidateAll() error {
	return m.validate(true)
}

func (m *PiTRTimeRange) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetStartTs()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, PiTRTimeRangeValidationError{
					field:  "StartTs",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, PiTRTimeRangeValidationError{
					field:  "StartTs",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetStartTs()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return PiTRTimeRangeValidationError{
				field:  "StartTs",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetEndTs()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, PiTRTimeRangeValidationError{
					field:  "EndTs",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, PiTRTimeRangeValidationError{
					field:  "EndTs",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetEndTs()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return PiTRTimeRangeValidationError{
				field:  "EndTs",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return PiTRTimeRangeMultiError(errors)
	}

	return nil
}

// PiTRTimeRangeMultiError is an error wrapping multiple validation errors
// returned by PiTRTimeRange.ValidateAll() if the designated constraints
// aren't met.
type PiTRTimeRangeMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m PiTRTimeRangeMultiError) 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 PiTRTimeRangeMultiError) AllErrors() []error { return m }

// PiTRTimeRangeValidationError is the validation error returned by
// PiTRTimeRange.Validate if the designated constraints aren't met.
type PiTRTimeRangeValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e PiTRTimeRangeValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e PiTRTimeRangeValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e PiTRTimeRangeValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e PiTRTimeRangeValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e PiTRTimeRangeValidationError) ErrorName() string { return "PiTRTimeRangeValidationError" }

// Error satisfies the builtin error interface
func (e PiTRTimeRangeValidationError) 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 %sPiTRTimeRange.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = PiTRTimeRangeValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = PiTRTimeRangeValidationError{}

// Validate checks the field values on PiTRRegionTimeRange 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 *PiTRRegionTimeRange) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PiTRRegionTimeRange 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
// PiTRRegionTimeRangeMultiError, or nil if none found.
func (m *PiTRRegionTimeRange) ValidateAll() error {
	return m.validate(true)
}

func (m *PiTRRegionTimeRange) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetRegion()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, PiTRRegionTimeRangeValidationError{
					field:  "Region",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, PiTRRegionTimeRangeValidationError{
					field:  "Region",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetRegion()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return PiTRRegionTimeRangeValidationError{
				field:  "Region",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	for idx, item := range m.GetTimeRanges() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, PiTRRegionTimeRangeValidationError{
						field:  fmt.Sprintf("TimeRanges[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, PiTRRegionTimeRangeValidationError{
						field:  fmt.Sprintf("TimeRanges[%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 PiTRRegionTimeRangeValidationError{
					field:  fmt.Sprintf("TimeRanges[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return PiTRRegionTimeRangeMultiError(errors)
	}

	return nil
}

// PiTRRegionTimeRangeMultiError is an error wrapping multiple validation
// errors returned by PiTRRegionTimeRange.ValidateAll() if the designated
// constraints aren't met.
type PiTRRegionTimeRangeMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m PiTRRegionTimeRangeMultiError) 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 PiTRRegionTimeRangeMultiError) AllErrors() []error { return m }

// PiTRRegionTimeRangeValidationError is the validation error returned by
// PiTRRegionTimeRange.Validate if the designated constraints aren't met.
type PiTRRegionTimeRangeValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e PiTRRegionTimeRangeValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e PiTRRegionTimeRangeValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e PiTRRegionTimeRangeValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e PiTRRegionTimeRangeValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e PiTRRegionTimeRangeValidationError) ErrorName() string {
	return "PiTRRegionTimeRangeValidationError"
}

// Error satisfies the builtin error interface
func (e PiTRRegionTimeRangeValidationError) 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 %sPiTRRegionTimeRange.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = PiTRRegionTimeRangeValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = PiTRRegionTimeRangeValidationError{}

// Validate checks the field values on PiTRTimeRangeListResp 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 *PiTRTimeRangeListResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PiTRTimeRangeListResp 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
// PiTRTimeRangeListRespMultiError, or nil if none found.
func (m *PiTRTimeRangeListResp) ValidateAll() error {
	return m.validate(true)
}

func (m *PiTRTimeRangeListResp) 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, PiTRTimeRangeListRespValidationError{
						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, PiTRTimeRangeListRespValidationError{
						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 PiTRTimeRangeListRespValidationError{
					field:  fmt.Sprintf("Items[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for Msg

	if len(errors) > 0 {
		return PiTRTimeRangeListRespMultiError(errors)
	}

	return nil
}

// PiTRTimeRangeListRespMultiError is an error wrapping multiple validation
// errors returned by PiTRTimeRangeListResp.ValidateAll() if the designated
// constraints aren't met.
type PiTRTimeRangeListRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m PiTRTimeRangeListRespMultiError) 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 PiTRTimeRangeListRespMultiError) AllErrors() []error { return m }

// PiTRTimeRangeListRespValidationError is the validation error returned by
// PiTRTimeRangeListResp.Validate if the designated constraints aren't met.
type PiTRTimeRangeListRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e PiTRTimeRangeListRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e PiTRTimeRangeListRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e PiTRTimeRangeListRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e PiTRTimeRangeListRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e PiTRTimeRangeListRespValidationError) ErrorName() string {
	return "PiTRTimeRangeListRespValidationError"
}

// Error satisfies the builtin error interface
func (e PiTRTimeRangeListRespValidationError) 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 %sPiTRTimeRangeListResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = PiTRTimeRangeListRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = PiTRTimeRangeListRespValidationError{}

// Validate checks the field values on RestoreProgressReq 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 *RestoreProgressReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on RestoreProgressReq 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
// RestoreProgressReqMultiError, or nil if none found.
func (m *RestoreProgressReq) ValidateAll() error {
	return m.validate(true)
}

func (m *RestoreProgressReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for OrgId

	// no validation rules for ProjectId

	if len(errors) > 0 {
		return RestoreProgressReqMultiError(errors)
	}

	return nil
}

// RestoreProgressReqMultiError is an error wrapping multiple validation errors
// returned by RestoreProgressReq.ValidateAll() if the designated constraints
// aren't met.
type RestoreProgressReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m RestoreProgressReqMultiError) 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 RestoreProgressReqMultiError) AllErrors() []error { return m }

// RestoreProgressReqValidationError is the validation error returned by
// RestoreProgressReq.Validate if the designated constraints aren't met.
type RestoreProgressReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e RestoreProgressReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e RestoreProgressReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e RestoreProgressReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e RestoreProgressReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e RestoreProgressReqValidationError) ErrorName() string {
	return "RestoreProgressReqValidationError"
}

// Error satisfies the builtin error interface
func (e RestoreProgressReqValidationError) 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 %sRestoreProgressReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = RestoreProgressReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = RestoreProgressReqValidationError{}

// Validate checks the field values on RestoreStepProgress 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 *RestoreStepProgress) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on RestoreStepProgress 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
// RestoreStepProgressMultiError, or nil if none found.
func (m *RestoreStepProgress) ValidateAll() error {
	return m.validate(true)
}

func (m *RestoreStepProgress) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Progress

	// no validation rules for StepName

	if len(errors) > 0 {
		return RestoreStepProgressMultiError(errors)
	}

	return nil
}

// RestoreStepProgressMultiError is an error wrapping multiple validation
// errors returned by RestoreStepProgress.ValidateAll() if the designated
// constraints aren't met.
type RestoreStepProgressMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m RestoreStepProgressMultiError) 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 RestoreStepProgressMultiError) AllErrors() []error { return m }

// RestoreStepProgressValidationError is the validation error returned by
// RestoreStepProgress.Validate if the designated constraints aren't met.
type RestoreStepProgressValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e RestoreStepProgressValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e RestoreStepProgressValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e RestoreStepProgressValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e RestoreStepProgressValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e RestoreStepProgressValidationError) ErrorName() string {
	return "RestoreStepProgressValidationError"
}

// Error satisfies the builtin error interface
func (e RestoreStepProgressValidationError) 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 %sRestoreStepProgress.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = RestoreStepProgressValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = RestoreStepProgressValidationError{}

// Validate checks the field values on RestoreProgressResp 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 *RestoreProgressResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on RestoreProgressResp 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
// RestoreProgressRespMultiError, or nil if none found.
func (m *RestoreProgressResp) ValidateAll() error {
	return m.validate(true)
}

func (m *RestoreProgressResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Progress

	for idx, item := range m.GetSteps() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, RestoreProgressRespValidationError{
						field:  fmt.Sprintf("Steps[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, RestoreProgressRespValidationError{
						field:  fmt.Sprintf("Steps[%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 RestoreProgressRespValidationError{
					field:  fmt.Sprintf("Steps[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for RestoreStatus

	// no validation rules for RestoreBytes

	if m.RestoreError != nil {

		if all {
			switch v := interface{}(m.GetRestoreError()).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, RestoreProgressRespValidationError{
						field:  "RestoreError",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, RestoreProgressRespValidationError{
						field:  "RestoreError",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(m.GetRestoreError()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return RestoreProgressRespValidationError{
					field:  "RestoreError",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return RestoreProgressRespMultiError(errors)
	}

	return nil
}

// RestoreProgressRespMultiError is an error wrapping multiple validation
// errors returned by RestoreProgressResp.ValidateAll() if the designated
// constraints aren't met.
type RestoreProgressRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m RestoreProgressRespMultiError) 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 RestoreProgressRespMultiError) AllErrors() []error { return m }

// RestoreProgressRespValidationError is the validation error returned by
// RestoreProgressResp.Validate if the designated constraints aren't met.
type RestoreProgressRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e RestoreProgressRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e RestoreProgressRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e RestoreProgressRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e RestoreProgressRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e RestoreProgressRespValidationError) ErrorName() string {
	return "RestoreProgressRespValidationError"
}

// Error satisfies the builtin error interface
func (e RestoreProgressRespValidationError) 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 %sRestoreProgressResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = RestoreProgressRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = RestoreProgressRespValidationError{}

// Validate checks the field values on RestoreErrorInfo 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 *RestoreErrorInfo) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on RestoreErrorInfo 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
// RestoreErrorInfoMultiError, or nil if none found.
func (m *RestoreErrorInfo) ValidateAll() error {
	return m.validate(true)
}

func (m *RestoreErrorInfo) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Message

	// no validation rules for Retryable

	if len(errors) > 0 {
		return RestoreErrorInfoMultiError(errors)
	}

	return nil
}

// RestoreErrorInfoMultiError is an error wrapping multiple validation errors
// returned by RestoreErrorInfo.ValidateAll() if the designated constraints
// aren't met.
type RestoreErrorInfoMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m RestoreErrorInfoMultiError) 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 RestoreErrorInfoMultiError) AllErrors() []error { return m }

// RestoreErrorInfoValidationError is the validation error returned by
// RestoreErrorInfo.Validate if the designated constraints aren't met.
type RestoreErrorInfoValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e RestoreErrorInfoValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e RestoreErrorInfoValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e RestoreErrorInfoValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e RestoreErrorInfoValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e RestoreErrorInfoValidationError) ErrorName() string { return "RestoreErrorInfoValidationError" }

// Error satisfies the builtin error interface
func (e RestoreErrorInfoValidationError) 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 %sRestoreErrorInfo.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = RestoreErrorInfoValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = RestoreErrorInfoValidationError{}

// Validate checks the field values on ListRecycleBinClustersReq 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 *ListRecycleBinClustersReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListRecycleBinClustersReq 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
// ListRecycleBinClustersReqMultiError, or nil if none found.
func (m *ListRecycleBinClustersReq) ValidateAll() error {
	return m.validate(true)
}

func (m *ListRecycleBinClustersReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Page

	// no validation rules for PerPage

	// no validation rules for OrgId

	// no validation rules for ProjectId

	if len(errors) > 0 {
		return ListRecycleBinClustersReqMultiError(errors)
	}

	return nil
}

// ListRecycleBinClustersReqMultiError is an error wrapping multiple validation
// errors returned by ListRecycleBinClustersReq.ValidateAll() if the
// designated constraints aren't met.
type ListRecycleBinClustersReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListRecycleBinClustersReqMultiError) 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 ListRecycleBinClustersReqMultiError) AllErrors() []error { return m }

// ListRecycleBinClustersReqValidationError is the validation error returned by
// ListRecycleBinClustersReq.Validate if the designated constraints aren't met.
type ListRecycleBinClustersReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListRecycleBinClustersReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListRecycleBinClustersReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListRecycleBinClustersReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListRecycleBinClustersReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListRecycleBinClustersReqValidationError) ErrorName() string {
	return "ListRecycleBinClustersReqValidationError"
}

// Error satisfies the builtin error interface
func (e ListRecycleBinClustersReqValidationError) 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 %sListRecycleBinClustersReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListRecycleBinClustersReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListRecycleBinClustersReqValidationError{}

// Validate checks the field values on ListRecycleBinClustersV2Req 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 *ListRecycleBinClustersV2Req) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListRecycleBinClustersV2Req 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
// ListRecycleBinClustersV2ReqMultiError, or nil if none found.
func (m *ListRecycleBinClustersV2Req) ValidateAll() error {
	return m.validate(true)
}

func (m *ListRecycleBinClustersV2Req) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ClusterName

	if all {
		switch v := interface{}(m.GetStartTime()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ListRecycleBinClustersV2ReqValidationError{
					field:  "StartTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ListRecycleBinClustersV2ReqValidationError{
					field:  "StartTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetStartTime()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ListRecycleBinClustersV2ReqValidationError{
				field:  "StartTime",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetEndTime()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ListRecycleBinClustersV2ReqValidationError{
					field:  "EndTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ListRecycleBinClustersV2ReqValidationError{
					field:  "EndTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetEndTime()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ListRecycleBinClustersV2ReqValidationError{
				field:  "EndTime",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for Page

	// no validation rules for PerPage

	if len(errors) > 0 {
		return ListRecycleBinClustersV2ReqMultiError(errors)
	}

	return nil
}

// ListRecycleBinClustersV2ReqMultiError is an error wrapping multiple
// validation errors returned by ListRecycleBinClustersV2Req.ValidateAll() if
// the designated constraints aren't met.
type ListRecycleBinClustersV2ReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListRecycleBinClustersV2ReqMultiError) 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 ListRecycleBinClustersV2ReqMultiError) AllErrors() []error { return m }

// ListRecycleBinClustersV2ReqValidationError is the validation error returned
// by ListRecycleBinClustersV2Req.Validate if the designated constraints
// aren't met.
type ListRecycleBinClustersV2ReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListRecycleBinClustersV2ReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListRecycleBinClustersV2ReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListRecycleBinClustersV2ReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListRecycleBinClustersV2ReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListRecycleBinClustersV2ReqValidationError) ErrorName() string {
	return "ListRecycleBinClustersV2ReqValidationError"
}

// Error satisfies the builtin error interface
func (e ListRecycleBinClustersV2ReqValidationError) 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 %sListRecycleBinClustersV2Req.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListRecycleBinClustersV2ReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListRecycleBinClustersV2ReqValidationError{}

// Validate checks the field values on ListRecycleBinClustersResp 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 *ListRecycleBinClustersResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListRecycleBinClustersResp 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
// ListRecycleBinClustersRespMultiError, or nil if none found.
func (m *ListRecycleBinClustersResp) ValidateAll() error {
	return m.validate(true)
}

func (m *ListRecycleBinClustersResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Total

	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, ListRecycleBinClustersRespValidationError{
						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, ListRecycleBinClustersRespValidationError{
						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 ListRecycleBinClustersRespValidationError{
					field:  fmt.Sprintf("Items[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return ListRecycleBinClustersRespMultiError(errors)
	}

	return nil
}

// ListRecycleBinClustersRespMultiError is an error wrapping multiple
// validation errors returned by ListRecycleBinClustersResp.ValidateAll() if
// the designated constraints aren't met.
type ListRecycleBinClustersRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListRecycleBinClustersRespMultiError) 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 ListRecycleBinClustersRespMultiError) AllErrors() []error { return m }

// ListRecycleBinClustersRespValidationError is the validation error returned
// by ListRecycleBinClustersResp.Validate if the designated constraints aren't met.
type ListRecycleBinClustersRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListRecycleBinClustersRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListRecycleBinClustersRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListRecycleBinClustersRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListRecycleBinClustersRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListRecycleBinClustersRespValidationError) ErrorName() string {
	return "ListRecycleBinClustersRespValidationError"
}

// Error satisfies the builtin error interface
func (e ListRecycleBinClustersRespValidationError) 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 %sListRecycleBinClustersResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListRecycleBinClustersRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListRecycleBinClustersRespValidationError{}

// Validate checks the field values on ListRecycleBinClustersV2Resp 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 *ListRecycleBinClustersV2Resp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListRecycleBinClustersV2Resp 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
// ListRecycleBinClustersV2RespMultiError, or nil if none found.
func (m *ListRecycleBinClustersV2Resp) ValidateAll() error {
	return m.validate(true)
}

func (m *ListRecycleBinClustersV2Resp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Total

	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, ListRecycleBinClustersV2RespValidationError{
						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, ListRecycleBinClustersV2RespValidationError{
						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 ListRecycleBinClustersV2RespValidationError{
					field:  fmt.Sprintf("Items[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return ListRecycleBinClustersV2RespMultiError(errors)
	}

	return nil
}

// ListRecycleBinClustersV2RespMultiError is an error wrapping multiple
// validation errors returned by ListRecycleBinClustersV2Resp.ValidateAll() if
// the designated constraints aren't met.
type ListRecycleBinClustersV2RespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListRecycleBinClustersV2RespMultiError) 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 ListRecycleBinClustersV2RespMultiError) AllErrors() []error { return m }

// ListRecycleBinClustersV2RespValidationError is the validation error returned
// by ListRecycleBinClustersV2Resp.Validate if the designated constraints
// aren't met.
type ListRecycleBinClustersV2RespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListRecycleBinClustersV2RespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListRecycleBinClustersV2RespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListRecycleBinClustersV2RespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListRecycleBinClustersV2RespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListRecycleBinClustersV2RespValidationError) ErrorName() string {
	return "ListRecycleBinClustersV2RespValidationError"
}

// Error satisfies the builtin error interface
func (e ListRecycleBinClustersV2RespValidationError) 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 %sListRecycleBinClustersV2Resp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListRecycleBinClustersV2RespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListRecycleBinClustersV2RespValidationError{}

// Validate checks the field values on GetRecycleBinClusterReq 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 *GetRecycleBinClusterReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetRecycleBinClusterReq 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
// GetRecycleBinClusterReqMultiError, or nil if none found.
func (m *GetRecycleBinClusterReq) ValidateAll() error {
	return m.validate(true)
}

func (m *GetRecycleBinClusterReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	if len(errors) > 0 {
		return GetRecycleBinClusterReqMultiError(errors)
	}

	return nil
}

// GetRecycleBinClusterReqMultiError is an error wrapping multiple validation
// errors returned by GetRecycleBinClusterReq.ValidateAll() if the designated
// constraints aren't met.
type GetRecycleBinClusterReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetRecycleBinClusterReqMultiError) 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 GetRecycleBinClusterReqMultiError) AllErrors() []error { return m }

// GetRecycleBinClusterReqValidationError is the validation error returned by
// GetRecycleBinClusterReq.Validate if the designated constraints aren't met.
type GetRecycleBinClusterReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetRecycleBinClusterReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetRecycleBinClusterReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetRecycleBinClusterReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetRecycleBinClusterReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetRecycleBinClusterReqValidationError) ErrorName() string {
	return "GetRecycleBinClusterReqValidationError"
}

// Error satisfies the builtin error interface
func (e GetRecycleBinClusterReqValidationError) 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 %sGetRecycleBinClusterReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetRecycleBinClusterReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetRecycleBinClusterReqValidationError{}

// Validate checks the field values on GetRecycleBinClusterResp 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 *GetRecycleBinClusterResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetRecycleBinClusterResp 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
// GetRecycleBinClusterRespMultiError, or nil if none found.
func (m *GetRecycleBinClusterResp) ValidateAll() error {
	return m.validate(true)
}

func (m *GetRecycleBinClusterResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetCluster()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, GetRecycleBinClusterRespValidationError{
					field:  "Cluster",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, GetRecycleBinClusterRespValidationError{
					field:  "Cluster",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return GetRecycleBinClusterRespValidationError{
				field:  "Cluster",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return GetRecycleBinClusterRespMultiError(errors)
	}

	return nil
}

// GetRecycleBinClusterRespMultiError is an error wrapping multiple validation
// errors returned by GetRecycleBinClusterResp.ValidateAll() if the designated
// constraints aren't met.
type GetRecycleBinClusterRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetRecycleBinClusterRespMultiError) 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 GetRecycleBinClusterRespMultiError) AllErrors() []error { return m }

// GetRecycleBinClusterRespValidationError is the validation error returned by
// GetRecycleBinClusterResp.Validate if the designated constraints aren't met.
type GetRecycleBinClusterRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetRecycleBinClusterRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetRecycleBinClusterRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetRecycleBinClusterRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetRecycleBinClusterRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetRecycleBinClusterRespValidationError) ErrorName() string {
	return "GetRecycleBinClusterRespValidationError"
}

// Error satisfies the builtin error interface
func (e GetRecycleBinClusterRespValidationError) 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 %sGetRecycleBinClusterResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetRecycleBinClusterRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetRecycleBinClusterRespValidationError{}

// Validate checks the field values on RecycleBinCluster 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 *RecycleBinCluster) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on RecycleBinCluster 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
// RecycleBinClusterMultiError, or nil if none found.
func (m *RecycleBinCluster) ValidateAll() error {
	return m.validate(true)
}

func (m *RecycleBinCluster) 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 Provider

	// no validation rules for Region

	// no validation rules for RegionName

	// no validation rules for ProjectId

	if all {
		switch v := interface{}(m.GetDeleteTime()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, RecycleBinClusterValidationError{
					field:  "DeleteTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, RecycleBinClusterValidationError{
					field:  "DeleteTime",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetDeleteTime()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return RecycleBinClusterValidationError{
				field:  "DeleteTime",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return RecycleBinClusterMultiError(errors)
	}

	return nil
}

// RecycleBinClusterMultiError is an error wrapping multiple validation errors
// returned by RecycleBinCluster.ValidateAll() if the designated constraints
// aren't met.
type RecycleBinClusterMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m RecycleBinClusterMultiError) 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 RecycleBinClusterMultiError) AllErrors() []error { return m }

// RecycleBinClusterValidationError is the validation error returned by
// RecycleBinCluster.Validate if the designated constraints aren't met.
type RecycleBinClusterValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e RecycleBinClusterValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e RecycleBinClusterValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e RecycleBinClusterValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e RecycleBinClusterValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e RecycleBinClusterValidationError) ErrorName() string {
	return "RecycleBinClusterValidationError"
}

// Error satisfies the builtin error interface
func (e RecycleBinClusterValidationError) 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 %sRecycleBinCluster.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = RecycleBinClusterValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = RecycleBinClusterValidationError{}

// Validate checks the field values on ListServerlessRestoresReq 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 *ListServerlessRestoresReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListServerlessRestoresReq 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
// ListServerlessRestoresReqMultiError, or nil if none found.
func (m *ListServerlessRestoresReq) ValidateAll() error {
	return m.validate(true)
}

func (m *ListServerlessRestoresReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for OrgId

	// no validation rules for ProjectId

	if len(errors) > 0 {
		return ListServerlessRestoresReqMultiError(errors)
	}

	return nil
}

// ListServerlessRestoresReqMultiError is an error wrapping multiple validation
// errors returned by ListServerlessRestoresReq.ValidateAll() if the
// designated constraints aren't met.
type ListServerlessRestoresReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListServerlessRestoresReqMultiError) 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 ListServerlessRestoresReqMultiError) AllErrors() []error { return m }

// ListServerlessRestoresReqValidationError is the validation error returned by
// ListServerlessRestoresReq.Validate if the designated constraints aren't met.
type ListServerlessRestoresReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListServerlessRestoresReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListServerlessRestoresReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListServerlessRestoresReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListServerlessRestoresReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListServerlessRestoresReqValidationError) ErrorName() string {
	return "ListServerlessRestoresReqValidationError"
}

// Error satisfies the builtin error interface
func (e ListServerlessRestoresReqValidationError) 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 %sListServerlessRestoresReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListServerlessRestoresReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListServerlessRestoresReqValidationError{}

// Validate checks the field values on ListServerlessRestoresResp 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 *ListServerlessRestoresResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListServerlessRestoresResp 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
// ListServerlessRestoresRespMultiError, or nil if none found.
func (m *ListServerlessRestoresResp) ValidateAll() error {
	return m.validate(true)
}

func (m *ListServerlessRestoresResp) 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, ListServerlessRestoresRespValidationError{
						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, ListServerlessRestoresRespValidationError{
						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 ListServerlessRestoresRespValidationError{
					field:  fmt.Sprintf("Items[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for Total

	if len(errors) > 0 {
		return ListServerlessRestoresRespMultiError(errors)
	}

	return nil
}

// ListServerlessRestoresRespMultiError is an error wrapping multiple
// validation errors returned by ListServerlessRestoresResp.ValidateAll() if
// the designated constraints aren't met.
type ListServerlessRestoresRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListServerlessRestoresRespMultiError) 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 ListServerlessRestoresRespMultiError) AllErrors() []error { return m }

// ListServerlessRestoresRespValidationError is the validation error returned
// by ListServerlessRestoresResp.Validate if the designated constraints aren't met.
type ListServerlessRestoresRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListServerlessRestoresRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListServerlessRestoresRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListServerlessRestoresRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListServerlessRestoresRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListServerlessRestoresRespValidationError) ErrorName() string {
	return "ListServerlessRestoresRespValidationError"
}

// Error satisfies the builtin error interface
func (e ListServerlessRestoresRespValidationError) 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 %sListServerlessRestoresResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListServerlessRestoresRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListServerlessRestoresRespValidationError{}

// Validate checks the field values on ServerlessRestore 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 *ServerlessRestore) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ServerlessRestore 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
// ServerlessRestoreMultiError, or nil if none found.
func (m *ServerlessRestore) ValidateAll() error {
	return m.validate(true)
}

func (m *ServerlessRestore) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Id

	// no validation rules for ClusterId

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for Name

	// no validation rules for Description

	if all {
		switch v := interface{}(m.GetCreatedAt()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ServerlessRestoreValidationError{
					field:  "CreatedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ServerlessRestoreValidationError{
					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 ServerlessRestoreValidationError{
				field:  "CreatedAt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for RestoreMode

	// no validation rules for Status

	// no validation rules for RestoreBytes

	if all {
		switch v := interface{}(m.GetProgress()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ServerlessRestoreValidationError{
					field:  "Progress",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ServerlessRestoreValidationError{
					field:  "Progress",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetProgress()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ServerlessRestoreValidationError{
				field:  "Progress",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetRestoredTs()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ServerlessRestoreValidationError{
					field:  "RestoredTs",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ServerlessRestoreValidationError{
					field:  "RestoredTs",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetRestoredTs()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ServerlessRestoreValidationError{
				field:  "RestoredTs",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetFinishedAt()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ServerlessRestoreValidationError{
					field:  "FinishedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ServerlessRestoreValidationError{
					field:  "FinishedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetFinishedAt()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ServerlessRestoreValidationError{
				field:  "FinishedAt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return ServerlessRestoreMultiError(errors)
	}

	return nil
}

// ServerlessRestoreMultiError is an error wrapping multiple validation errors
// returned by ServerlessRestore.ValidateAll() if the designated constraints
// aren't met.
type ServerlessRestoreMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ServerlessRestoreMultiError) 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 ServerlessRestoreMultiError) AllErrors() []error { return m }

// ServerlessRestoreValidationError is the validation error returned by
// ServerlessRestore.Validate if the designated constraints aren't met.
type ServerlessRestoreValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ServerlessRestoreValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ServerlessRestoreValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ServerlessRestoreValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ServerlessRestoreValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ServerlessRestoreValidationError) ErrorName() string {
	return "ServerlessRestoreValidationError"
}

// Error satisfies the builtin error interface
func (e ServerlessRestoreValidationError) 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 %sServerlessRestore.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ServerlessRestoreValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ServerlessRestoreValidationError{}

// Validate checks the field values on ListServerlessPiTRTimeRangesReq 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 *ListServerlessPiTRTimeRangesReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListServerlessPiTRTimeRangesReq 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
// ListServerlessPiTRTimeRangesReqMultiError, or nil if none found.
func (m *ListServerlessPiTRTimeRangesReq) ValidateAll() error {
	return m.validate(true)
}

func (m *ListServerlessPiTRTimeRangesReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for OrgId

	// no validation rules for ProjectId

	if len(errors) > 0 {
		return ListServerlessPiTRTimeRangesReqMultiError(errors)
	}

	return nil
}

// ListServerlessPiTRTimeRangesReqMultiError is an error wrapping multiple
// validation errors returned by ListServerlessPiTRTimeRangesReq.ValidateAll()
// if the designated constraints aren't met.
type ListServerlessPiTRTimeRangesReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListServerlessPiTRTimeRangesReqMultiError) 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 ListServerlessPiTRTimeRangesReqMultiError) AllErrors() []error { return m }

// ListServerlessPiTRTimeRangesReqValidationError is the validation error
// returned by ListServerlessPiTRTimeRangesReq.Validate if the designated
// constraints aren't met.
type ListServerlessPiTRTimeRangesReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListServerlessPiTRTimeRangesReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListServerlessPiTRTimeRangesReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListServerlessPiTRTimeRangesReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListServerlessPiTRTimeRangesReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListServerlessPiTRTimeRangesReqValidationError) ErrorName() string {
	return "ListServerlessPiTRTimeRangesReqValidationError"
}

// Error satisfies the builtin error interface
func (e ListServerlessPiTRTimeRangesReqValidationError) 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 %sListServerlessPiTRTimeRangesReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListServerlessPiTRTimeRangesReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListServerlessPiTRTimeRangesReqValidationError{}

// Validate checks the field values on ServerlessPiTRTimeRange 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 *ServerlessPiTRTimeRange) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ServerlessPiTRTimeRange 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
// ServerlessPiTRTimeRangeMultiError, or nil if none found.
func (m *ServerlessPiTRTimeRange) ValidateAll() error {
	return m.validate(true)
}

func (m *ServerlessPiTRTimeRange) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetStartTs()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ServerlessPiTRTimeRangeValidationError{
					field:  "StartTs",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ServerlessPiTRTimeRangeValidationError{
					field:  "StartTs",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetStartTs()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ServerlessPiTRTimeRangeValidationError{
				field:  "StartTs",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetEndTs()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ServerlessPiTRTimeRangeValidationError{
					field:  "EndTs",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ServerlessPiTRTimeRangeValidationError{
					field:  "EndTs",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetEndTs()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ServerlessPiTRTimeRangeValidationError{
				field:  "EndTs",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return ServerlessPiTRTimeRangeMultiError(errors)
	}

	return nil
}

// ServerlessPiTRTimeRangeMultiError is an error wrapping multiple validation
// errors returned by ServerlessPiTRTimeRange.ValidateAll() if the designated
// constraints aren't met.
type ServerlessPiTRTimeRangeMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ServerlessPiTRTimeRangeMultiError) 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 ServerlessPiTRTimeRangeMultiError) AllErrors() []error { return m }

// ServerlessPiTRTimeRangeValidationError is the validation error returned by
// ServerlessPiTRTimeRange.Validate if the designated constraints aren't met.
type ServerlessPiTRTimeRangeValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ServerlessPiTRTimeRangeValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ServerlessPiTRTimeRangeValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ServerlessPiTRTimeRangeValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ServerlessPiTRTimeRangeValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ServerlessPiTRTimeRangeValidationError) ErrorName() string {
	return "ServerlessPiTRTimeRangeValidationError"
}

// Error satisfies the builtin error interface
func (e ServerlessPiTRTimeRangeValidationError) 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 %sServerlessPiTRTimeRange.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ServerlessPiTRTimeRangeValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ServerlessPiTRTimeRangeValidationError{}

// Validate checks the field values on ListServerlessPiTRTimeRangesResp 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 *ListServerlessPiTRTimeRangesResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListServerlessPiTRTimeRangesResp 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
// ListServerlessPiTRTimeRangesRespMultiError, or nil if none found.
func (m *ListServerlessPiTRTimeRangesResp) ValidateAll() error {
	return m.validate(true)
}

func (m *ListServerlessPiTRTimeRangesResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	for idx, item := range m.GetTimeRanges() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ListServerlessPiTRTimeRangesRespValidationError{
						field:  fmt.Sprintf("TimeRanges[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ListServerlessPiTRTimeRangesRespValidationError{
						field:  fmt.Sprintf("TimeRanges[%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 ListServerlessPiTRTimeRangesRespValidationError{
					field:  fmt.Sprintf("TimeRanges[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return ListServerlessPiTRTimeRangesRespMultiError(errors)
	}

	return nil
}

// ListServerlessPiTRTimeRangesRespMultiError is an error wrapping multiple
// validation errors returned by
// ListServerlessPiTRTimeRangesResp.ValidateAll() if the designated
// constraints aren't met.
type ListServerlessPiTRTimeRangesRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListServerlessPiTRTimeRangesRespMultiError) 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 ListServerlessPiTRTimeRangesRespMultiError) AllErrors() []error { return m }

// ListServerlessPiTRTimeRangesRespValidationError is the validation error
// returned by ListServerlessPiTRTimeRangesResp.Validate if the designated
// constraints aren't met.
type ListServerlessPiTRTimeRangesRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListServerlessPiTRTimeRangesRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListServerlessPiTRTimeRangesRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListServerlessPiTRTimeRangesRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListServerlessPiTRTimeRangesRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListServerlessPiTRTimeRangesRespValidationError) ErrorName() string {
	return "ListServerlessPiTRTimeRangesRespValidationError"
}

// Error satisfies the builtin error interface
func (e ListServerlessPiTRTimeRangesRespValidationError) 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 %sListServerlessPiTRTimeRangesResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListServerlessPiTRTimeRangesRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListServerlessPiTRTimeRangesRespValidationError{}

// 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,
			}
		}
	}

	// no validation rules for BizEndpointId

	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

	// no validation rules for PrivateLinkServiceName

	// no validation rules for KafkaId

	// no validation rules for AdvertisedPatternGroup

	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)
	}

	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

	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 AzureBlobStorageInfo 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 *AzureBlobStorageInfo) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on AzureBlobStorageInfo 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
// AzureBlobStorageInfoMultiError, or nil if none found.
func (m *AzureBlobStorageInfo) ValidateAll() error {
	return m.validate(true)
}

func (m *AzureBlobStorageInfo) 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, AzureBlobStorageInfoValidationError{
					field:  "Endpoint",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, AzureBlobStorageInfoValidationError{
					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 AzureBlobStorageInfoValidationError{
				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, AzureBlobStorageInfoValidationError{
					field:  "DataFormat",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, AzureBlobStorageInfoValidationError{
					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 AzureBlobStorageInfoValidationError{
				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, AzureBlobStorageInfoValidationError{
					field:  "TableConfig",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, AzureBlobStorageInfoValidationError{
					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 AzureBlobStorageInfoValidationError{
				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, AzureBlobStorageInfoValidationError{
					field:  "StartPosition",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, AzureBlobStorageInfoValidationError{
					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 AzureBlobStorageInfoValidationError{
				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, AzureBlobStorageInfoValidationError{
					field:  "StorageFlushConfig",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, AzureBlobStorageInfoValidationError{
					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 AzureBlobStorageInfoValidationError{
				field:  "StorageFlushConfig",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return AzureBlobStorageInfoMultiError(errors)
	}

	return nil
}

// AzureBlobStorageInfoMultiError is an error wrapping multiple validation
// errors returned by AzureBlobStorageInfo.ValidateAll() if the designated
// constraints aren't met.
type AzureBlobStorageInfoMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m AzureBlobStorageInfoMultiError) 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 AzureBlobStorageInfoMultiError) AllErrors() []error { return m }

// AzureBlobStorageInfoValidationError is the validation error returned by
// AzureBlobStorageInfo.Validate if the designated constraints aren't met.
type AzureBlobStorageInfoValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e AzureBlobStorageInfoValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e AzureBlobStorageInfoValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e AzureBlobStorageInfoValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e AzureBlobStorageInfoValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e AzureBlobStorageInfoValidationError) ErrorName() string {
	return "AzureBlobStorageInfoValidationError"
}

// Error satisfies the builtin error interface
func (e AzureBlobStorageInfoValidationError) 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 %sAzureBlobStorageInfo.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = AzureBlobStorageInfoValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = AzureBlobStorageInfoValidationError{}

// Validate checks the field values on AzureBlobStorageEndpoint 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 *AzureBlobStorageEndpoint) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on AzureBlobStorageEndpoint 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
// AzureBlobStorageEndpointMultiError, or nil if none found.
func (m *AzureBlobStorageEndpoint) ValidateAll() error {
	return m.validate(true)
}

func (m *AzureBlobStorageEndpoint) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for BlobUri

	// no validation rules for SasToken

	if len(errors) > 0 {
		return AzureBlobStorageEndpointMultiError(errors)
	}

	return nil
}

// AzureBlobStorageEndpointMultiError is an error wrapping multiple validation
// errors returned by AzureBlobStorageEndpoint.ValidateAll() if the designated
// constraints aren't met.
type AzureBlobStorageEndpointMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m AzureBlobStorageEndpointMultiError) 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 AzureBlobStorageEndpointMultiError) AllErrors() []error { return m }

// AzureBlobStorageEndpointValidationError is the validation error returned by
// AzureBlobStorageEndpoint.Validate if the designated constraints aren't met.
type AzureBlobStorageEndpointValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e AzureBlobStorageEndpointValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e AzureBlobStorageEndpointValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e AzureBlobStorageEndpointValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e AzureBlobStorageEndpointValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e AzureBlobStorageEndpointValidationError) ErrorName() string {
	return "AzureBlobStorageEndpointValidationError"
}

// Error satisfies the builtin error interface
func (e AzureBlobStorageEndpointValidationError) 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 %sAzureBlobStorageEndpoint.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = AzureBlobStorageEndpointValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = AzureBlobStorageEndpointValidationError{}

// 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

	// no validation rules for OutputRawChangeEvent

	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 OrgId

	// no validation rules for ProjectId

	// 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

	// no validation rules for ProjectId

	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 ConnectorListReq 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 *ConnectorListReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ConnectorListReq 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
// ConnectorListReqMultiError, or nil if none found.
func (m *ConnectorListReq) ValidateAll() error {
	return m.validate(true)
}

func (m *ConnectorListReq) 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 OrgId

	// no validation rules for ProjectId

	// no validation rules for ConnectorType

	if len(errors) > 0 {
		return ConnectorListReqMultiError(errors)
	}

	return nil
}

// ConnectorListReqMultiError is an error wrapping multiple validation errors
// returned by ConnectorListReq.ValidateAll() if the designated constraints
// aren't met.
type ConnectorListReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorListReqMultiError) 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 ConnectorListReqMultiError) AllErrors() []error { return m }

// ConnectorListReqValidationError is the validation error returned by
// ConnectorListReq.Validate if the designated constraints aren't met.
type ConnectorListReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ConnectorListReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ConnectorListReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ConnectorListReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ConnectorListReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ConnectorListReqValidationError) ErrorName() string { return "ConnectorListReqValidationError" }

// Error satisfies the builtin error interface
func (e ConnectorListReqValidationError) 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 %sConnectorListReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ConnectorListReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ConnectorListReqValidationError{}

// Validate checks the field values on ConnectorCreateReq 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 *ConnectorCreateReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ConnectorCreateReq 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
// ConnectorCreateReqMultiError, or nil if none found.
func (m *ConnectorCreateReq) ValidateAll() error {
	return m.validate(true)
}

func (m *ConnectorCreateReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for ProjectId

	// no validation rules for OrgId

	// no validation rules for ConnectorType

	if all {
		switch v := interface{}(m.GetKafkaInfo()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ConnectorCreateReqValidationError{
					field:  "KafkaInfo",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorCreateReqValidationError{
					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 ConnectorCreateReqValidationError{
				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, ConnectorCreateReqValidationError{
					field:  "MysqlInfo",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorCreateReqValidationError{
					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 ConnectorCreateReqValidationError{
				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, ConnectorCreateReqValidationError{
					field:  "S3Info",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorCreateReqValidationError{
					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 ConnectorCreateReqValidationError{
				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, ConnectorCreateReqValidationError{
					field:  "GcsInfo",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorCreateReqValidationError{
					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 ConnectorCreateReqValidationError{
				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, ConnectorCreateReqValidationError{
					field:  "ServerlessTidbInfo",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorCreateReqValidationError{
					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 ConnectorCreateReqValidationError{
				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, ConnectorCreateReqValidationError{
					field:  "PulsarInfo",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorCreateReqValidationError{
					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 ConnectorCreateReqValidationError{
				field:  "PulsarInfo",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetAzureBlobStorageInfo()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ConnectorCreateReqValidationError{
					field:  "AzureBlobStorageInfo",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorCreateReqValidationError{
					field:  "AzureBlobStorageInfo",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetAzureBlobStorageInfo()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ConnectorCreateReqValidationError{
				field:  "AzureBlobStorageInfo",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for ChangefeedInstanceType

	// 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, ConnectorCreateReqValidationError{
					field:  "NetworkInfo",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorCreateReqValidationError{
					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 ConnectorCreateReqValidationError{
				field:  "NetworkInfo",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for DryRun

	if len(errors) > 0 {
		return ConnectorCreateReqMultiError(errors)
	}

	return nil
}

// ConnectorCreateReqMultiError is an error wrapping multiple validation errors
// returned by ConnectorCreateReq.ValidateAll() if the designated constraints
// aren't met.
type ConnectorCreateReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorCreateReqMultiError) 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 ConnectorCreateReqMultiError) AllErrors() []error { return m }

// ConnectorCreateReqValidationError is the validation error returned by
// ConnectorCreateReq.Validate if the designated constraints aren't met.
type ConnectorCreateReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ConnectorCreateReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ConnectorCreateReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ConnectorCreateReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ConnectorCreateReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ConnectorCreateReqValidationError) ErrorName() string {
	return "ConnectorCreateReqValidationError"
}

// Error satisfies the builtin error interface
func (e ConnectorCreateReqValidationError) 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 %sConnectorCreateReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ConnectorCreateReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ConnectorCreateReqValidationError{}

// Validate checks the field values on ConnectorEditReq 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 *ConnectorEditReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ConnectorEditReq 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
// ConnectorEditReqMultiError, or nil if none found.
func (m *ConnectorEditReq) ValidateAll() error {
	return m.validate(true)
}

func (m *ConnectorEditReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for ProjectId

	// no validation rules for OrgId

	// no validation rules for ConnectorId

	// no validation rules for ConnectorType

	if all {
		switch v := interface{}(m.GetKafkaInfo()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ConnectorEditReqValidationError{
					field:  "KafkaInfo",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorEditReqValidationError{
					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 ConnectorEditReqValidationError{
				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, ConnectorEditReqValidationError{
					field:  "MysqlInfo",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorEditReqValidationError{
					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 ConnectorEditReqValidationError{
				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, ConnectorEditReqValidationError{
					field:  "ServerlessTidbInfo",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorEditReqValidationError{
					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 ConnectorEditReqValidationError{
				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, ConnectorEditReqValidationError{
					field:  "S3Info",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorEditReqValidationError{
					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 ConnectorEditReqValidationError{
				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, ConnectorEditReqValidationError{
					field:  "GcsInfo",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorEditReqValidationError{
					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 ConnectorEditReqValidationError{
				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, ConnectorEditReqValidationError{
					field:  "PulsarInfo",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorEditReqValidationError{
					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 ConnectorEditReqValidationError{
				field:  "PulsarInfo",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetAzureBlobStorageInfo()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ConnectorEditReqValidationError{
					field:  "AzureBlobStorageInfo",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorEditReqValidationError{
					field:  "AzureBlobStorageInfo",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetAzureBlobStorageInfo()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ConnectorEditReqValidationError{
				field:  "AzureBlobStorageInfo",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for Name

	// no validation rules for DryRun

	if len(errors) > 0 {
		return ConnectorEditReqMultiError(errors)
	}

	return nil
}

// ConnectorEditReqMultiError is an error wrapping multiple validation errors
// returned by ConnectorEditReq.ValidateAll() if the designated constraints
// aren't met.
type ConnectorEditReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorEditReqMultiError) 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 ConnectorEditReqMultiError) AllErrors() []error { return m }

// ConnectorEditReqValidationError is the validation error returned by
// ConnectorEditReq.Validate if the designated constraints aren't met.
type ConnectorEditReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ConnectorEditReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ConnectorEditReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ConnectorEditReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ConnectorEditReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ConnectorEditReqValidationError) ErrorName() string { return "ConnectorEditReqValidationError" }

// Error satisfies the builtin error interface
func (e ConnectorEditReqValidationError) 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 %sConnectorEditReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ConnectorEditReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ConnectorEditReqValidationError{}

// Validate checks the field values on Connector 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 *Connector) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on Connector 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 ConnectorMultiError, or nil
// if none found.
func (m *Connector) ValidateAll() error {
	return m.validate(true)
}

func (m *Connector) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ConnectorId

	// no validation rules for ConnectorType

	// 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, ConnectorValidationError{
					field:  "CheckpointUtc",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorValidationError{
					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 ConnectorValidationError{
				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, ConnectorValidationError{
					field:  "CreatedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorValidationError{
					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 ConnectorValidationError{
				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, ConnectorValidationError{
					field:  "Request",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnectorValidationError{
					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 ConnectorValidationError{
				field:  "Request",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for ChangefeedInstanceType

	// no validation rules for Name

	if len(errors) > 0 {
		return ConnectorMultiError(errors)
	}

	return nil
}

// ConnectorMultiError is an error wrapping multiple validation errors returned
// by Connector.ValidateAll() if the designated constraints aren't met.
type ConnectorMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorMultiError) 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 ConnectorMultiError) AllErrors() []error { return m }

// ConnectorValidationError is the validation error returned by
// Connector.Validate if the designated constraints aren't met.
type ConnectorValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ConnectorValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ConnectorValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ConnectorValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ConnectorValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ConnectorValidationError) ErrorName() string { return "ConnectorValidationError" }

// Error satisfies the builtin error interface
func (e ConnectorValidationError) 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 %sConnector.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ConnectorValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ConnectorValidationError{}

// Validate checks the field values on Connectors 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 *Connectors) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on Connectors 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 ConnectorsMultiError, or
// nil if none found.
func (m *Connectors) ValidateAll() error {
	return m.validate(true)
}

func (m *Connectors) 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, ConnectorsValidationError{
						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, ConnectorsValidationError{
						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 ConnectorsValidationError{
					field:  fmt.Sprintf("Items[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for Total

	if len(errors) > 0 {
		return ConnectorsMultiError(errors)
	}

	return nil
}

// ConnectorsMultiError is an error wrapping multiple validation errors
// returned by Connectors.ValidateAll() if the designated constraints aren't met.
type ConnectorsMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorsMultiError) 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 ConnectorsMultiError) AllErrors() []error { return m }

// ConnectorsValidationError is the validation error returned by
// Connectors.Validate if the designated constraints aren't met.
type ConnectorsValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ConnectorsValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ConnectorsValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ConnectorsValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ConnectorsValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ConnectorsValidationError) ErrorName() string { return "ConnectorsValidationError" }

// Error satisfies the builtin error interface
func (e ConnectorsValidationError) 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 %sConnectors.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ConnectorsValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ConnectorsValidationError{}

// Validate checks the field values on ConnectorID 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 *ConnectorID) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ConnectorID 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 ConnectorIDMultiError, or
// nil if none found.
func (m *ConnectorID) ValidateAll() error {
	return m.validate(true)
}

func (m *ConnectorID) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ConnectorId

	// no validation rules for ClusterId

	// no validation rules for OrgId

	// no validation rules for ProjectId

	if len(errors) > 0 {
		return ConnectorIDMultiError(errors)
	}

	return nil
}

// ConnectorIDMultiError is an error wrapping multiple validation errors
// returned by ConnectorID.ValidateAll() if the designated constraints aren't met.
type ConnectorIDMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ConnectorIDMultiError) 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 ConnectorIDMultiError) AllErrors() []error { return m }

// ConnectorIDValidationError is the validation error returned by
// ConnectorID.Validate if the designated constraints aren't met.
type ConnectorIDValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ConnectorIDValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ConnectorIDValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ConnectorIDValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ConnectorIDValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ConnectorIDValidationError) ErrorName() string { return "ConnectorIDValidationError" }

// Error satisfies the builtin error interface
func (e ConnectorIDValidationError) 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 %sConnectorID.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ConnectorIDValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ConnectorIDValidationError{}

// 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

	// no validation rules for OrgId

	// no validation rules for ProjectId

	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 OrgId

	// no validation rules for ProjectId

	// no validation rules for ChangefeedInstanceType

	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 OrgId

	// no validation rules for ProjectId

	// no validation rules for CloudProviderName

	// no validation rules for RegionName

	// no validation rules for Duration

	// no validation rules for ChangefeedInstanceType

	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 CreateChangefeedPrivateLinkReq 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 *CreateChangefeedPrivateLinkReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on CreateChangefeedPrivateLinkReq 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
// CreateChangefeedPrivateLinkReqMultiError, or nil if none found.
func (m *CreateChangefeedPrivateLinkReq) ValidateAll() error {
	return m.validate(true)
}

func (m *CreateChangefeedPrivateLinkReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	if utf8.RuneCountInString(m.GetPrivateLinkServiceName()) < 1 {
		err := CreateChangefeedPrivateLinkReqValidationError{
			field:  "PrivateLinkServiceName",
			reason: "value length must be at least 1 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if utf8.RuneCountInString(m.GetKafkaId()) < 1 {
		err := CreateChangefeedPrivateLinkReqValidationError{
			field:  "KafkaId",
			reason: "value length must be at least 1 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if !_CreateChangefeedPrivateLinkReq_KafkaId_Pattern.MatchString(m.GetKafkaId()) {
		err := CreateChangefeedPrivateLinkReqValidationError{
			field:  "KafkaId",
			reason: "value does not match regex pattern \"^[a-z0-9]+$\"",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	// no validation rules for KafkaType

	// no validation rules for Provider

	if len(errors) > 0 {
		return CreateChangefeedPrivateLinkReqMultiError(errors)
	}

	return nil
}

// CreateChangefeedPrivateLinkReqMultiError is an error wrapping multiple
// validation errors returned by CreateChangefeedPrivateLinkReq.ValidateAll()
// if the designated constraints aren't met.
type CreateChangefeedPrivateLinkReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m CreateChangefeedPrivateLinkReqMultiError) 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 CreateChangefeedPrivateLinkReqMultiError) AllErrors() []error { return m }

// CreateChangefeedPrivateLinkReqValidationError is the validation error
// returned by CreateChangefeedPrivateLinkReq.Validate if the designated
// constraints aren't met.
type CreateChangefeedPrivateLinkReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e CreateChangefeedPrivateLinkReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e CreateChangefeedPrivateLinkReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e CreateChangefeedPrivateLinkReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e CreateChangefeedPrivateLinkReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e CreateChangefeedPrivateLinkReqValidationError) ErrorName() string {
	return "CreateChangefeedPrivateLinkReqValidationError"
}

// Error satisfies the builtin error interface
func (e CreateChangefeedPrivateLinkReqValidationError) 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 %sCreateChangefeedPrivateLinkReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = CreateChangefeedPrivateLinkReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = CreateChangefeedPrivateLinkReqValidationError{}

var _CreateChangefeedPrivateLinkReq_KafkaId_Pattern = regexp.MustCompile("^[a-z0-9]+$")

// Validate checks the field values on GetChangefeedPrivateLinkReq 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 *GetChangefeedPrivateLinkReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetChangefeedPrivateLinkReq 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
// GetChangefeedPrivateLinkReqMultiError, or nil if none found.
func (m *GetChangefeedPrivateLinkReq) ValidateAll() error {
	return m.validate(true)
}

func (m *GetChangefeedPrivateLinkReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if utf8.RuneCountInString(m.GetKafkaId()) < 1 {
		err := GetChangefeedPrivateLinkReqValidationError{
			field:  "KafkaId",
			reason: "value length must be at least 1 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if !_GetChangefeedPrivateLinkReq_KafkaId_Pattern.MatchString(m.GetKafkaId()) {
		err := GetChangefeedPrivateLinkReqValidationError{
			field:  "KafkaId",
			reason: "value does not match regex pattern \"^[a-z0-9]+$\"",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	// no validation rules for ClusterId

	// no validation rules for OrgId

	// no validation rules for ProjectId

	if len(errors) > 0 {
		return GetChangefeedPrivateLinkReqMultiError(errors)
	}

	return nil
}

// GetChangefeedPrivateLinkReqMultiError is an error wrapping multiple
// validation errors returned by GetChangefeedPrivateLinkReq.ValidateAll() if
// the designated constraints aren't met.
type GetChangefeedPrivateLinkReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetChangefeedPrivateLinkReqMultiError) 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 GetChangefeedPrivateLinkReqMultiError) AllErrors() []error { return m }

// GetChangefeedPrivateLinkReqValidationError is the validation error returned
// by GetChangefeedPrivateLinkReq.Validate if the designated constraints
// aren't met.
type GetChangefeedPrivateLinkReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetChangefeedPrivateLinkReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetChangefeedPrivateLinkReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetChangefeedPrivateLinkReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetChangefeedPrivateLinkReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetChangefeedPrivateLinkReqValidationError) ErrorName() string {
	return "GetChangefeedPrivateLinkReqValidationError"
}

// Error satisfies the builtin error interface
func (e GetChangefeedPrivateLinkReqValidationError) 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 %sGetChangefeedPrivateLinkReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetChangefeedPrivateLinkReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetChangefeedPrivateLinkReqValidationError{}

var _GetChangefeedPrivateLinkReq_KafkaId_Pattern = regexp.MustCompile("^[a-z0-9]+$")

// Validate checks the field values on CreateChangefeedPrivateLinkResp 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 *CreateChangefeedPrivateLinkResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on CreateChangefeedPrivateLinkResp 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
// CreateChangefeedPrivateLinkRespMultiError, or nil if none found.
func (m *CreateChangefeedPrivateLinkResp) ValidateAll() error {
	return m.validate(true)
}

func (m *CreateChangefeedPrivateLinkResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for KafkaId

	// no validation rules for Phase

	// no validation rules for PrivateLinkServiceName

	// no validation rules for Message

	if len(errors) > 0 {
		return CreateChangefeedPrivateLinkRespMultiError(errors)
	}

	return nil
}

// CreateChangefeedPrivateLinkRespMultiError is an error wrapping multiple
// validation errors returned by CreateChangefeedPrivateLinkResp.ValidateAll()
// if the designated constraints aren't met.
type CreateChangefeedPrivateLinkRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m CreateChangefeedPrivateLinkRespMultiError) 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 CreateChangefeedPrivateLinkRespMultiError) AllErrors() []error { return m }

// CreateChangefeedPrivateLinkRespValidationError is the validation error
// returned by CreateChangefeedPrivateLinkResp.Validate if the designated
// constraints aren't met.
type CreateChangefeedPrivateLinkRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e CreateChangefeedPrivateLinkRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e CreateChangefeedPrivateLinkRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e CreateChangefeedPrivateLinkRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e CreateChangefeedPrivateLinkRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e CreateChangefeedPrivateLinkRespValidationError) ErrorName() string {
	return "CreateChangefeedPrivateLinkRespValidationError"
}

// Error satisfies the builtin error interface
func (e CreateChangefeedPrivateLinkRespValidationError) 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 %sCreateChangefeedPrivateLinkResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = CreateChangefeedPrivateLinkRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = CreateChangefeedPrivateLinkRespValidationError{}

// Validate checks the field values on GetChangefeedPrivateLinkResp 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 *GetChangefeedPrivateLinkResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetChangefeedPrivateLinkResp 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
// GetChangefeedPrivateLinkRespMultiError, or nil if none found.
func (m *GetChangefeedPrivateLinkResp) ValidateAll() error {
	return m.validate(true)
}

func (m *GetChangefeedPrivateLinkResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for KafkaId

	// no validation rules for Phase

	// no validation rules for PrivateLinkServiceName

	// no validation rules for Message

	// no validation rules for AdvertisedPatternGroup

	if len(errors) > 0 {
		return GetChangefeedPrivateLinkRespMultiError(errors)
	}

	return nil
}

// GetChangefeedPrivateLinkRespMultiError is an error wrapping multiple
// validation errors returned by GetChangefeedPrivateLinkResp.ValidateAll() if
// the designated constraints aren't met.
type GetChangefeedPrivateLinkRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetChangefeedPrivateLinkRespMultiError) 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 GetChangefeedPrivateLinkRespMultiError) AllErrors() []error { return m }

// GetChangefeedPrivateLinkRespValidationError is the validation error returned
// by GetChangefeedPrivateLinkResp.Validate if the designated constraints
// aren't met.
type GetChangefeedPrivateLinkRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetChangefeedPrivateLinkRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetChangefeedPrivateLinkRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetChangefeedPrivateLinkRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetChangefeedPrivateLinkRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetChangefeedPrivateLinkRespValidationError) ErrorName() string {
	return "GetChangefeedPrivateLinkRespValidationError"
}

// Error satisfies the builtin error interface
func (e GetChangefeedPrivateLinkRespValidationError) 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 %sGetChangefeedPrivateLinkResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetChangefeedPrivateLinkRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetChangefeedPrivateLinkRespValidationError{}

// Validate checks the field values on GetPrivateLinkAuthInfoReq 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 *GetPrivateLinkAuthInfoReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetPrivateLinkAuthInfoReq 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
// GetPrivateLinkAuthInfoReqMultiError, or nil if none found.
func (m *GetPrivateLinkAuthInfoReq) ValidateAll() error {
	return m.validate(true)
}

func (m *GetPrivateLinkAuthInfoReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Provider

	// no validation rules for ClusterId

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for KafkaId

	if len(errors) > 0 {
		return GetPrivateLinkAuthInfoReqMultiError(errors)
	}

	return nil
}

// GetPrivateLinkAuthInfoReqMultiError is an error wrapping multiple validation
// errors returned by GetPrivateLinkAuthInfoReq.ValidateAll() if the
// designated constraints aren't met.
type GetPrivateLinkAuthInfoReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetPrivateLinkAuthInfoReqMultiError) 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 GetPrivateLinkAuthInfoReqMultiError) AllErrors() []error { return m }

// GetPrivateLinkAuthInfoReqValidationError is the validation error returned by
// GetPrivateLinkAuthInfoReq.Validate if the designated constraints aren't met.
type GetPrivateLinkAuthInfoReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetPrivateLinkAuthInfoReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetPrivateLinkAuthInfoReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetPrivateLinkAuthInfoReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetPrivateLinkAuthInfoReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetPrivateLinkAuthInfoReqValidationError) ErrorName() string {
	return "GetPrivateLinkAuthInfoReqValidationError"
}

// Error satisfies the builtin error interface
func (e GetPrivateLinkAuthInfoReqValidationError) 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 %sGetPrivateLinkAuthInfoReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetPrivateLinkAuthInfoReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetPrivateLinkAuthInfoReqValidationError{}

// Validate checks the field values on GetPrivateLinkAuthInfoResp 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 *GetPrivateLinkAuthInfoResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetPrivateLinkAuthInfoResp 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
// GetPrivateLinkAuthInfoRespMultiError, or nil if none found.
func (m *GetPrivateLinkAuthInfoResp) ValidateAll() error {
	return m.validate(true)
}

func (m *GetPrivateLinkAuthInfoResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Network

	// no validation rules for CloudAccountId

	// no validation rules for VpcEndpointId

	// no validation rules for AwsPrincipalId

	if len(errors) > 0 {
		return GetPrivateLinkAuthInfoRespMultiError(errors)
	}

	return nil
}

// GetPrivateLinkAuthInfoRespMultiError is an error wrapping multiple
// validation errors returned by GetPrivateLinkAuthInfoResp.ValidateAll() if
// the designated constraints aren't met.
type GetPrivateLinkAuthInfoRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetPrivateLinkAuthInfoRespMultiError) 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 GetPrivateLinkAuthInfoRespMultiError) AllErrors() []error { return m }

// GetPrivateLinkAuthInfoRespValidationError is the validation error returned
// by GetPrivateLinkAuthInfoResp.Validate if the designated constraints aren't met.
type GetPrivateLinkAuthInfoRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetPrivateLinkAuthInfoRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetPrivateLinkAuthInfoRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetPrivateLinkAuthInfoRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetPrivateLinkAuthInfoRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetPrivateLinkAuthInfoRespValidationError) ErrorName() string {
	return "GetPrivateLinkAuthInfoRespValidationError"
}

// Error satisfies the builtin error interface
func (e GetPrivateLinkAuthInfoRespValidationError) 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 %sGetPrivateLinkAuthInfoResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetPrivateLinkAuthInfoRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetPrivateLinkAuthInfoRespValidationError{}

// Validate checks the field values on GenerateAdvertisedPatternReq 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 *GenerateAdvertisedPatternReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GenerateAdvertisedPatternReq 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
// GenerateAdvertisedPatternReqMultiError, or nil if none found.
func (m *GenerateAdvertisedPatternReq) ValidateAll() error {
	return m.validate(true)
}

func (m *GenerateAdvertisedPatternReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for PrivateLinkServiceName

	if utf8.RuneCountInString(m.GetKafkaId()) < 1 {
		err := GenerateAdvertisedPatternReqValidationError{
			field:  "KafkaId",
			reason: "value length must be at least 1 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if !_GenerateAdvertisedPatternReq_KafkaId_Pattern.MatchString(m.GetKafkaId()) {
		err := GenerateAdvertisedPatternReqValidationError{
			field:  "KafkaId",
			reason: "value does not match regex pattern \"^[a-z0-9]+$\"",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	// no validation rules for Provider

	if len(errors) > 0 {
		return GenerateAdvertisedPatternReqMultiError(errors)
	}

	return nil
}

// GenerateAdvertisedPatternReqMultiError is an error wrapping multiple
// validation errors returned by GenerateAdvertisedPatternReq.ValidateAll() if
// the designated constraints aren't met.
type GenerateAdvertisedPatternReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GenerateAdvertisedPatternReqMultiError) 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 GenerateAdvertisedPatternReqMultiError) AllErrors() []error { return m }

// GenerateAdvertisedPatternReqValidationError is the validation error returned
// by GenerateAdvertisedPatternReq.Validate if the designated constraints
// aren't met.
type GenerateAdvertisedPatternReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GenerateAdvertisedPatternReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GenerateAdvertisedPatternReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GenerateAdvertisedPatternReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GenerateAdvertisedPatternReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GenerateAdvertisedPatternReqValidationError) ErrorName() string {
	return "GenerateAdvertisedPatternReqValidationError"
}

// Error satisfies the builtin error interface
func (e GenerateAdvertisedPatternReqValidationError) 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 %sGenerateAdvertisedPatternReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GenerateAdvertisedPatternReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GenerateAdvertisedPatternReqValidationError{}

var _GenerateAdvertisedPatternReq_KafkaId_Pattern = regexp.MustCompile("^[a-z0-9]+$")

// Validate checks the field values on GenerateAdvertisedPatternResp 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 *GenerateAdvertisedPatternResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GenerateAdvertisedPatternResp 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
// GenerateAdvertisedPatternRespMultiError, or nil if none found.
func (m *GenerateAdvertisedPatternResp) ValidateAll() error {
	return m.validate(true)
}

func (m *GenerateAdvertisedPatternResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for AdvertisedPatternGroup

	// no validation rules for Tips

	if len(errors) > 0 {
		return GenerateAdvertisedPatternRespMultiError(errors)
	}

	return nil
}

// GenerateAdvertisedPatternRespMultiError is an error wrapping multiple
// validation errors returned by GenerateAdvertisedPatternResp.ValidateAll()
// if the designated constraints aren't met.
type GenerateAdvertisedPatternRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GenerateAdvertisedPatternRespMultiError) 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 GenerateAdvertisedPatternRespMultiError) AllErrors() []error { return m }

// GenerateAdvertisedPatternRespValidationError is the validation error
// returned by GenerateAdvertisedPatternResp.Validate if the designated
// constraints aren't met.
type GenerateAdvertisedPatternRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GenerateAdvertisedPatternRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GenerateAdvertisedPatternRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GenerateAdvertisedPatternRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GenerateAdvertisedPatternRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GenerateAdvertisedPatternRespValidationError) ErrorName() string {
	return "GenerateAdvertisedPatternRespValidationError"
}

// Error satisfies the builtin error interface
func (e GenerateAdvertisedPatternRespValidationError) 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 %sGenerateAdvertisedPatternResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GenerateAdvertisedPatternRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GenerateAdvertisedPatternRespValidationError{}

// Validate checks the field values on GetPrivateLinkAvailableZoneReq 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 *GetPrivateLinkAvailableZoneReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetPrivateLinkAvailableZoneReq 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
// GetPrivateLinkAvailableZoneReqMultiError, or nil if none found.
func (m *GetPrivateLinkAvailableZoneReq) ValidateAll() error {
	return m.validate(true)
}

func (m *GetPrivateLinkAvailableZoneReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for Provider

	if len(errors) > 0 {
		return GetPrivateLinkAvailableZoneReqMultiError(errors)
	}

	return nil
}

// GetPrivateLinkAvailableZoneReqMultiError is an error wrapping multiple
// validation errors returned by GetPrivateLinkAvailableZoneReq.ValidateAll()
// if the designated constraints aren't met.
type GetPrivateLinkAvailableZoneReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetPrivateLinkAvailableZoneReqMultiError) 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 GetPrivateLinkAvailableZoneReqMultiError) AllErrors() []error { return m }

// GetPrivateLinkAvailableZoneReqValidationError is the validation error
// returned by GetPrivateLinkAvailableZoneReq.Validate if the designated
// constraints aren't met.
type GetPrivateLinkAvailableZoneReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetPrivateLinkAvailableZoneReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetPrivateLinkAvailableZoneReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetPrivateLinkAvailableZoneReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetPrivateLinkAvailableZoneReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetPrivateLinkAvailableZoneReqValidationError) ErrorName() string {
	return "GetPrivateLinkAvailableZoneReqValidationError"
}

// Error satisfies the builtin error interface
func (e GetPrivateLinkAvailableZoneReqValidationError) 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 %sGetPrivateLinkAvailableZoneReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetPrivateLinkAvailableZoneReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetPrivateLinkAvailableZoneReqValidationError{}

// Validate checks the field values on GetPrivateLinkAvailableZoneResp 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 *GetPrivateLinkAvailableZoneResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetPrivateLinkAvailableZoneResp 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
// GetPrivateLinkAvailableZoneRespMultiError, or nil if none found.
func (m *GetPrivateLinkAvailableZoneResp) ValidateAll() error {
	return m.validate(true)
}

func (m *GetPrivateLinkAvailableZoneResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return GetPrivateLinkAvailableZoneRespMultiError(errors)
	}

	return nil
}

// GetPrivateLinkAvailableZoneRespMultiError is an error wrapping multiple
// validation errors returned by GetPrivateLinkAvailableZoneResp.ValidateAll()
// if the designated constraints aren't met.
type GetPrivateLinkAvailableZoneRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetPrivateLinkAvailableZoneRespMultiError) 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 GetPrivateLinkAvailableZoneRespMultiError) AllErrors() []error { return m }

// GetPrivateLinkAvailableZoneRespValidationError is the validation error
// returned by GetPrivateLinkAvailableZoneResp.Validate if the designated
// constraints aren't met.
type GetPrivateLinkAvailableZoneRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetPrivateLinkAvailableZoneRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetPrivateLinkAvailableZoneRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetPrivateLinkAvailableZoneRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetPrivateLinkAvailableZoneRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetPrivateLinkAvailableZoneRespValidationError) ErrorName() string {
	return "GetPrivateLinkAvailableZoneRespValidationError"
}

// Error satisfies the builtin error interface
func (e GetPrivateLinkAvailableZoneRespValidationError) 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 %sGetPrivateLinkAvailableZoneResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetPrivateLinkAvailableZoneRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetPrivateLinkAvailableZoneRespValidationError{}

// Validate checks the field values on ListConnectorEnabledFeaturesReq 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 *ListConnectorEnabledFeaturesReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListConnectorEnabledFeaturesReq 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
// ListConnectorEnabledFeaturesReqMultiError, or nil if none found.
func (m *ListConnectorEnabledFeaturesReq) ValidateAll() error {
	return m.validate(true)
}

func (m *ListConnectorEnabledFeaturesReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	if m.ConnectorType != nil {
		// no validation rules for ConnectorType
	}

	if m.ConnectorId != nil {
		// no validation rules for ConnectorId
	}

	if len(errors) > 0 {
		return ListConnectorEnabledFeaturesReqMultiError(errors)
	}

	return nil
}

// ListConnectorEnabledFeaturesReqMultiError is an error wrapping multiple
// validation errors returned by ListConnectorEnabledFeaturesReq.ValidateAll()
// if the designated constraints aren't met.
type ListConnectorEnabledFeaturesReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListConnectorEnabledFeaturesReqMultiError) 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 ListConnectorEnabledFeaturesReqMultiError) AllErrors() []error { return m }

// ListConnectorEnabledFeaturesReqValidationError is the validation error
// returned by ListConnectorEnabledFeaturesReq.Validate if the designated
// constraints aren't met.
type ListConnectorEnabledFeaturesReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListConnectorEnabledFeaturesReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListConnectorEnabledFeaturesReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListConnectorEnabledFeaturesReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListConnectorEnabledFeaturesReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListConnectorEnabledFeaturesReqValidationError) ErrorName() string {
	return "ListConnectorEnabledFeaturesReqValidationError"
}

// Error satisfies the builtin error interface
func (e ListConnectorEnabledFeaturesReqValidationError) 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 %sListConnectorEnabledFeaturesReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListConnectorEnabledFeaturesReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListConnectorEnabledFeaturesReqValidationError{}

// Validate checks the field values on ListConnectorEnabledFeaturesResp 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 *ListConnectorEnabledFeaturesResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ListConnectorEnabledFeaturesResp 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
// ListConnectorEnabledFeaturesRespMultiError, or nil if none found.
func (m *ListConnectorEnabledFeaturesResp) ValidateAll() error {
	return m.validate(true)
}

func (m *ListConnectorEnabledFeaturesResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return ListConnectorEnabledFeaturesRespMultiError(errors)
	}

	return nil
}

// ListConnectorEnabledFeaturesRespMultiError is an error wrapping multiple
// validation errors returned by
// ListConnectorEnabledFeaturesResp.ValidateAll() if the designated
// constraints aren't met.
type ListConnectorEnabledFeaturesRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ListConnectorEnabledFeaturesRespMultiError) 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 ListConnectorEnabledFeaturesRespMultiError) AllErrors() []error { return m }

// ListConnectorEnabledFeaturesRespValidationError is the validation error
// returned by ListConnectorEnabledFeaturesResp.Validate if the designated
// constraints aren't met.
type ListConnectorEnabledFeaturesRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListConnectorEnabledFeaturesRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListConnectorEnabledFeaturesRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListConnectorEnabledFeaturesRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListConnectorEnabledFeaturesRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListConnectorEnabledFeaturesRespValidationError) ErrorName() string {
	return "ListConnectorEnabledFeaturesRespValidationError"
}

// Error satisfies the builtin error interface
func (e ListConnectorEnabledFeaturesRespValidationError) 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 %sListConnectorEnabledFeaturesResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListConnectorEnabledFeaturesRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListConnectorEnabledFeaturesRespValidationError{}

// Validate checks the field values on AdminProfileResp 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 *AdminProfileResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on AdminProfileResp 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
// AdminProfileRespMultiError, or nil if none found.
func (m *AdminProfileResp) ValidateAll() error {
	return m.validate(true)
}

func (m *AdminProfileResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Type

	// no validation rules for AwsExternalId

	// no validation rules for AwsAccountId

	// no validation rules for GcpAccountId

	if len(errors) > 0 {
		return AdminProfileRespMultiError(errors)
	}

	return nil
}

// AdminProfileRespMultiError is an error wrapping multiple validation errors
// returned by AdminProfileResp.ValidateAll() if the designated constraints
// aren't met.
type AdminProfileRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m AdminProfileRespMultiError) 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 AdminProfileRespMultiError) AllErrors() []error { return m }

// AdminProfileRespValidationError is the validation error returned by
// AdminProfileResp.Validate if the designated constraints aren't met.
type AdminProfileRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e AdminProfileRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e AdminProfileRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e AdminProfileRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e AdminProfileRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e AdminProfileRespValidationError) ErrorName() string { return "AdminProfileRespValidationError" }

// Error satisfies the builtin error interface
func (e AdminProfileRespValidationError) 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 %sAdminProfileResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = AdminProfileRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = AdminProfileRespValidationError{}

// 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 OrgId

	// no validation rules for ProjectId

	// 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 ConsumerEventBusDLQReq 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 *ConsumerEventBusDLQReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ConsumerEventBusDLQReq 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
// ConsumerEventBusDLQReqMultiError, or nil if none found.
func (m *ConsumerEventBusDLQReq) ValidateAll() error {
	return m.validate(true)
}

func (m *ConsumerEventBusDLQReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return ConsumerEventBusDLQReqMultiError(errors)
	}

	return nil
}

// ConsumerEventBusDLQReqMultiError is an error wrapping multiple validation
// errors returned by ConsumerEventBusDLQReq.ValidateAll() if the designated
// constraints aren't met.
type ConsumerEventBusDLQReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ConsumerEventBusDLQReqMultiError) 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 ConsumerEventBusDLQReqMultiError) AllErrors() []error { return m }

// ConsumerEventBusDLQReqValidationError is the validation error returned by
// ConsumerEventBusDLQReq.Validate if the designated constraints aren't met.
type ConsumerEventBusDLQReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ConsumerEventBusDLQReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ConsumerEventBusDLQReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ConsumerEventBusDLQReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ConsumerEventBusDLQReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ConsumerEventBusDLQReqValidationError) ErrorName() string {
	return "ConsumerEventBusDLQReqValidationError"
}

// Error satisfies the builtin error interface
func (e ConsumerEventBusDLQReqValidationError) 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 %sConsumerEventBusDLQReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ConsumerEventBusDLQReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ConsumerEventBusDLQReqValidationError{}

// Validate checks the field values on ChangefeedInstanceType 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 *ChangefeedInstanceType) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ChangefeedInstanceType 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
// ChangefeedInstanceTypeMultiError, or nil if none found.
func (m *ChangefeedInstanceType) ValidateAll() error {
	return m.validate(true)
}

func (m *ChangefeedInstanceType) 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 Replicas

	// no validation rules for RpsLimit

	if len(errors) > 0 {
		return ChangefeedInstanceTypeMultiError(errors)
	}

	return nil
}

// ChangefeedInstanceTypeMultiError is an error wrapping multiple validation
// errors returned by ChangefeedInstanceType.ValidateAll() if the designated
// constraints aren't met.
type ChangefeedInstanceTypeMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ChangefeedInstanceTypeMultiError) 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 ChangefeedInstanceTypeMultiError) AllErrors() []error { return m }

// ChangefeedInstanceTypeValidationError is the validation error returned by
// ChangefeedInstanceType.Validate if the designated constraints aren't met.
type ChangefeedInstanceTypeValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ChangefeedInstanceTypeValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ChangefeedInstanceTypeValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ChangefeedInstanceTypeValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ChangefeedInstanceTypeValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ChangefeedInstanceTypeValidationError) ErrorName() string {
	return "ChangefeedInstanceTypeValidationError"
}

// Error satisfies the builtin error interface
func (e ChangefeedInstanceTypeValidationError) 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 %sChangefeedInstanceType.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ChangefeedInstanceTypeValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ChangefeedInstanceTypeValidationError{}

// Validate checks the field values on ChangefeedInstanceTypes 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 *ChangefeedInstanceTypes) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ChangefeedInstanceTypes 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
// ChangefeedInstanceTypesMultiError, or nil if none found.
func (m *ChangefeedInstanceTypes) ValidateAll() error {
	return m.validate(true)
}

func (m *ChangefeedInstanceTypes) 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, ChangefeedInstanceTypesValidationError{
						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, ChangefeedInstanceTypesValidationError{
						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 ChangefeedInstanceTypesValidationError{
					field:  fmt.Sprintf("Items[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for Total

	if len(errors) > 0 {
		return ChangefeedInstanceTypesMultiError(errors)
	}

	return nil
}

// ChangefeedInstanceTypesMultiError is an error wrapping multiple validation
// errors returned by ChangefeedInstanceTypes.ValidateAll() if the designated
// constraints aren't met.
type ChangefeedInstanceTypesMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ChangefeedInstanceTypesMultiError) 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 ChangefeedInstanceTypesMultiError) AllErrors() []error { return m }

// ChangefeedInstanceTypesValidationError is the validation error returned by
// ChangefeedInstanceTypes.Validate if the designated constraints aren't met.
type ChangefeedInstanceTypesValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ChangefeedInstanceTypesValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ChangefeedInstanceTypesValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ChangefeedInstanceTypesValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ChangefeedInstanceTypesValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ChangefeedInstanceTypesValidationError) ErrorName() string {
	return "ChangefeedInstanceTypesValidationError"
}

// Error satisfies the builtin error interface
func (e ChangefeedInstanceTypesValidationError) 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 %sChangefeedInstanceTypes.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ChangefeedInstanceTypesValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ChangefeedInstanceTypesValidationError{}

// Validate checks the field values on ChangefeedInstanceTypeListReq 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 *ChangefeedInstanceTypeListReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ChangefeedInstanceTypeListReq 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
// ChangefeedInstanceTypeListReqMultiError, or nil if none found.
func (m *ChangefeedInstanceTypeListReq) ValidateAll() error {
	return m.validate(true)
}

func (m *ChangefeedInstanceTypeListReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for ConnectorType

	if len(errors) > 0 {
		return ChangefeedInstanceTypeListReqMultiError(errors)
	}

	return nil
}

// ChangefeedInstanceTypeListReqMultiError is an error wrapping multiple
// validation errors returned by ChangefeedInstanceTypeListReq.ValidateAll()
// if the designated constraints aren't met.
type ChangefeedInstanceTypeListReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ChangefeedInstanceTypeListReqMultiError) 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 ChangefeedInstanceTypeListReqMultiError) AllErrors() []error { return m }

// ChangefeedInstanceTypeListReqValidationError is the validation error
// returned by ChangefeedInstanceTypeListReq.Validate if the designated
// constraints aren't met.
type ChangefeedInstanceTypeListReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ChangefeedInstanceTypeListReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ChangefeedInstanceTypeListReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ChangefeedInstanceTypeListReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ChangefeedInstanceTypeListReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ChangefeedInstanceTypeListReqValidationError) ErrorName() string {
	return "ChangefeedInstanceTypeListReqValidationError"
}

// Error satisfies the builtin error interface
func (e ChangefeedInstanceTypeListReqValidationError) 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 %sChangefeedInstanceTypeListReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ChangefeedInstanceTypeListReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ChangefeedInstanceTypeListReqValidationError{}

// 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

	if utf8.RuneCountInString(m.GetEndpointServiceName()) < 1 {
		err := SinkEndpointValidationError{
			field:  "EndpointServiceName",
			reason: "value length must be at least 1 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	// 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 Properties

	if all {
		switch v := interface{}(m.GetUsedBy()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, SinkEndpointValidationError{
					field:  "UsedBy",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, SinkEndpointValidationError{
					field:  "UsedBy",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetUsedBy()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return SinkEndpointValidationError{
				field:  "UsedBy",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetLastUsedAt()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, SinkEndpointValidationError{
					field:  "LastUsedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, SinkEndpointValidationError{
					field:  "LastUsedAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetLastUsedAt()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return SinkEndpointValidationError{
				field:  "LastUsedAt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if all {
		switch v := interface{}(m.GetWillDeleteAt()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, SinkEndpointValidationError{
					field:  "WillDeleteAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, SinkEndpointValidationError{
					field:  "WillDeleteAt",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetWillDeleteAt()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return SinkEndpointValidationError{
				field:  "WillDeleteAt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	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 SinkEndpointUsage 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 *SinkEndpointUsage) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on SinkEndpointUsage 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
// SinkEndpointUsageMultiError, or nil if none found.
func (m *SinkEndpointUsage) ValidateAll() error {
	return m.validate(true)
}

func (m *SinkEndpointUsage) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return SinkEndpointUsageMultiError(errors)
	}

	return nil
}

// SinkEndpointUsageMultiError is an error wrapping multiple validation errors
// returned by SinkEndpointUsage.ValidateAll() if the designated constraints
// aren't met.
type SinkEndpointUsageMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m SinkEndpointUsageMultiError) 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 SinkEndpointUsageMultiError) AllErrors() []error { return m }

// SinkEndpointUsageValidationError is the validation error returned by
// SinkEndpointUsage.Validate if the designated constraints aren't met.
type SinkEndpointUsageValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e SinkEndpointUsageValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e SinkEndpointUsageValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e SinkEndpointUsageValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e SinkEndpointUsageValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e SinkEndpointUsageValidationError) ErrorName() string {
	return "SinkEndpointUsageValidationError"
}

// Error satisfies the builtin error interface
func (e SinkEndpointUsageValidationError) 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 %sSinkEndpointUsage.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = SinkEndpointUsageValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = SinkEndpointUsageValidationError{}

// 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 OrgId

	// no validation rules for ProjectId

	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 OrgId

	// no validation rules for ProjectId

	// no validation rules for Provider

	// no validation rules for Region

	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 OrgId

	// no validation rules for ProjectId

	// 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 OrgId

	// no validation rules for ProjectId

	// 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 OrgId

	// no validation rules for ProjectId

	// no validation rules for Provider

	// no validation rules for Region

	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 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 OrgId

	// no validation rules for ProjectId

	// no validation rules for Provider

	// no validation rules for Region

	// 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 OrgId

	// no validation rules for ProjectId

	// no validation rules for Provider

	// no validation rules for Region

	// 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 OrgId

	// no validation rules for ProjectId

	// no validation rules for Provider

	// no validation rules for Region

	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 Network

	// 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 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,
			}
		}
	}

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for TidbClusterId

	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 TidbClusterId

	// 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 DeployType

	// no validation rules for ControlplaneArch

	// no validation rules for OperatorVersion

	// no validation rules for OrgId

	// no validation rules for ProjectId

	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 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 PrepareClassicRestoreAccessReq 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 *PrepareClassicRestoreAccessReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PrepareClassicRestoreAccessReq 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
// PrepareClassicRestoreAccessReqMultiError, or nil if none found.
func (m *PrepareClassicRestoreAccessReq) ValidateAll() error {
	return m.validate(true)
}

func (m *PrepareClassicRestoreAccessReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if m.GetBackupId() <= 0 {
		err := PrepareClassicRestoreAccessReqValidationError{
			field:  "BackupId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if m.GetBucketId() <= 0 {
		err := PrepareClassicRestoreAccessReqValidationError{
			field:  "BucketId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if utf8.RuneCountInString(m.GetRestoreId()) < 1 {
		err := PrepareClassicRestoreAccessReqValidationError{
			field:  "RestoreId",
			reason: "value length must be at least 1 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if utf8.RuneCountInString(m.GetTrustedRoleArn()) < 1 {
		err := PrepareClassicRestoreAccessReqValidationError{
			field:  "TrustedRoleArn",
			reason: "value length must be at least 1 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(errors) > 0 {
		return PrepareClassicRestoreAccessReqMultiError(errors)
	}

	return nil
}

// PrepareClassicRestoreAccessReqMultiError is an error wrapping multiple
// validation errors returned by PrepareClassicRestoreAccessReq.ValidateAll()
// if the designated constraints aren't met.
type PrepareClassicRestoreAccessReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m PrepareClassicRestoreAccessReqMultiError) 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 PrepareClassicRestoreAccessReqMultiError) AllErrors() []error { return m }

// PrepareClassicRestoreAccessReqValidationError is the validation error
// returned by PrepareClassicRestoreAccessReq.Validate if the designated
// constraints aren't met.
type PrepareClassicRestoreAccessReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e PrepareClassicRestoreAccessReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e PrepareClassicRestoreAccessReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e PrepareClassicRestoreAccessReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e PrepareClassicRestoreAccessReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e PrepareClassicRestoreAccessReqValidationError) ErrorName() string {
	return "PrepareClassicRestoreAccessReqValidationError"
}

// Error satisfies the builtin error interface
func (e PrepareClassicRestoreAccessReqValidationError) 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 %sPrepareClassicRestoreAccessReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = PrepareClassicRestoreAccessReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = PrepareClassicRestoreAccessReqValidationError{}

// Validate checks the field values on PrepareClassicRestoreAccessResp 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 *PrepareClassicRestoreAccessResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PrepareClassicRestoreAccessResp 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
// PrepareClassicRestoreAccessRespMultiError, or nil if none found.
func (m *PrepareClassicRestoreAccessResp) ValidateAll() error {
	return m.validate(true)
}

func (m *PrepareClassicRestoreAccessResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for SourceRoleArn

	// no validation rules for ExternalId

	if len(errors) > 0 {
		return PrepareClassicRestoreAccessRespMultiError(errors)
	}

	return nil
}

// PrepareClassicRestoreAccessRespMultiError is an error wrapping multiple
// validation errors returned by PrepareClassicRestoreAccessResp.ValidateAll()
// if the designated constraints aren't met.
type PrepareClassicRestoreAccessRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m PrepareClassicRestoreAccessRespMultiError) 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 PrepareClassicRestoreAccessRespMultiError) AllErrors() []error { return m }

// PrepareClassicRestoreAccessRespValidationError is the validation error
// returned by PrepareClassicRestoreAccessResp.Validate if the designated
// constraints aren't met.
type PrepareClassicRestoreAccessRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e PrepareClassicRestoreAccessRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e PrepareClassicRestoreAccessRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e PrepareClassicRestoreAccessRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e PrepareClassicRestoreAccessRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e PrepareClassicRestoreAccessRespValidationError) ErrorName() string {
	return "PrepareClassicRestoreAccessRespValidationError"
}

// Error satisfies the builtin error interface
func (e PrepareClassicRestoreAccessRespValidationError) 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 %sPrepareClassicRestoreAccessResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = PrepareClassicRestoreAccessRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = PrepareClassicRestoreAccessRespValidationError{}

// Validate checks the field values on CleanupClassicRestoreAccessReq 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 *CleanupClassicRestoreAccessReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on CleanupClassicRestoreAccessReq 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
// CleanupClassicRestoreAccessReqMultiError, or nil if none found.
func (m *CleanupClassicRestoreAccessReq) ValidateAll() error {
	return m.validate(true)
}

func (m *CleanupClassicRestoreAccessReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if m.GetBucketId() <= 0 {
		err := CleanupClassicRestoreAccessReqValidationError{
			field:  "BucketId",
			reason: "value must be greater than 0",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if utf8.RuneCountInString(m.GetRestoreId()) < 1 {
		err := CleanupClassicRestoreAccessReqValidationError{
			field:  "RestoreId",
			reason: "value length must be at least 1 runes",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if len(errors) > 0 {
		return CleanupClassicRestoreAccessReqMultiError(errors)
	}

	return nil
}

// CleanupClassicRestoreAccessReqMultiError is an error wrapping multiple
// validation errors returned by CleanupClassicRestoreAccessReq.ValidateAll()
// if the designated constraints aren't met.
type CleanupClassicRestoreAccessReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m CleanupClassicRestoreAccessReqMultiError) 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 CleanupClassicRestoreAccessReqMultiError) AllErrors() []error { return m }

// CleanupClassicRestoreAccessReqValidationError is the validation error
// returned by CleanupClassicRestoreAccessReq.Validate if the designated
// constraints aren't met.
type CleanupClassicRestoreAccessReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e CleanupClassicRestoreAccessReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e CleanupClassicRestoreAccessReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e CleanupClassicRestoreAccessReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e CleanupClassicRestoreAccessReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e CleanupClassicRestoreAccessReqValidationError) ErrorName() string {
	return "CleanupClassicRestoreAccessReqValidationError"
}

// Error satisfies the builtin error interface
func (e CleanupClassicRestoreAccessReqValidationError) 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 %sCleanupClassicRestoreAccessReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = CleanupClassicRestoreAccessReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = CleanupClassicRestoreAccessReqValidationError{}

// Validate checks the field values on ImportsSearchImportFilesResp_TableMatch
// 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 *ImportsSearchImportFilesResp_TableMatch) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// ImportsSearchImportFilesResp_TableMatch 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
// ImportsSearchImportFilesResp_TableMatchMultiError, or nil if none found.
func (m *ImportsSearchImportFilesResp_TableMatch) ValidateAll() error {
	return m.validate(true)
}

func (m *ImportsSearchImportFilesResp_TableMatch) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetTargetTable()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ImportsSearchImportFilesResp_TableMatchValidationError{
					field:  "TargetTable",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ImportsSearchImportFilesResp_TableMatchValidationError{
					field:  "TargetTable",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetTargetTable()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ImportsSearchImportFilesResp_TableMatchValidationError{
				field:  "TargetTable",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for SourceUri

	// no validation rules for WarningMessage

	if len(errors) > 0 {
		return ImportsSearchImportFilesResp_TableMatchMultiError(errors)
	}

	return nil
}

// ImportsSearchImportFilesResp_TableMatchMultiError is an error wrapping
// multiple validation errors returned by
// ImportsSearchImportFilesResp_TableMatch.ValidateAll() if the designated
// constraints aren't met.
type ImportsSearchImportFilesResp_TableMatchMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ImportsSearchImportFilesResp_TableMatchMultiError) 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 ImportsSearchImportFilesResp_TableMatchMultiError) AllErrors() []error { return m }

// ImportsSearchImportFilesResp_TableMatchValidationError is the validation
// error returned by ImportsSearchImportFilesResp_TableMatch.Validate if the
// designated constraints aren't met.
type ImportsSearchImportFilesResp_TableMatchValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ImportsSearchImportFilesResp_TableMatchValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ImportsSearchImportFilesResp_TableMatchValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ImportsSearchImportFilesResp_TableMatchValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ImportsSearchImportFilesResp_TableMatchValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ImportsSearchImportFilesResp_TableMatchValidationError) ErrorName() string {
	return "ImportsSearchImportFilesResp_TableMatchValidationError"
}

// Error satisfies the builtin error interface
func (e ImportsSearchImportFilesResp_TableMatchValidationError) 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 %sImportsSearchImportFilesResp_TableMatch.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ImportsSearchImportFilesResp_TableMatchValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ImportsSearchImportFilesResp_TableMatchValidationError{}

// Validate checks the field values on BackupOptionsResp_RegionOptions 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 *BackupOptionsResp_RegionOptions) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BackupOptionsResp_RegionOptions 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
// BackupOptionsResp_RegionOptionsMultiError, or nil if none found.
func (m *BackupOptionsResp_RegionOptions) ValidateAll() error {
	return m.validate(true)
}

func (m *BackupOptionsResp_RegionOptions) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetRegion()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BackupOptionsResp_RegionOptionsValidationError{
					field:  "Region",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BackupOptionsResp_RegionOptionsValidationError{
					field:  "Region",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetRegion()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return BackupOptionsResp_RegionOptionsValidationError{
				field:  "Region",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for Continent

	// no validation rules for Description

	if len(errors) > 0 {
		return BackupOptionsResp_RegionOptionsMultiError(errors)
	}

	return nil
}

// BackupOptionsResp_RegionOptionsMultiError is an error wrapping multiple
// validation errors returned by BackupOptionsResp_RegionOptions.ValidateAll()
// if the designated constraints aren't met.
type BackupOptionsResp_RegionOptionsMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BackupOptionsResp_RegionOptionsMultiError) 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 BackupOptionsResp_RegionOptionsMultiError) AllErrors() []error { return m }

// BackupOptionsResp_RegionOptionsValidationError is the validation error
// returned by BackupOptionsResp_RegionOptions.Validate if the designated
// constraints aren't met.
type BackupOptionsResp_RegionOptionsValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BackupOptionsResp_RegionOptionsValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BackupOptionsResp_RegionOptionsValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BackupOptionsResp_RegionOptionsValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BackupOptionsResp_RegionOptionsValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BackupOptionsResp_RegionOptionsValidationError) ErrorName() string {
	return "BackupOptionsResp_RegionOptionsValidationError"
}

// Error satisfies the builtin error interface
func (e BackupOptionsResp_RegionOptionsValidationError) 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 %sBackupOptionsResp_RegionOptions.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BackupOptionsResp_RegionOptionsValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BackupOptionsResp_RegionOptionsValidationError{}

// Validate checks the field values on BackupOptionsResp_DualRegionOptions 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 *BackupOptionsResp_DualRegionOptions) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BackupOptionsResp_DualRegionOptions
// 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
// BackupOptionsResp_DualRegionOptionsMultiError, or nil if none found.
func (m *BackupOptionsResp_DualRegionOptions) ValidateAll() error {
	return m.validate(true)
}

func (m *BackupOptionsResp_DualRegionOptions) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	for idx, item := range m.GetRegionOptions() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, BackupOptionsResp_DualRegionOptionsValidationError{
						field:  fmt.Sprintf("RegionOptions[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, BackupOptionsResp_DualRegionOptionsValidationError{
						field:  fmt.Sprintf("RegionOptions[%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 BackupOptionsResp_DualRegionOptionsValidationError{
					field:  fmt.Sprintf("RegionOptions[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if all {
		switch v := interface{}(m.GetClusterRegion()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BackupOptionsResp_DualRegionOptionsValidationError{
					field:  "ClusterRegion",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BackupOptionsResp_DualRegionOptionsValidationError{
					field:  "ClusterRegion",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetClusterRegion()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return BackupOptionsResp_DualRegionOptionsValidationError{
				field:  "ClusterRegion",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return BackupOptionsResp_DualRegionOptionsMultiError(errors)
	}

	return nil
}

// BackupOptionsResp_DualRegionOptionsMultiError is an error wrapping multiple
// validation errors returned by
// BackupOptionsResp_DualRegionOptions.ValidateAll() if the designated
// constraints aren't met.
type BackupOptionsResp_DualRegionOptionsMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BackupOptionsResp_DualRegionOptionsMultiError) 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 BackupOptionsResp_DualRegionOptionsMultiError) AllErrors() []error { return m }

// BackupOptionsResp_DualRegionOptionsValidationError is the validation error
// returned by BackupOptionsResp_DualRegionOptions.Validate if the designated
// constraints aren't met.
type BackupOptionsResp_DualRegionOptionsValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BackupOptionsResp_DualRegionOptionsValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BackupOptionsResp_DualRegionOptionsValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BackupOptionsResp_DualRegionOptionsValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BackupOptionsResp_DualRegionOptionsValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BackupOptionsResp_DualRegionOptionsValidationError) ErrorName() string {
	return "BackupOptionsResp_DualRegionOptionsValidationError"
}

// Error satisfies the builtin error interface
func (e BackupOptionsResp_DualRegionOptionsValidationError) 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 %sBackupOptionsResp_DualRegionOptions.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BackupOptionsResp_DualRegionOptionsValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BackupOptionsResp_DualRegionOptionsValidationError{}

// 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{}
