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

package rpc

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

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

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

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

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

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

	var errors []error

	// no validation rules for Provider

	// no validation rules for Region

	// no validation rules for State

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListTiCDCClustersRequestValidationError{}

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

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

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

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

	}

	// no validation rules for Total

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListTiCDCClustersResponseValidationError{}

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

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

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

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

	var errors []error

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetTiCDCClusterRequestValidationError{}

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

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

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

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

	var errors []error

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = UpgradeTiCDCClusterRequestValidationError{}

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

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

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

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

	var errors []error

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

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

	// no validation rules for Rcu

	// no validation rules for DisplayName

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = MigrateChangefeedRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for ChangefeedId

	// no validation rules for State

	// no validation rules for Arch

	// no validation rules for Rcu

	// no validation rules for DisplayName

	// no validation rules for SourceChangefeedId

	// no validation rules for TargetChangefeedId

	// no validation rules for SourceCheckpointTso

	// no validation rules for TargetStartTso

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = MigrateChangefeedResponseValidationError{}

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

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

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

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

	var errors []error

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

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

	// no validation rules for Rcu

	// no validation rules for DisplayName

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = PrecheckMigrateChangefeedRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Name

	// no validation rules for Passed

	// no validation rules for Message

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = MigrationCheckResultValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Passed

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

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

	}

	// no validation rules for SourceArch

	// no validation rules for SourceState

	// no validation rules for CurrentCheckpointTso

	// no validation rules for TargetRcu

	// no validation rules for TargetProvider

	// no validation rules for TargetRegion

	// no validation rules for TargetKubernetes

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = PrecheckMigrateChangefeedResponseValidationError{}

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

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

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

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

	var errors []error

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CompareChangefeedsRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Passed

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

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

	}

	// no validation rules for SourceCheckpointTso

	// no validation rules for TargetStartTso

	// no validation rules for TargetCheckpointTso

	// no validation rules for SourceState

	// no validation rules for TargetState

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CompareChangefeedsResponseValidationError{}

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

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

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

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

	var errors []error

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListClusterCDCJobsRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for StatusId

	// no validation rules for StatusName

	// no validation rules for StatusType

	// no validation rules for IsLegacyClusterLock

	// no validation rules for IsExpired

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ClusterCDCJobInfoValidationError{}

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

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

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

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

	}

	// no validation rules for Total

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListClusterCDCJobsResponseValidationError{}

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

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

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

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

	var errors []error

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DeleteClusterCDCJobRequestValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DeleteClusterCDCJobResponseValidationError{}

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

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

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

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

	var errors []error

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

	// no validation rules for SinkType

	// no validation rules for Limit

	// no validation rules for Offset

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListClusterChangefeedsRequestValidationError{}

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

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

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

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

	}

	// no validation rules for Total

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListClusterChangefeedsResponseValidationError{}

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

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

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

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

	var errors []error

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetChangefeedRequestValidationError{}

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

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

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

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

	// no validation rules for ExpectedArch

	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

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

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

	// no validation rules for ExpectedArch

	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 DeleteChangefeedRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *DeleteChangefeedRequest) Validate() error {
	return m.validate(false)
}

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

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

	var errors []error

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

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

	// no validation rules for ExpectedArch

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DeleteChangefeedRequestValidationError{}

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

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

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

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

	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 ScaleChangefeedRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *ScaleChangefeedRequest) Validate() error {
	return m.validate(false)
}

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

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

	var errors []error

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ScaleChangefeedRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for ChangefeedId

	// no validation rules for State

	// no validation rules for Arch

	// no validation rules for Rcu

	// no validation rules for DisplayName

	// no validation rules for SinkType

	// no validation rules for CheckpointTso

	// no validation rules for CheckpointTime

	// no validation rules for Error

	// no validation rules for CreatedAt

	// no validation rules for UpdatedAt

	// no validation rules for Provider

	// no validation rules for Region

	// no validation rules for Kubernetes

	// no validation rules for TicdcClusterName

	// no validation rules for StartTso

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ChangefeedInfoValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Provider

	// no validation rules for Region

	// no validation rules for Kubernetes

	// no validation rules for TicdcClusterName

	// no validation rules for Version

	// no validation rules for ExpectedSpecification

	// no validation rules for ActualSpecification

	// no validation rules for State

	// no validation rules for CreatedAt

	// no validation rules for UpdatedAt

	// no validation rules for DeletedAt

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = TiCDCClusterInfoValidationError{}

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

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

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

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

	var errors []error

	if _, ok := _ApplyConfigChangesRequest_ClusterType_NotInLookup[m.GetClusterType()]; ok {
		err := ApplyConfigChangesRequestValidationError{
			field:  "ClusterType",
			reason: "value must not be in list [CONFIG_CLUSTER_TYPE_UNSPECIFIED]",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if _, ok := ConfigClusterType_name[int32(m.GetClusterType())]; !ok {
		err := ApplyConfigChangesRequestValidationError{
			field:  "ClusterType",
			reason: "value must be one of the defined enum values",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

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

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

	if _, ok := _ApplyConfigChangesRequest_ConfigurationFile_NotInLookup[m.GetConfigurationFile()]; ok {
		err := ApplyConfigChangesRequestValidationError{
			field:  "ConfigurationFile",
			reason: "value must not be in list [CONFIG_FILE_TYPE_UNSPECIFIED]",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	if _, ok := ConfigFileType_name[int32(m.GetConfigurationFile())]; !ok {
		err := ApplyConfigChangesRequestValidationError{
			field:  "ConfigurationFile",
			reason: "value must be one of the defined enum values",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

	{
		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, ApplyConfigChangesRequestValidationError{
							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, ApplyConfigChangesRequestValidationError{
							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 ApplyConfigChangesRequestValidationError{
						field:  fmt.Sprintf("CustomParams[%v]", key),
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}

		}
	}

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ApplyConfigChangesRequestValidationError{}

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

var _ApplyConfigChangesRequest_ClusterType_NotInLookup = map[ConfigClusterType]struct{}{
	0: {},
}

var _ApplyConfigChangesRequest_ConfigurationFile_NotInLookup = map[ConfigFileType]struct{}{
	0: {},
}

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ApplyConfigChangesResponseValidationError{}

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

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