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

package console

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetIpWhitelistReqValidationError{}

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

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

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

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

	var errors []error

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetIpWhitelistRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetVpcInfoReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for AccountId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetVpcInfoRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for EndpointId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DescribeEndpointReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Phase

	// no validation rules for ErrorMessage

	// no validation rules for EndpointId

	// no validation rules for ServiceName

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DescribeEndpointRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for ServiceName

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateEndpointReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for EndpointId

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateEndpointRespValidationError{}

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

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

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

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

	var errors []error

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = EmptyRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for User

	// no validation rules for Password

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = MigrationTargetDBConnProfileValidationError{}

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

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

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

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

	var errors []error

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

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

	}

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetSourceTablesRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = MigrationSourceDBConnProfileValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Provider

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetSupportedSourcesReqValidationError{}

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

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

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

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

	var errors []error

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

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

	}

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetSupportedSourcesRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Id

	// no validation rules for DisplayName

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = SupportedSourceValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ConnType

	// no validation rules for DisplayName

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ConnMethodValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for Id

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetMigrationPrecheckReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Total

	// no validation rules for FailedCnt

	// no validation rules for WarnCnt

	// no validation rules for SuccessCnt

	// no validation rules for Status

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

	}

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = MigrationPrecheckValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Desc

	// no validation rules for Status

	// no validation rules for Solution

	// no validation rules for Reason

	// no validation rules for SolutionDocUrl

	// no validation rules for Type

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = PrecheckItemValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Id

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateMigrationPrecheckRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for Name

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

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

	}

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

	// no validation rules for Mode

	// no validation rules for FullInstanceMigration

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateMigrationTaskReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for User

	// no validation rules for Password

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = TargetValidationError{}

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

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

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

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

	var errors []error

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = BlockAllowRulesValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Id

	// no validation rules for Name

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

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

	}

	// no validation rules for TargetUser

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

	// no validation rules for Mode

	// no validation rules for State

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = MigrationTaskValidationError{}

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

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

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

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

	var errors []error

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

	// no validation rules for CurrentStep

	// no validation rules for Stage

	if m.DumpDetail != nil {

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

	}

	if m.LoadDetail != nil {

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

	}

	if m.SyncDetail != nil {

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

	}

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = SubTaskValidationError{}

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

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

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

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

	var errors []error

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

	// no validation rules for SourceTypeId

	if m.BaRules != nil {

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

	}

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = SourceValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Bps

	// no validation rules for Progress

	// no validation rules for TotalTables

	// no validation rules for CompletedTables

	// no validation rules for FinishedBytes

	// no validation rules for FinishedRows

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DumpDetailValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Bps

	// no validation rules for Progress

	// no validation rules for FinishedBytes

	// no validation rules for TotalBytes

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = LoadDetailValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Rps

	// no validation rules for Latency

	// no validation rules for Checkpoint

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = SyncDetailValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ConnType

	// no validation rules for Port

	// no validation rules for User

	// no validation rules for Password

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

	switch v := m.Endpoint.(type) {
	case *ConnProfile_EndpointId:
		if v == nil {
			err := ConnProfileValidationError{
				field:  "Endpoint",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}
		// no validation rules for EndpointId
	case *ConnProfile_Host:
		if v == nil {
			err := ConnProfileValidationError{
				field:  "Endpoint",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}
		// no validation rules for Host
	default:
		_ = v // ensures v is used
	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ConnProfileValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for SslCaContent

	// no validation rules for SslCertContent

	// no validation rules for SslKeyContent

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = SecurityValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for Id

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetMigrationTaskReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for PageToken

	// no validation rules for PageSize

	// no validation rules for OrderBy

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListMigrationTasksReqValidationError{}

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

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

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

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

	var errors []error

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

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

	}

	// no validation rules for TotalSize

	// no validation rules for NextPageToken

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListMigrationTasksRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for Id

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DeleteMigrationTaskReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for Id

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = PauseMigrationTaskReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for Id

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ResumeMigrationTaskReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for Id

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CancelMigrationPrecheckReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Schema

	// no validation rules for Table

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetSourceTablesResp_TableValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Schema

	// no validation rules for Table

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = BlockAllowRules_TableValidationError{}

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