// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: ng_agent/agent.proto

package agent

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

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

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

	var errors []error

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

	// no validation rules for ErrorMessage

	// no validation rules for MatchedSchemaFile

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = TableResultValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = PrecheckImportJobReqValidationError{}

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

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

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

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

	var errors []error

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

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

	}

	// no validation rules for ErrorMessage

	// no validation rules for TotalDataFilesCount

	// no validation rules for TotalTablesCount

	// no validation rules for IsTruncated

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = PrecheckImportJobRespValidationError{}

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

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

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

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

	}

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DropClusterTablesReqValidationError{}

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

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

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

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

	}

	// no validation rules for DataFormat

	// no validation rules for DataSource

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

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

	// no validation rules for AwsRoleArn

	// no validation rules for AwsExternalId

	// no validation rules for AwsAccessKeyId

	// no validation rules for AwsSecretAccessKey

	// no validation rules for SasToken

	// no validation rules for SourceUrl

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = PrecheckImportFileReqValidationError{}

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

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

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

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

	var errors []error

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

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

	}

	// no validation rules for DataFormat

	// no validation rules for DataSourceType

	// no validation rules for SourceUri

	// no validation rules for AwsRoleArn

	// no validation rules for AwsExternalId

	// no validation rules for AwsAccessKeyId

	// no validation rules for AwsSecretAccessKey

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

	// no validation rules for SasToken

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = SearchImportFilesReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for SourceUri

	// no validation rules for UseOssInternalEndpoint

	// no validation rules for MaxScanFiles

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetImportFilesReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TaskId

	// no validation rules for ClusterId

	// no validation rules for SourceUri

	// no validation rules for MaxScanFiles

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateImportFilesTaskReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TaskId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateImportFilesTaskRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TaskId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetImportFilesTaskReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TaskId

	// no validation rules for Status

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

	if m.Result != nil {

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetImportFilesTaskRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TaskId

	// no validation rules for ClusterId

	// no validation rules for SourceUri

	// no validation rules for MaxScanFiles

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

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

	}

	if m.CsvConfig != nil {

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateImportDataSizeEstimateTaskReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TaskId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateImportDataSizeEstimateTaskRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TaskId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetImportDataSizeEstimateTaskReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TaskId

	// no validation rules for Status

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

	if m.Result != nil {

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetImportDataSizeEstimateTaskRespValidationError{}

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

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

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

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

	var errors []error

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetImportFilesRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for User

	// no validation rules for Password

	// no validation rules for SourceUri

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

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

	}

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateSchemasReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for PemChanged

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

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

	}

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateSchemasRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TaskId

	// no validation rules for ClusterId

	// no validation rules for SourceUri

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

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

	}

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateSchemasTaskReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TaskId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateSchemasTaskRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TaskId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetSchemasTaskReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TaskId

	// no validation rules for Status

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

	if m.Result != nil {

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetSchemasTaskRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Separator

	// no validation rules for Delimiter

	// no validation rules for Header

	// no validation rules for BackslashEscape

	// no validation rules for TrimLastSeparator

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CsvConfigValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for SourceUri

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

	// no validation rules for FirstN

	// no validation rules for AwsRoleArn

	// no validation rules for AwsExternalId

	// no validation rules for AwsAccessKeyId

	// no validation rules for AwsSecretAccessKey

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = PreviewCsvFileReqValidationError{}

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

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

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

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

	var errors []error

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = SearchImportFilesRespValidationError{}

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

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

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

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

	var errors []error

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = PreviewCsvFileRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for RoleArn

	// no validation rules for S3Url

	// no validation rules for ExternalId

	// no validation rules for AwsAccessKeyId

	// no validation rules for AwsSecretAccessKey

	// no validation rules for EncryptKeySecret

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CheckS3AccessReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ErrorMsg

	// no validation rules for Region

	// no validation rules for PemChanged

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CheckS3AccessRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for GcsUrl

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CheckGcsAccessReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ErrorMsg

	// no validation rules for Region

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CheckGcsAccessRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for AzblobUrl

	// no validation rules for SasToken

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CheckAzblobAccessReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ErrorMsg

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CheckAzblobAccessRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OssUri

	// no validation rules for OssAccessKeyId

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

	// no validation rules for Endpoint

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CheckAliOSSAccessReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ErrorMsg

	// no validation rules for Region

	// no validation rules for PemChanged

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CheckAliOSSAccessRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for Namespace

	// no validation rules for User

	// no validation rules for Password

	// no validation rules for ReadTimeout

	// no validation rules for WriteTimeout

	// no validation rules for ProviderType

	// no validation rules for PasswordEncrypted

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ClusterValidationError{}

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

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

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

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

	var errors []error

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

	// no validation rules for TargetDb

	// no validation rules for TargetTable

	// no validation rules for SourceUri

	// no validation rules for Separator

	// no validation rules for Delimiter

	// no validation rules for BackslashEscape

	// no validation rules for IgnoreOneLine

	// no validation rules for Terminator

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = LoadDataReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ErrMessage

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = LoadDataRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for LightningConfig

	// no validation rules for ClusterNamespace

	// no validation rules for ClusterNamePrefix

	// no validation rules for GenGcpCredential

	// no validation rules for ProviderType

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = LightningPrecheckReqValidationError{}

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

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

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

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

	var errors []error

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = LightningPrecheckRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for CheckItem

	// no validation rules for HasPassed

	// no validation rules for Msg

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CheckResultValidationError{}

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

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

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

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

	var errors []error

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

	// no validation rules for Sql

	// no validation rules for ColumnNum

	// no validation rules for TypedColumns

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExecSQLReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ErrorMsg

	// no validation rules for SqlResult

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

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

	}

	// no validation rules for PemChanged

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExecSQLRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TaskId

	// no validation rules for ClusterId

	// no validation rules for Sql

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateImportIntoJobTaskReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TaskId

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

	return nil
}

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

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

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

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

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

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

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

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

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

// Error satisfies the builtin error interface
func (e CreateImportIntoJobTaskRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sCreateImportIntoJobTaskResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = CreateImportIntoJobTaskRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = CreateImportIntoJobTaskRespValidationError{}

// Validate checks the field values on BatchCreateImportIntoJobTasksReq with
// the rules defined in the proto definition for this message. If any rules
// are violated, the first error encountered is returned, or nil if there are
// no violations.
func (m *BatchCreateImportIntoJobTasksReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BatchCreateImportIntoJobTasksReq with
// the rules defined in the proto definition for this message. If any rules
// are violated, the result is a list of violation errors wrapped in
// BatchCreateImportIntoJobTasksReqMultiError, or nil if none found.
func (m *BatchCreateImportIntoJobTasksReq) ValidateAll() error {
	return m.validate(true)
}

func (m *BatchCreateImportIntoJobTasksReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	if all {
		switch v := interface{}(m.GetCluster()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BatchCreateImportIntoJobTasksReqValidationError{
					field:  "Cluster",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BatchCreateImportIntoJobTasksReqValidationError{
					field:  "Cluster",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return BatchCreateImportIntoJobTasksReqValidationError{
				field:  "Cluster",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	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, BatchCreateImportIntoJobTasksReqValidationError{
						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, BatchCreateImportIntoJobTasksReqValidationError{
						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 BatchCreateImportIntoJobTasksReqValidationError{
					field:  fmt.Sprintf("Tasks[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return BatchCreateImportIntoJobTasksReqMultiError(errors)
	}

	return nil
}

// BatchCreateImportIntoJobTasksReqMultiError is an error wrapping multiple
// validation errors returned by
// BatchCreateImportIntoJobTasksReq.ValidateAll() if the designated
// constraints aren't met.
type BatchCreateImportIntoJobTasksReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BatchCreateImportIntoJobTasksReqMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m BatchCreateImportIntoJobTasksReqMultiError) AllErrors() []error { return m }

// BatchCreateImportIntoJobTasksReqValidationError is the validation error
// returned by BatchCreateImportIntoJobTasksReq.Validate if the designated
// constraints aren't met.
type BatchCreateImportIntoJobTasksReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BatchCreateImportIntoJobTasksReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BatchCreateImportIntoJobTasksReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BatchCreateImportIntoJobTasksReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BatchCreateImportIntoJobTasksReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BatchCreateImportIntoJobTasksReqValidationError) ErrorName() string {
	return "BatchCreateImportIntoJobTasksReqValidationError"
}

// Error satisfies the builtin error interface
func (e BatchCreateImportIntoJobTasksReqValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sBatchCreateImportIntoJobTasksReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BatchCreateImportIntoJobTasksReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BatchCreateImportIntoJobTasksReqValidationError{}

// Validate checks the field values on BatchCreateImportIntoJobTasksResp with
// the rules defined in the proto definition for this message. If any rules
// are violated, the first error encountered is returned, or nil if there are
// no violations.
func (m *BatchCreateImportIntoJobTasksResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BatchCreateImportIntoJobTasksResp
// with the rules defined in the proto definition for this message. If any
// rules are violated, the result is a list of violation errors wrapped in
// BatchCreateImportIntoJobTasksRespMultiError, or nil if none found.
func (m *BatchCreateImportIntoJobTasksResp) ValidateAll() error {
	return m.validate(true)
}

func (m *BatchCreateImportIntoJobTasksResp) 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, BatchCreateImportIntoJobTasksRespValidationError{
						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, BatchCreateImportIntoJobTasksRespValidationError{
						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 BatchCreateImportIntoJobTasksRespValidationError{
					field:  fmt.Sprintf("Tasks[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return BatchCreateImportIntoJobTasksRespMultiError(errors)
	}

	return nil
}

// BatchCreateImportIntoJobTasksRespMultiError is an error wrapping multiple
// validation errors returned by
// BatchCreateImportIntoJobTasksResp.ValidateAll() if the designated
// constraints aren't met.
type BatchCreateImportIntoJobTasksRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BatchCreateImportIntoJobTasksRespMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m BatchCreateImportIntoJobTasksRespMultiError) AllErrors() []error { return m }

// BatchCreateImportIntoJobTasksRespValidationError is the validation error
// returned by BatchCreateImportIntoJobTasksResp.Validate if the designated
// constraints aren't met.
type BatchCreateImportIntoJobTasksRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BatchCreateImportIntoJobTasksRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BatchCreateImportIntoJobTasksRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BatchCreateImportIntoJobTasksRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BatchCreateImportIntoJobTasksRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BatchCreateImportIntoJobTasksRespValidationError) ErrorName() string {
	return "BatchCreateImportIntoJobTasksRespValidationError"
}

// Error satisfies the builtin error interface
func (e BatchCreateImportIntoJobTasksRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sBatchCreateImportIntoJobTasksResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BatchCreateImportIntoJobTasksRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BatchCreateImportIntoJobTasksRespValidationError{}

// Validate checks the field values on GetImportIntoJobTaskReq with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetImportIntoJobTaskReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetImportIntoJobTaskReq with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetImportIntoJobTaskReqMultiError, or nil if none found.
func (m *GetImportIntoJobTaskReq) ValidateAll() error {
	return m.validate(true)
}

func (m *GetImportIntoJobTaskReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for TaskId

	if len(errors) > 0 {
		return GetImportIntoJobTaskReqMultiError(errors)
	}

	return nil
}

// GetImportIntoJobTaskReqMultiError is an error wrapping multiple validation
// errors returned by GetImportIntoJobTaskReq.ValidateAll() if the designated
// constraints aren't met.
type GetImportIntoJobTaskReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetImportIntoJobTaskReqMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetImportIntoJobTaskReqMultiError) AllErrors() []error { return m }

// GetImportIntoJobTaskReqValidationError is the validation error returned by
// GetImportIntoJobTaskReq.Validate if the designated constraints aren't met.
type GetImportIntoJobTaskReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetImportIntoJobTaskReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetImportIntoJobTaskReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetImportIntoJobTaskReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetImportIntoJobTaskReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetImportIntoJobTaskReqValidationError) ErrorName() string {
	return "GetImportIntoJobTaskReqValidationError"
}

// Error satisfies the builtin error interface
func (e GetImportIntoJobTaskReqValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetImportIntoJobTaskReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetImportIntoJobTaskReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetImportIntoJobTaskReqValidationError{}

// Validate checks the field values on GetImportIntoJobTaskResp with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetImportIntoJobTaskResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetImportIntoJobTaskResp with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetImportIntoJobTaskRespMultiError, or nil if none found.
func (m *GetImportIntoJobTaskResp) ValidateAll() error {
	return m.validate(true)
}

func (m *GetImportIntoJobTaskResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for TaskId

	// no validation rules for Status

	if m.ErrorMsg != nil {
		// no validation rules for ErrorMsg
	}

	if m.Result != nil {

		if all {
			switch v := interface{}(m.GetResult()).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, GetImportIntoJobTaskRespValidationError{
						field:  "Result",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, GetImportIntoJobTaskRespValidationError{
						field:  "Result",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(m.GetResult()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return GetImportIntoJobTaskRespValidationError{
					field:  "Result",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return GetImportIntoJobTaskRespMultiError(errors)
	}

	return nil
}

// GetImportIntoJobTaskRespMultiError is an error wrapping multiple validation
// errors returned by GetImportIntoJobTaskResp.ValidateAll() if the designated
// constraints aren't met.
type GetImportIntoJobTaskRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetImportIntoJobTaskRespMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetImportIntoJobTaskRespMultiError) AllErrors() []error { return m }

// GetImportIntoJobTaskRespValidationError is the validation error returned by
// GetImportIntoJobTaskResp.Validate if the designated constraints aren't met.
type GetImportIntoJobTaskRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetImportIntoJobTaskRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetImportIntoJobTaskRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetImportIntoJobTaskRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetImportIntoJobTaskRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetImportIntoJobTaskRespValidationError) ErrorName() string {
	return "GetImportIntoJobTaskRespValidationError"
}

// Error satisfies the builtin error interface
func (e GetImportIntoJobTaskRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetImportIntoJobTaskResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetImportIntoJobTaskRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetImportIntoJobTaskRespValidationError{}

// Validate checks the field values on BatchGetImportIntoJobTasksReq with the
// rules defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *BatchGetImportIntoJobTasksReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BatchGetImportIntoJobTasksReq with
// the rules defined in the proto definition for this message. If any rules
// are violated, the result is a list of violation errors wrapped in
// BatchGetImportIntoJobTasksReqMultiError, or nil if none found.
func (m *BatchGetImportIntoJobTasksReq) ValidateAll() error {
	return m.validate(true)
}

func (m *BatchGetImportIntoJobTasksReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return BatchGetImportIntoJobTasksReqMultiError(errors)
	}

	return nil
}

// BatchGetImportIntoJobTasksReqMultiError is an error wrapping multiple
// validation errors returned by BatchGetImportIntoJobTasksReq.ValidateAll()
// if the designated constraints aren't met.
type BatchGetImportIntoJobTasksReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BatchGetImportIntoJobTasksReqMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m BatchGetImportIntoJobTasksReqMultiError) AllErrors() []error { return m }

// BatchGetImportIntoJobTasksReqValidationError is the validation error
// returned by BatchGetImportIntoJobTasksReq.Validate if the designated
// constraints aren't met.
type BatchGetImportIntoJobTasksReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BatchGetImportIntoJobTasksReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BatchGetImportIntoJobTasksReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BatchGetImportIntoJobTasksReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BatchGetImportIntoJobTasksReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BatchGetImportIntoJobTasksReqValidationError) ErrorName() string {
	return "BatchGetImportIntoJobTasksReqValidationError"
}

// Error satisfies the builtin error interface
func (e BatchGetImportIntoJobTasksReqValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sBatchGetImportIntoJobTasksReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BatchGetImportIntoJobTasksReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BatchGetImportIntoJobTasksReqValidationError{}

// Validate checks the field values on BatchGetImportIntoJobTasksResp with the
// rules defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *BatchGetImportIntoJobTasksResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BatchGetImportIntoJobTasksResp with
// the rules defined in the proto definition for this message. If any rules
// are violated, the result is a list of violation errors wrapped in
// BatchGetImportIntoJobTasksRespMultiError, or nil if none found.
func (m *BatchGetImportIntoJobTasksResp) ValidateAll() error {
	return m.validate(true)
}

func (m *BatchGetImportIntoJobTasksResp) 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, BatchGetImportIntoJobTasksRespValidationError{
						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, BatchGetImportIntoJobTasksRespValidationError{
						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 BatchGetImportIntoJobTasksRespValidationError{
					field:  fmt.Sprintf("Tasks[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return BatchGetImportIntoJobTasksRespMultiError(errors)
	}

	return nil
}

// BatchGetImportIntoJobTasksRespMultiError is an error wrapping multiple
// validation errors returned by BatchGetImportIntoJobTasksResp.ValidateAll()
// if the designated constraints aren't met.
type BatchGetImportIntoJobTasksRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BatchGetImportIntoJobTasksRespMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m BatchGetImportIntoJobTasksRespMultiError) AllErrors() []error { return m }

// BatchGetImportIntoJobTasksRespValidationError is the validation error
// returned by BatchGetImportIntoJobTasksResp.Validate if the designated
// constraints aren't met.
type BatchGetImportIntoJobTasksRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BatchGetImportIntoJobTasksRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BatchGetImportIntoJobTasksRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BatchGetImportIntoJobTasksRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BatchGetImportIntoJobTasksRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BatchGetImportIntoJobTasksRespValidationError) ErrorName() string {
	return "BatchGetImportIntoJobTasksRespValidationError"
}

// Error satisfies the builtin error interface
func (e BatchGetImportIntoJobTasksRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sBatchGetImportIntoJobTasksResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BatchGetImportIntoJobTasksRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BatchGetImportIntoJobTasksRespValidationError{}

// Validate checks the field values on BatchCancelImportIntoJobsReq with the
// rules defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *BatchCancelImportIntoJobsReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BatchCancelImportIntoJobsReq with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// BatchCancelImportIntoJobsReqMultiError, or nil if none found.
func (m *BatchCancelImportIntoJobsReq) ValidateAll() error {
	return m.validate(true)
}

func (m *BatchCancelImportIntoJobsReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	if all {
		switch v := interface{}(m.GetCluster()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, BatchCancelImportIntoJobsReqValidationError{
					field:  "Cluster",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, BatchCancelImportIntoJobsReqValidationError{
					field:  "Cluster",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return BatchCancelImportIntoJobsReqValidationError{
				field:  "Cluster",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return BatchCancelImportIntoJobsReqMultiError(errors)
	}

	return nil
}

// BatchCancelImportIntoJobsReqMultiError is an error wrapping multiple
// validation errors returned by BatchCancelImportIntoJobsReq.ValidateAll() if
// the designated constraints aren't met.
type BatchCancelImportIntoJobsReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BatchCancelImportIntoJobsReqMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m BatchCancelImportIntoJobsReqMultiError) AllErrors() []error { return m }

// BatchCancelImportIntoJobsReqValidationError is the validation error returned
// by BatchCancelImportIntoJobsReq.Validate if the designated constraints
// aren't met.
type BatchCancelImportIntoJobsReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BatchCancelImportIntoJobsReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BatchCancelImportIntoJobsReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BatchCancelImportIntoJobsReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BatchCancelImportIntoJobsReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BatchCancelImportIntoJobsReqValidationError) ErrorName() string {
	return "BatchCancelImportIntoJobsReqValidationError"
}

// Error satisfies the builtin error interface
func (e BatchCancelImportIntoJobsReqValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sBatchCancelImportIntoJobsReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BatchCancelImportIntoJobsReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BatchCancelImportIntoJobsReqValidationError{}

// Validate checks the field values on BatchCancelImportIntoJobsResp with the
// rules defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *BatchCancelImportIntoJobsResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BatchCancelImportIntoJobsResp with
// the rules defined in the proto definition for this message. If any rules
// are violated, the result is a list of violation errors wrapped in
// BatchCancelImportIntoJobsRespMultiError, or nil if none found.
func (m *BatchCancelImportIntoJobsResp) ValidateAll() error {
	return m.validate(true)
}

func (m *BatchCancelImportIntoJobsResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	for idx, item := range m.GetResults() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, BatchCancelImportIntoJobsRespValidationError{
						field:  fmt.Sprintf("Results[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, BatchCancelImportIntoJobsRespValidationError{
						field:  fmt.Sprintf("Results[%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 BatchCancelImportIntoJobsRespValidationError{
					field:  fmt.Sprintf("Results[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return BatchCancelImportIntoJobsRespMultiError(errors)
	}

	return nil
}

// BatchCancelImportIntoJobsRespMultiError is an error wrapping multiple
// validation errors returned by BatchCancelImportIntoJobsResp.ValidateAll()
// if the designated constraints aren't met.
type BatchCancelImportIntoJobsRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BatchCancelImportIntoJobsRespMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m BatchCancelImportIntoJobsRespMultiError) AllErrors() []error { return m }

// BatchCancelImportIntoJobsRespValidationError is the validation error
// returned by BatchCancelImportIntoJobsResp.Validate if the designated
// constraints aren't met.
type BatchCancelImportIntoJobsRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BatchCancelImportIntoJobsRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BatchCancelImportIntoJobsRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BatchCancelImportIntoJobsRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BatchCancelImportIntoJobsRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BatchCancelImportIntoJobsRespValidationError) ErrorName() string {
	return "BatchCancelImportIntoJobsRespValidationError"
}

// Error satisfies the builtin error interface
func (e BatchCancelImportIntoJobsRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sBatchCancelImportIntoJobsResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BatchCancelImportIntoJobsRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BatchCancelImportIntoJobsRespValidationError{}

// Validate checks the field values on LightningSourcePreviewReq with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *LightningSourcePreviewReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on LightningSourcePreviewReq with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// LightningSourcePreviewReqMultiError, or nil if none found.
func (m *LightningSourcePreviewReq) ValidateAll() error {
	return m.validate(true)
}

func (m *LightningSourcePreviewReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for LightningConfig

	// no validation rules for ClusterNamespace

	// no validation rules for ClusterNamePrefix

	if len(errors) > 0 {
		return LightningSourcePreviewReqMultiError(errors)
	}

	return nil
}

// LightningSourcePreviewReqMultiError is an error wrapping multiple validation
// errors returned by LightningSourcePreviewReq.ValidateAll() if the
// designated constraints aren't met.
type LightningSourcePreviewReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m LightningSourcePreviewReqMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m LightningSourcePreviewReqMultiError) AllErrors() []error { return m }

// LightningSourcePreviewReqValidationError is the validation error returned by
// LightningSourcePreviewReq.Validate if the designated constraints aren't met.
type LightningSourcePreviewReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e LightningSourcePreviewReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e LightningSourcePreviewReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e LightningSourcePreviewReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e LightningSourcePreviewReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e LightningSourcePreviewReqValidationError) ErrorName() string {
	return "LightningSourcePreviewReqValidationError"
}

// Error satisfies the builtin error interface
func (e LightningSourcePreviewReqValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sLightningSourcePreviewReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = LightningSourcePreviewReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = LightningSourcePreviewReqValidationError{}

// Validate checks the field values on LightningSourcePreviewResp with the
// rules defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *LightningSourcePreviewResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on LightningSourcePreviewResp with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// LightningSourcePreviewRespMultiError, or nil if none found.
func (m *LightningSourcePreviewResp) ValidateAll() error {
	return m.validate(true)
}

func (m *LightningSourcePreviewResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	for idx, item := range m.GetSchemas() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, LightningSourcePreviewRespValidationError{
						field:  fmt.Sprintf("Schemas[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, LightningSourcePreviewRespValidationError{
						field:  fmt.Sprintf("Schemas[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return LightningSourcePreviewRespValidationError{
					field:  fmt.Sprintf("Schemas[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if all {
		switch v := interface{}(m.GetBaseResp()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, LightningSourcePreviewRespValidationError{
					field:  "BaseResp",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, LightningSourcePreviewRespValidationError{
					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 LightningSourcePreviewRespValidationError{
				field:  "BaseResp",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return LightningSourcePreviewRespMultiError(errors)
	}

	return nil
}

// LightningSourcePreviewRespMultiError is an error wrapping multiple
// validation errors returned by LightningSourcePreviewResp.ValidateAll() if
// the designated constraints aren't met.
type LightningSourcePreviewRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m LightningSourcePreviewRespMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m LightningSourcePreviewRespMultiError) AllErrors() []error { return m }

// LightningSourcePreviewRespValidationError is the validation error returned
// by LightningSourcePreviewResp.Validate if the designated constraints aren't met.
type LightningSourcePreviewRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e LightningSourcePreviewRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e LightningSourcePreviewRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e LightningSourcePreviewRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e LightningSourcePreviewRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e LightningSourcePreviewRespValidationError) ErrorName() string {
	return "LightningSourcePreviewRespValidationError"
}

// Error satisfies the builtin error interface
func (e LightningSourcePreviewRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sLightningSourcePreviewResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = LightningSourcePreviewRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = LightningSourcePreviewRespValidationError{}

// Validate checks the field values on EstimateSourceDataSizeReq with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *EstimateSourceDataSizeReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on EstimateSourceDataSizeReq with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// EstimateSourceDataSizeReqMultiError, or nil if none found.
func (m *EstimateSourceDataSizeReq) ValidateAll() error {
	return m.validate(true)
}

func (m *EstimateSourceDataSizeReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for LightningConfig

	// no validation rules for ClusterNamespace

	// no validation rules for ClusterNamePrefix

	if len(errors) > 0 {
		return EstimateSourceDataSizeReqMultiError(errors)
	}

	return nil
}

// EstimateSourceDataSizeReqMultiError is an error wrapping multiple validation
// errors returned by EstimateSourceDataSizeReq.ValidateAll() if the
// designated constraints aren't met.
type EstimateSourceDataSizeReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m EstimateSourceDataSizeReqMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m EstimateSourceDataSizeReqMultiError) AllErrors() []error { return m }

// EstimateSourceDataSizeReqValidationError is the validation error returned by
// EstimateSourceDataSizeReq.Validate if the designated constraints aren't met.
type EstimateSourceDataSizeReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e EstimateSourceDataSizeReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e EstimateSourceDataSizeReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e EstimateSourceDataSizeReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e EstimateSourceDataSizeReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e EstimateSourceDataSizeReqValidationError) ErrorName() string {
	return "EstimateSourceDataSizeReqValidationError"
}

// Error satisfies the builtin error interface
func (e EstimateSourceDataSizeReqValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sEstimateSourceDataSizeReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = EstimateSourceDataSizeReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = EstimateSourceDataSizeReqValidationError{}

// Validate checks the field values on EstimateSourceDataSizeResp with the
// rules defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *EstimateSourceDataSizeResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on EstimateSourceDataSizeResp with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// EstimateSourceDataSizeRespMultiError, or nil if none found.
func (m *EstimateSourceDataSizeResp) ValidateAll() error {
	return m.validate(true)
}

func (m *EstimateSourceDataSizeResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for SizeWithIndex

	// no validation rules for SizeWithoutIndex

	if all {
		switch v := interface{}(m.GetBaseResp()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, EstimateSourceDataSizeRespValidationError{
					field:  "BaseResp",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, EstimateSourceDataSizeRespValidationError{
					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 EstimateSourceDataSizeRespValidationError{
				field:  "BaseResp",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return EstimateSourceDataSizeRespMultiError(errors)
	}

	return nil
}

// EstimateSourceDataSizeRespMultiError is an error wrapping multiple
// validation errors returned by EstimateSourceDataSizeResp.ValidateAll() if
// the designated constraints aren't met.
type EstimateSourceDataSizeRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m EstimateSourceDataSizeRespMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m EstimateSourceDataSizeRespMultiError) AllErrors() []error { return m }

// EstimateSourceDataSizeRespValidationError is the validation error returned
// by EstimateSourceDataSizeResp.Validate if the designated constraints aren't met.
type EstimateSourceDataSizeRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e EstimateSourceDataSizeRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e EstimateSourceDataSizeRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e EstimateSourceDataSizeRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e EstimateSourceDataSizeRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e EstimateSourceDataSizeRespValidationError) ErrorName() string {
	return "EstimateSourceDataSizeRespValidationError"
}

// Error satisfies the builtin error interface
func (e EstimateSourceDataSizeRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sEstimateSourceDataSizeResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = EstimateSourceDataSizeRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = EstimateSourceDataSizeRespValidationError{}

// Validate checks the field values on CheckDBConnectivityReq with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *CheckDBConnectivityReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on CheckDBConnectivityReq with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// CheckDBConnectivityReqMultiError, or nil if none found.
func (m *CheckDBConnectivityReq) ValidateAll() error {
	return m.validate(true)
}

func (m *CheckDBConnectivityReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Host

	// no validation rules for Port

	// no validation rules for User

	// no validation rules for Password

	// no validation rules for SslCa

	// no validation rules for SslCert

	// no validation rules for SslKey

	// no validation rules for RequestId

	if len(errors) > 0 {
		return CheckDBConnectivityReqMultiError(errors)
	}

	return nil
}

// CheckDBConnectivityReqMultiError is an error wrapping multiple validation
// errors returned by CheckDBConnectivityReq.ValidateAll() if the designated
// constraints aren't met.
type CheckDBConnectivityReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m CheckDBConnectivityReqMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m CheckDBConnectivityReqMultiError) AllErrors() []error { return m }

// CheckDBConnectivityReqValidationError is the validation error returned by
// CheckDBConnectivityReq.Validate if the designated constraints aren't met.
type CheckDBConnectivityReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e CheckDBConnectivityReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e CheckDBConnectivityReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e CheckDBConnectivityReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e CheckDBConnectivityReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e CheckDBConnectivityReqValidationError) ErrorName() string {
	return "CheckDBConnectivityReqValidationError"
}

// Error satisfies the builtin error interface
func (e CheckDBConnectivityReqValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sCheckDBConnectivityReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = CheckDBConnectivityReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = CheckDBConnectivityReqValidationError{}

// Validate checks the field values on CheckDBConnectivityResp with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *CheckDBConnectivityResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on CheckDBConnectivityResp with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// CheckDBConnectivityRespMultiError, or nil if none found.
func (m *CheckDBConnectivityResp) ValidateAll() error {
	return m.validate(true)
}

func (m *CheckDBConnectivityResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for DbVersion

	if len(errors) > 0 {
		return CheckDBConnectivityRespMultiError(errors)
	}

	return nil
}

// CheckDBConnectivityRespMultiError is an error wrapping multiple validation
// errors returned by CheckDBConnectivityResp.ValidateAll() if the designated
// constraints aren't met.
type CheckDBConnectivityRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m CheckDBConnectivityRespMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m CheckDBConnectivityRespMultiError) AllErrors() []error { return m }

// CheckDBConnectivityRespValidationError is the validation error returned by
// CheckDBConnectivityResp.Validate if the designated constraints aren't met.
type CheckDBConnectivityRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e CheckDBConnectivityRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e CheckDBConnectivityRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e CheckDBConnectivityRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e CheckDBConnectivityRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e CheckDBConnectivityRespValidationError) ErrorName() string {
	return "CheckDBConnectivityRespValidationError"
}

// Error satisfies the builtin error interface
func (e CheckDBConnectivityRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sCheckDBConnectivityResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = CheckDBConnectivityRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = CheckDBConnectivityRespValidationError{}

// Validate checks the field values on GetTiDBServerSecretReq with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetTiDBServerSecretReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetTiDBServerSecretReq with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetTiDBServerSecretReqMultiError, or nil if none found.
func (m *GetTiDBServerSecretReq) ValidateAll() error {
	return m.validate(true)
}

func (m *GetTiDBServerSecretReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterNamePrefix

	// no validation rules for ClusterNamespace

	// no validation rules for ProviderType

	// no validation rules for RequestId

	if len(errors) > 0 {
		return GetTiDBServerSecretReqMultiError(errors)
	}

	return nil
}

// GetTiDBServerSecretReqMultiError is an error wrapping multiple validation
// errors returned by GetTiDBServerSecretReq.ValidateAll() if the designated
// constraints aren't met.
type GetTiDBServerSecretReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetTiDBServerSecretReqMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetTiDBServerSecretReqMultiError) AllErrors() []error { return m }

// GetTiDBServerSecretReqValidationError is the validation error returned by
// GetTiDBServerSecretReq.Validate if the designated constraints aren't met.
type GetTiDBServerSecretReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetTiDBServerSecretReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetTiDBServerSecretReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetTiDBServerSecretReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetTiDBServerSecretReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetTiDBServerSecretReqValidationError) ErrorName() string {
	return "GetTiDBServerSecretReqValidationError"
}

// Error satisfies the builtin error interface
func (e GetTiDBServerSecretReqValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetTiDBServerSecretReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetTiDBServerSecretReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetTiDBServerSecretReqValidationError{}

// Validate checks the field values on GetTiDBServerSecretResp with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetTiDBServerSecretResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetTiDBServerSecretResp with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetTiDBServerSecretRespMultiError, or nil if none found.
func (m *GetTiDBServerSecretResp) ValidateAll() error {
	return m.validate(true)
}

func (m *GetTiDBServerSecretResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for SslCa

	// no validation rules for SslCert

	// no validation rules for SslKey

	if len(errors) > 0 {
		return GetTiDBServerSecretRespMultiError(errors)
	}

	return nil
}

// GetTiDBServerSecretRespMultiError is an error wrapping multiple validation
// errors returned by GetTiDBServerSecretResp.ValidateAll() if the designated
// constraints aren't met.
type GetTiDBServerSecretRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetTiDBServerSecretRespMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetTiDBServerSecretRespMultiError) AllErrors() []error { return m }

// GetTiDBServerSecretRespValidationError is the validation error returned by
// GetTiDBServerSecretResp.Validate if the designated constraints aren't met.
type GetTiDBServerSecretRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetTiDBServerSecretRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetTiDBServerSecretRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetTiDBServerSecretRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetTiDBServerSecretRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetTiDBServerSecretRespValidationError) ErrorName() string {
	return "GetTiDBServerSecretRespValidationError"
}

// Error satisfies the builtin error interface
func (e GetTiDBServerSecretRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetTiDBServerSecretResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetTiDBServerSecretRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetTiDBServerSecretRespValidationError{}

// Validate checks the field values on GetClusterClientSecretReq with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetClusterClientSecretReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetClusterClientSecretReq with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetClusterClientSecretReqMultiError, or nil if none found.
func (m *GetClusterClientSecretReq) ValidateAll() error {
	return m.validate(true)
}

func (m *GetClusterClientSecretReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterNamePrefix

	// no validation rules for ClusterNamespace

	// no validation rules for ProviderType

	// no validation rules for RequestId

	if len(errors) > 0 {
		return GetClusterClientSecretReqMultiError(errors)
	}

	return nil
}

// GetClusterClientSecretReqMultiError is an error wrapping multiple validation
// errors returned by GetClusterClientSecretReq.ValidateAll() if the
// designated constraints aren't met.
type GetClusterClientSecretReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetClusterClientSecretReqMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetClusterClientSecretReqMultiError) AllErrors() []error { return m }

// GetClusterClientSecretReqValidationError is the validation error returned by
// GetClusterClientSecretReq.Validate if the designated constraints aren't met.
type GetClusterClientSecretReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetClusterClientSecretReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetClusterClientSecretReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetClusterClientSecretReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetClusterClientSecretReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetClusterClientSecretReqValidationError) ErrorName() string {
	return "GetClusterClientSecretReqValidationError"
}

// Error satisfies the builtin error interface
func (e GetClusterClientSecretReqValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetClusterClientSecretReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetClusterClientSecretReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetClusterClientSecretReqValidationError{}

// Validate checks the field values on GetClusterClientSecretResp with the
// rules defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetClusterClientSecretResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetClusterClientSecretResp with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetClusterClientSecretRespMultiError, or nil if none found.
func (m *GetClusterClientSecretResp) ValidateAll() error {
	return m.validate(true)
}

func (m *GetClusterClientSecretResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for SslCa

	// no validation rules for SslCert

	// no validation rules for SslKey

	if len(errors) > 0 {
		return GetClusterClientSecretRespMultiError(errors)
	}

	return nil
}

// GetClusterClientSecretRespMultiError is an error wrapping multiple
// validation errors returned by GetClusterClientSecretResp.ValidateAll() if
// the designated constraints aren't met.
type GetClusterClientSecretRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetClusterClientSecretRespMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetClusterClientSecretRespMultiError) AllErrors() []error { return m }

// GetClusterClientSecretRespValidationError is the validation error returned
// by GetClusterClientSecretResp.Validate if the designated constraints aren't met.
type GetClusterClientSecretRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetClusterClientSecretRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetClusterClientSecretRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetClusterClientSecretRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetClusterClientSecretRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetClusterClientSecretRespValidationError) ErrorName() string {
	return "GetClusterClientSecretRespValidationError"
}

// Error satisfies the builtin error interface
func (e GetClusterClientSecretRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetClusterClientSecretResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetClusterClientSecretRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetClusterClientSecretRespValidationError{}

// Validate checks the field values on ImportsSchemaMeta with the rules defined
// in the proto definition for this message. If any rules are violated, the
// first error encountered is returned, or nil if there are no violations.
func (m *ImportsSchemaMeta) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ImportsSchemaMeta with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// ImportsSchemaMetaMultiError, or nil if none found.
func (m *ImportsSchemaMeta) ValidateAll() error {
	return m.validate(true)
}

func (m *ImportsSchemaMeta) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for CreateFile

	// no validation rules for MaxDataFileSize

	{
		sorted_keys := make([]string, len(m.GetTablesMeta()))
		i := 0
		for key := range m.GetTablesMeta() {
			sorted_keys[i] = key
			i++
		}
		sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] })
		for _, key := range sorted_keys {
			val := m.GetTablesMeta()[key]
			_ = val

			// no validation rules for TablesMeta[key]

			if all {
				switch v := interface{}(val).(type) {
				case interface{ ValidateAll() error }:
					if err := v.ValidateAll(); err != nil {
						errors = append(errors, ImportsSchemaMetaValidationError{
							field:  fmt.Sprintf("TablesMeta[%v]", key),
							reason: "embedded message failed validation",
							cause:  err,
						})
					}
				case interface{ Validate() error }:
					if err := v.Validate(); err != nil {
						errors = append(errors, ImportsSchemaMetaValidationError{
							field:  fmt.Sprintf("TablesMeta[%v]", key),
							reason: "embedded message failed validation",
							cause:  err,
						})
					}
				}
			} else if v, ok := interface{}(val).(interface{ Validate() error }); ok {
				if err := v.Validate(); err != nil {
					return ImportsSchemaMetaValidationError{
						field:  fmt.Sprintf("TablesMeta[%v]", key),
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}

		}
	}

	// no validation rules for CreateFileSize

	if len(errors) > 0 {
		return ImportsSchemaMetaMultiError(errors)
	}

	return nil
}

// ImportsSchemaMetaMultiError is an error wrapping multiple validation errors
// returned by ImportsSchemaMeta.ValidateAll() if the designated constraints
// aren't met.
type ImportsSchemaMetaMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ImportsSchemaMetaMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ImportsSchemaMetaMultiError) AllErrors() []error { return m }

// ImportsSchemaMetaValidationError is the validation error returned by
// ImportsSchemaMeta.Validate if the designated constraints aren't met.
type ImportsSchemaMetaValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ImportsSchemaMetaValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ImportsSchemaMetaValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ImportsSchemaMetaValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ImportsSchemaMetaValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ImportsSchemaMetaValidationError) ErrorName() string {
	return "ImportsSchemaMetaValidationError"
}

// Error satisfies the builtin error interface
func (e ImportsSchemaMetaValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sImportsSchemaMeta.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ImportsSchemaMetaValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ImportsSchemaMetaValidationError{}

// Validate checks the field values on ImportsTableMeta with the rules defined
// in the proto definition for this message. If any rules are violated, the
// first error encountered is returned, or nil if there are no violations.
func (m *ImportsTableMeta) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ImportsTableMeta with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// ImportsTableMetaMultiError, or nil if none found.
func (m *ImportsTableMeta) ValidateAll() error {
	return m.validate(true)
}

func (m *ImportsTableMeta) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Name

	// no validation rules for CreateFile

	// no validation rules for DataFileNum

	// no validation rules for DataFileSize

	// no validation rules for FirstDataFile

	// no validation rules for MaxDataFileSize

	// no validation rules for CreateFileSize

	if len(errors) > 0 {
		return ImportsTableMetaMultiError(errors)
	}

	return nil
}

// ImportsTableMetaMultiError is an error wrapping multiple validation errors
// returned by ImportsTableMeta.ValidateAll() if the designated constraints
// aren't met.
type ImportsTableMetaMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ImportsTableMetaMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ImportsTableMetaMultiError) AllErrors() []error { return m }

// ImportsTableMetaValidationError is the validation error returned by
// ImportsTableMeta.Validate if the designated constraints aren't met.
type ImportsTableMetaValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ImportsTableMetaValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ImportsTableMetaValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ImportsTableMetaValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ImportsTableMetaValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ImportsTableMetaValidationError) ErrorName() string { return "ImportsTableMetaValidationError" }

// Error satisfies the builtin error interface
func (e ImportsTableMetaValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sImportsTableMeta.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ImportsTableMetaValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ImportsTableMetaValidationError{}

// Validate checks the field values on GetImportSchemasMetaReq with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetImportSchemasMetaReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetImportSchemasMetaReq with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetImportSchemasMetaReqMultiError, or nil if none found.
func (m *GetImportSchemasMetaReq) ValidateAll() error {
	return m.validate(true)
}

func (m *GetImportSchemasMetaReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for LightningConfig

	if len(errors) > 0 {
		return GetImportSchemasMetaReqMultiError(errors)
	}

	return nil
}

// GetImportSchemasMetaReqMultiError is an error wrapping multiple validation
// errors returned by GetImportSchemasMetaReq.ValidateAll() if the designated
// constraints aren't met.
type GetImportSchemasMetaReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetImportSchemasMetaReqMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetImportSchemasMetaReqMultiError) AllErrors() []error { return m }

// GetImportSchemasMetaReqValidationError is the validation error returned by
// GetImportSchemasMetaReq.Validate if the designated constraints aren't met.
type GetImportSchemasMetaReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetImportSchemasMetaReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetImportSchemasMetaReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetImportSchemasMetaReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetImportSchemasMetaReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetImportSchemasMetaReqValidationError) ErrorName() string {
	return "GetImportSchemasMetaReqValidationError"
}

// Error satisfies the builtin error interface
func (e GetImportSchemasMetaReqValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetImportSchemasMetaReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetImportSchemasMetaReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetImportSchemasMetaReqValidationError{}

// Validate checks the field values on GetImportSchemasMetaResp with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetImportSchemasMetaResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetImportSchemasMetaResp with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetImportSchemasMetaRespMultiError, or nil if none found.
func (m *GetImportSchemasMetaResp) ValidateAll() error {
	return m.validate(true)
}

func (m *GetImportSchemasMetaResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	{
		sorted_keys := make([]string, len(m.GetSchemasMeta()))
		i := 0
		for key := range m.GetSchemasMeta() {
			sorted_keys[i] = key
			i++
		}
		sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] })
		for _, key := range sorted_keys {
			val := m.GetSchemasMeta()[key]
			_ = val

			// no validation rules for SchemasMeta[key]

			if all {
				switch v := interface{}(val).(type) {
				case interface{ ValidateAll() error }:
					if err := v.ValidateAll(); err != nil {
						errors = append(errors, GetImportSchemasMetaRespValidationError{
							field:  fmt.Sprintf("SchemasMeta[%v]", key),
							reason: "embedded message failed validation",
							cause:  err,
						})
					}
				case interface{ Validate() error }:
					if err := v.Validate(); err != nil {
						errors = append(errors, GetImportSchemasMetaRespValidationError{
							field:  fmt.Sprintf("SchemasMeta[%v]", key),
							reason: "embedded message failed validation",
							cause:  err,
						})
					}
				}
			} else if v, ok := interface{}(val).(interface{ Validate() error }); ok {
				if err := v.Validate(); err != nil {
					return GetImportSchemasMetaRespValidationError{
						field:  fmt.Sprintf("SchemasMeta[%v]", key),
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}

		}
	}

	if all {
		switch v := interface{}(m.GetBaseResp()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, GetImportSchemasMetaRespValidationError{
					field:  "BaseResp",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, GetImportSchemasMetaRespValidationError{
					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 GetImportSchemasMetaRespValidationError{
				field:  "BaseResp",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	if len(errors) > 0 {
		return GetImportSchemasMetaRespMultiError(errors)
	}

	return nil
}

// GetImportSchemasMetaRespMultiError is an error wrapping multiple validation
// errors returned by GetImportSchemasMetaResp.ValidateAll() if the designated
// constraints aren't met.
type GetImportSchemasMetaRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetImportSchemasMetaRespMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetImportSchemasMetaRespMultiError) AllErrors() []error { return m }

// GetImportSchemasMetaRespValidationError is the validation error returned by
// GetImportSchemasMetaResp.Validate if the designated constraints aren't met.
type GetImportSchemasMetaRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetImportSchemasMetaRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetImportSchemasMetaRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetImportSchemasMetaRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetImportSchemasMetaRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetImportSchemasMetaRespValidationError) ErrorName() string {
	return "GetImportSchemasMetaRespValidationError"
}

// Error satisfies the builtin error interface
func (e GetImportSchemasMetaRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetImportSchemasMetaResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetImportSchemasMetaRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetImportSchemasMetaRespValidationError{}

// Validate checks the field values on Row with the rules defined in the proto
// definition for this message. If any rules are violated, the first error
// encountered is returned, or nil if there are no violations.
func (m *Row) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on Row with the rules defined in the
// proto definition for this message. If any rules are violated, the result is
// a list of violation errors wrapped in RowMultiError, or nil if none found.
func (m *Row) ValidateAll() error {
	return m.validate(true)
}

func (m *Row) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	for idx, item := range m.GetTypedColumnValues() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, RowValidationError{
						field:  fmt.Sprintf("TypedColumnValues[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, RowValidationError{
						field:  fmt.Sprintf("TypedColumnValues[%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 RowValidationError{
					field:  fmt.Sprintf("TypedColumnValues[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return RowMultiError(errors)
	}

	return nil
}

// RowMultiError is an error wrapping multiple validation errors returned by
// Row.ValidateAll() if the designated constraints aren't met.
type RowMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m RowMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m RowMultiError) AllErrors() []error { return m }

// RowValidationError is the validation error returned by Row.Validate if the
// designated constraints aren't met.
type RowValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e RowValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e RowValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e RowValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e RowValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e RowValidationError) ErrorName() string { return "RowValidationError" }

// Error satisfies the builtin error interface
func (e RowValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sRow.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = RowValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = RowValidationError{}

// Validate checks the field values on ColumnValue with the rules defined in
// the proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *ColumnValue) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ColumnValue with the rules defined in
// the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in ColumnValueMultiError, or
// nil if none found.
func (m *ColumnValue) ValidateAll() error {
	return m.validate(true)
}

func (m *ColumnValue) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	switch m.Value.(type) {

	case *ColumnValue_StringValue:
		// no validation rules for StringValue

	case *ColumnValue_Int64Value:
		// no validation rules for Int64Value

	case *ColumnValue_DoubleValue:
		// no validation rules for DoubleValue

	case *ColumnValue_BoolValue:
		// no validation rules for BoolValue

	case *ColumnValue_TimestampValue:

		if all {
			switch v := interface{}(m.GetTimestampValue()).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ColumnValueValidationError{
						field:  "TimestampValue",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ColumnValueValidationError{
						field:  "TimestampValue",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(m.GetTimestampValue()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return ColumnValueValidationError{
					field:  "TimestampValue",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return ColumnValueMultiError(errors)
	}

	return nil
}

// ColumnValueMultiError is an error wrapping multiple validation errors
// returned by ColumnValue.ValidateAll() if the designated constraints aren't met.
type ColumnValueMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ColumnValueMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ColumnValueMultiError) AllErrors() []error { return m }

// ColumnValueValidationError is the validation error returned by
// ColumnValue.Validate if the designated constraints aren't met.
type ColumnValueValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ColumnValueValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ColumnValueValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ColumnValueValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ColumnValueValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ColumnValueValidationError) ErrorName() string { return "ColumnValueValidationError" }

// Error satisfies the builtin error interface
func (e ColumnValueValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sColumnValue.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ColumnValueValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ColumnValueValidationError{}

// Validate checks the field values on 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 *Table) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on 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 TableMultiError, or nil if none found.
func (m *Table) ValidateAll() error {
	return m.validate(true)
}

func (m *Table) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for SchemaName

	// no validation rules for TableName

	for idx, item := range m.GetRowValues() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, TableValidationError{
						field:  fmt.Sprintf("RowValues[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, TableValidationError{
						field:  fmt.Sprintf("RowValues[%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 TableValidationError{
					field:  fmt.Sprintf("RowValues[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return TableMultiError(errors)
	}

	return nil
}

// TableMultiError is an error wrapping multiple validation errors returned by
// Table.ValidateAll() if the designated constraints aren't met.
type TableMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m 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 TableMultiError) AllErrors() []error { return m }

// TableValidationError is the validation error returned by Table.Validate if
// the designated constraints aren't met.
type TableValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e TableValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e TableValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e TableValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e TableValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e TableValidationError) ErrorName() string { return "TableValidationError" }

// Error satisfies the builtin error interface
func (e 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 %sTable.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = TableValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = TableValidationError{}

// Validate checks the field values on Schema with the rules defined in the
// proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *Schema) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on Schema with the rules defined in the
// proto definition for this message. If any rules are violated, the result is
// a list of violation errors wrapped in SchemaMultiError, or nil if none found.
func (m *Schema) ValidateAll() error {
	return m.validate(true)
}

func (m *Schema) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for SchemaName

	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, SchemaValidationError{
						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, SchemaValidationError{
						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 SchemaValidationError{
					field:  fmt.Sprintf("Tables[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return SchemaMultiError(errors)
	}

	return nil
}

// SchemaMultiError is an error wrapping multiple validation errors returned by
// Schema.ValidateAll() if the designated constraints aren't met.
type SchemaMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m SchemaMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m SchemaMultiError) AllErrors() []error { return m }

// SchemaValidationError is the validation error returned by Schema.Validate if
// the designated constraints aren't met.
type SchemaValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e SchemaValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e SchemaValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e SchemaValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e SchemaValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e SchemaValidationError) ErrorName() string { return "SchemaValidationError" }

// Error satisfies the builtin error interface
func (e SchemaValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sSchema.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = SchemaValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = SchemaValidationError{}

// Validate checks the field values on PrecheckDMJobReq with the rules defined
// in the proto definition for this message. If any rules are violated, the
// first error encountered is returned, or nil if there are no violations.
func (m *PrecheckDMJobReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PrecheckDMJobReq with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// PrecheckDMJobReqMultiError, or nil if none found.
func (m *PrecheckDMJobReq) ValidateAll() error {
	return m.validate(true)
}

func (m *PrecheckDMJobReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ReqId

	// no validation rules for FullInstanceMigrate

	// no validation rules for ClusterPassword

	// no validation rules for ClusterId

	if len(errors) > 0 {
		return PrecheckDMJobReqMultiError(errors)
	}

	return nil
}

// PrecheckDMJobReqMultiError is an error wrapping multiple validation errors
// returned by PrecheckDMJobReq.ValidateAll() if the designated constraints
// aren't met.
type PrecheckDMJobReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m PrecheckDMJobReqMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m PrecheckDMJobReqMultiError) AllErrors() []error { return m }

// PrecheckDMJobReqValidationError is the validation error returned by
// PrecheckDMJobReq.Validate if the designated constraints aren't met.
type PrecheckDMJobReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e PrecheckDMJobReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e PrecheckDMJobReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e PrecheckDMJobReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e PrecheckDMJobReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e PrecheckDMJobReqValidationError) ErrorName() string { return "PrecheckDMJobReqValidationError" }

// Error satisfies the builtin error interface
func (e PrecheckDMJobReqValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sPrecheckDMJobReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = PrecheckDMJobReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = PrecheckDMJobReqValidationError{}

// Validate checks the field values on GcsOptions with the rules defined in the
// proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *GcsOptions) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GcsOptions with the rules defined in
// the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in GcsOptionsMultiError, or
// nil if none found.
func (m *GcsOptions) ValidateAll() error {
	return m.validate(true)
}

func (m *GcsOptions) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ImpersonateServiceAccount

	if len(errors) > 0 {
		return GcsOptionsMultiError(errors)
	}

	return nil
}

// GcsOptionsMultiError is an error wrapping multiple validation errors
// returned by GcsOptions.ValidateAll() if the designated constraints aren't met.
type GcsOptionsMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GcsOptionsMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GcsOptionsMultiError) AllErrors() []error { return m }

// GcsOptionsValidationError is the validation error returned by
// GcsOptions.Validate if the designated constraints aren't met.
type GcsOptionsValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GcsOptionsValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GcsOptionsValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GcsOptionsValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GcsOptionsValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GcsOptionsValidationError) ErrorName() string { return "GcsOptionsValidationError" }

// Error satisfies the builtin error interface
func (e GcsOptionsValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGcsOptions.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GcsOptionsValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GcsOptionsValidationError{}

// Validate checks the field values on PrecheckDMJobResp with the rules defined
// in the proto definition for this message. If any rules are violated, the
// first error encountered is returned, or nil if there are no violations.
func (m *PrecheckDMJobResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PrecheckDMJobResp with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// PrecheckDMJobRespMultiError, or nil if none found.
func (m *PrecheckDMJobResp) ValidateAll() error {
	return m.validate(true)
}

func (m *PrecheckDMJobResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for CheckResults

	if len(errors) > 0 {
		return PrecheckDMJobRespMultiError(errors)
	}

	return nil
}

// PrecheckDMJobRespMultiError is an error wrapping multiple validation errors
// returned by PrecheckDMJobResp.ValidateAll() if the designated constraints
// aren't met.
type PrecheckDMJobRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m PrecheckDMJobRespMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m PrecheckDMJobRespMultiError) AllErrors() []error { return m }

// PrecheckDMJobRespValidationError is the validation error returned by
// PrecheckDMJobResp.Validate if the designated constraints aren't met.
type PrecheckDMJobRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e PrecheckDMJobRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e PrecheckDMJobRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e PrecheckDMJobRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e PrecheckDMJobRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e PrecheckDMJobRespValidationError) ErrorName() string {
	return "PrecheckDMJobRespValidationError"
}

// Error satisfies the builtin error interface
func (e PrecheckDMJobRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sPrecheckDMJobResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = PrecheckDMJobRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = PrecheckDMJobRespValidationError{}

// Validate checks the field values on GetUserFileReq with the rules defined in
// the proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *GetUserFileReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetUserFileReq with the rules defined
// in the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in GetUserFileReqMultiError,
// or nil if none found.
func (m *GetUserFileReq) ValidateAll() error {
	return m.validate(true)
}

func (m *GetUserFileReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for S3Url

	// no validation rules for RoleArn

	// no validation rules for ExternalId

	// no validation rules for StartOffset

	// no validation rules for EndOffset

	// no validation rules for SourceUrl

	// no validation rules for DataSourceType

	if all {
		switch v := interface{}(m.GetGcsOptions()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, GetUserFileReqValidationError{
					field:  "GcsOptions",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, GetUserFileReqValidationError{
					field:  "GcsOptions",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetGcsOptions()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return GetUserFileReqValidationError{
				field:  "GcsOptions",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for SasToken

	// no validation rules for RequestId

	if len(errors) > 0 {
		return GetUserFileReqMultiError(errors)
	}

	return nil
}

// GetUserFileReqMultiError is an error wrapping multiple validation errors
// returned by GetUserFileReq.ValidateAll() if the designated constraints
// aren't met.
type GetUserFileReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetUserFileReqMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetUserFileReqMultiError) AllErrors() []error { return m }

// GetUserFileReqValidationError is the validation error returned by
// GetUserFileReq.Validate if the designated constraints aren't met.
type GetUserFileReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetUserFileReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetUserFileReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetUserFileReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetUserFileReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetUserFileReqValidationError) ErrorName() string { return "GetUserFileReqValidationError" }

// Error satisfies the builtin error interface
func (e GetUserFileReqValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetUserFileReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetUserFileReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetUserFileReqValidationError{}

// Validate checks the field values on GetUserFileResp with the rules defined
// in the proto definition for this message. If any rules are violated, the
// first error encountered is returned, or nil if there are no violations.
func (m *GetUserFileResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetUserFileResp with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetUserFileRespMultiError, or nil if none found.
func (m *GetUserFileResp) ValidateAll() error {
	return m.validate(true)
}

func (m *GetUserFileResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Content

	if len(errors) > 0 {
		return GetUserFileRespMultiError(errors)
	}

	return nil
}

// GetUserFileRespMultiError is an error wrapping multiple validation errors
// returned by GetUserFileResp.ValidateAll() if the designated constraints
// aren't met.
type GetUserFileRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetUserFileRespMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetUserFileRespMultiError) AllErrors() []error { return m }

// GetUserFileRespValidationError is the validation error returned by
// GetUserFileResp.Validate if the designated constraints aren't met.
type GetUserFileRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetUserFileRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetUserFileRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetUserFileRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetUserFileRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetUserFileRespValidationError) ErrorName() string { return "GetUserFileRespValidationError" }

// Error satisfies the builtin error interface
func (e GetUserFileRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetUserFileResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetUserFileRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetUserFileRespValidationError{}

// 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.GetSchemas() {
		_, _ = 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("Schemas[%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("Schemas[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return GetSourceTablesRespValidationError{
					field:  fmt.Sprintf("Schemas[%v]", idx),
					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 GetSourceBinlogStatusResp with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetSourceBinlogStatusResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetSourceBinlogStatusResp with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetSourceBinlogStatusRespMultiError, or nil if none found.
func (m *GetSourceBinlogStatusResp) ValidateAll() error {
	return m.validate(true)
}

func (m *GetSourceBinlogStatusResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for BinlogName

	// no validation rules for BinlogPos

	// no validation rules for BinlogDoDbs

	// no validation rules for BinlogIgnoreDbs

	// no validation rules for GtidStr

	if len(errors) > 0 {
		return GetSourceBinlogStatusRespMultiError(errors)
	}

	return nil
}

// GetSourceBinlogStatusRespMultiError is an error wrapping multiple validation
// errors returned by GetSourceBinlogStatusResp.ValidateAll() if the
// designated constraints aren't met.
type GetSourceBinlogStatusRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetSourceBinlogStatusRespMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetSourceBinlogStatusRespMultiError) AllErrors() []error { return m }

// GetSourceBinlogStatusRespValidationError is the validation error returned by
// GetSourceBinlogStatusResp.Validate if the designated constraints aren't met.
type GetSourceBinlogStatusRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetSourceBinlogStatusRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetSourceBinlogStatusRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetSourceBinlogStatusRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetSourceBinlogStatusRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetSourceBinlogStatusRespValidationError) ErrorName() string {
	return "GetSourceBinlogStatusRespValidationError"
}

// Error satisfies the builtin error interface
func (e GetSourceBinlogStatusRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetSourceBinlogStatusResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetSourceBinlogStatusRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetSourceBinlogStatusRespValidationError{}

// Validate checks the field values on GetClusterTablesResp with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetClusterTablesResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetClusterTablesResp with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetClusterTablesRespMultiError, or nil if none found.
func (m *GetClusterTablesResp) ValidateAll() error {
	return m.validate(true)
}

func (m *GetClusterTablesResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	for idx, item := range m.GetSchemas() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, GetClusterTablesRespValidationError{
						field:  fmt.Sprintf("Schemas[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, GetClusterTablesRespValidationError{
						field:  fmt.Sprintf("Schemas[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return GetClusterTablesRespValidationError{
					field:  fmt.Sprintf("Schemas[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return GetClusterTablesRespMultiError(errors)
	}

	return nil
}

// GetClusterTablesRespMultiError is an error wrapping multiple validation
// errors returned by GetClusterTablesResp.ValidateAll() if the designated
// constraints aren't met.
type GetClusterTablesRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetClusterTablesRespMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetClusterTablesRespMultiError) AllErrors() []error { return m }

// GetClusterTablesRespValidationError is the validation error returned by
// GetClusterTablesResp.Validate if the designated constraints aren't met.
type GetClusterTablesRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetClusterTablesRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetClusterTablesRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetClusterTablesRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetClusterTablesRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetClusterTablesRespValidationError) ErrorName() string {
	return "GetClusterTablesRespValidationError"
}

// Error satisfies the builtin error interface
func (e GetClusterTablesRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetClusterTablesResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetClusterTablesRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetClusterTablesRespValidationError{}

// Validate checks the field values on NsLookupReq with the rules defined in
// the proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *NsLookupReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on NsLookupReq with the rules defined in
// the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in NsLookupReqMultiError, or
// nil if none found.
func (m *NsLookupReq) ValidateAll() error {
	return m.validate(true)
}

func (m *NsLookupReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Host

	// no validation rules for RequestId

	if len(errors) > 0 {
		return NsLookupReqMultiError(errors)
	}

	return nil
}

// NsLookupReqMultiError is an error wrapping multiple validation errors
// returned by NsLookupReq.ValidateAll() if the designated constraints aren't met.
type NsLookupReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m NsLookupReqMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m NsLookupReqMultiError) AllErrors() []error { return m }

// NsLookupReqValidationError is the validation error returned by
// NsLookupReq.Validate if the designated constraints aren't met.
type NsLookupReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e NsLookupReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e NsLookupReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e NsLookupReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e NsLookupReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e NsLookupReqValidationError) ErrorName() string { return "NsLookupReqValidationError" }

// Error satisfies the builtin error interface
func (e NsLookupReqValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sNsLookupReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = NsLookupReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = NsLookupReqValidationError{}

// Validate checks the field values on NsLookupResp with the rules defined in
// the proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *NsLookupResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on NsLookupResp with the rules defined
// in the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in NsLookupRespMultiError, or
// nil if none found.
func (m *NsLookupResp) ValidateAll() error {
	return m.validate(true)
}

func (m *NsLookupResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return NsLookupRespMultiError(errors)
	}

	return nil
}

// NsLookupRespMultiError is an error wrapping multiple validation errors
// returned by NsLookupResp.ValidateAll() if the designated constraints aren't met.
type NsLookupRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m NsLookupRespMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m NsLookupRespMultiError) AllErrors() []error { return m }

// NsLookupRespValidationError is the validation error returned by
// NsLookupResp.Validate if the designated constraints aren't met.
type NsLookupRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e NsLookupRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e NsLookupRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e NsLookupRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e NsLookupRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e NsLookupRespValidationError) ErrorName() string { return "NsLookupRespValidationError" }

// Error satisfies the builtin error interface
func (e NsLookupRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sNsLookupResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = NsLookupRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = NsLookupRespValidationError{}

// Validate checks the field values on ClearEmptyTablesReq with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *ClearEmptyTablesReq) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ClearEmptyTablesReq with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// ClearEmptyTablesReqMultiError, or nil if none found.
func (m *ClearEmptyTablesReq) ValidateAll() error {
	return m.validate(true)
}

func (m *ClearEmptyTablesReq) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetCluster()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ClearEmptyTablesReqValidationError{
					field:  "Cluster",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ClearEmptyTablesReqValidationError{
					field:  "Cluster",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ClearEmptyTablesReqValidationError{
				field:  "Cluster",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	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, ClearEmptyTablesReqValidationError{
						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, ClearEmptyTablesReqValidationError{
						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 ClearEmptyTablesReqValidationError{
					field:  fmt.Sprintf("Tables[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return ClearEmptyTablesReqMultiError(errors)
	}

	return nil
}

// ClearEmptyTablesReqMultiError is an error wrapping multiple validation
// errors returned by ClearEmptyTablesReq.ValidateAll() if the designated
// constraints aren't met.
type ClearEmptyTablesReqMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ClearEmptyTablesReqMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ClearEmptyTablesReqMultiError) AllErrors() []error { return m }

// ClearEmptyTablesReqValidationError is the validation error returned by
// ClearEmptyTablesReq.Validate if the designated constraints aren't met.
type ClearEmptyTablesReqValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ClearEmptyTablesReqValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ClearEmptyTablesReqValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ClearEmptyTablesReqValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ClearEmptyTablesReqValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ClearEmptyTablesReqValidationError) ErrorName() string {
	return "ClearEmptyTablesReqValidationError"
}

// Error satisfies the builtin error interface
func (e ClearEmptyTablesReqValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sClearEmptyTablesReq.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ClearEmptyTablesReqValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ClearEmptyTablesReqValidationError{}

// Validate checks the field values on ClearEmptyTablesResp with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *ClearEmptyTablesResp) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ClearEmptyTablesResp with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// ClearEmptyTablesRespMultiError, or nil if none found.
func (m *ClearEmptyTablesResp) ValidateAll() error {
	return m.validate(true)
}

func (m *ClearEmptyTablesResp) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	for idx, item := range m.GetResults() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ClearEmptyTablesRespValidationError{
						field:  fmt.Sprintf("Results[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ClearEmptyTablesRespValidationError{
						field:  fmt.Sprintf("Results[%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 ClearEmptyTablesRespValidationError{
					field:  fmt.Sprintf("Results[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return ClearEmptyTablesRespMultiError(errors)
	}

	return nil
}

// ClearEmptyTablesRespMultiError is an error wrapping multiple validation
// errors returned by ClearEmptyTablesResp.ValidateAll() if the designated
// constraints aren't met.
type ClearEmptyTablesRespMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ClearEmptyTablesRespMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ClearEmptyTablesRespMultiError) AllErrors() []error { return m }

// ClearEmptyTablesRespValidationError is the validation error returned by
// ClearEmptyTablesResp.Validate if the designated constraints aren't met.
type ClearEmptyTablesRespValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ClearEmptyTablesRespValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ClearEmptyTablesRespValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ClearEmptyTablesRespValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ClearEmptyTablesRespValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ClearEmptyTablesRespValidationError) ErrorName() string {
	return "ClearEmptyTablesRespValidationError"
}

// Error satisfies the builtin error interface
func (e ClearEmptyTablesRespValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sClearEmptyTablesResp.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ClearEmptyTablesRespValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ClearEmptyTablesRespValidationError{}

// Validate checks the field values on ClearSingleEmptyTableResult with the
// rules defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *ClearSingleEmptyTableResult) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ClearSingleEmptyTableResult with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// ClearSingleEmptyTableResultMultiError, or nil if none found.
func (m *ClearSingleEmptyTableResult) ValidateAll() error {
	return m.validate(true)
}

func (m *ClearSingleEmptyTableResult) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetTable()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ClearSingleEmptyTableResultValidationError{
					field:  "Table",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ClearSingleEmptyTableResultValidationError{
					field:  "Table",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetTable()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ClearSingleEmptyTableResultValidationError{
				field:  "Table",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for Result

	// no validation rules for ErrMessage

	if len(errors) > 0 {
		return ClearSingleEmptyTableResultMultiError(errors)
	}

	return nil
}

// ClearSingleEmptyTableResultMultiError is an error wrapping multiple
// validation errors returned by ClearSingleEmptyTableResult.ValidateAll() if
// the designated constraints aren't met.
type ClearSingleEmptyTableResultMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ClearSingleEmptyTableResultMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ClearSingleEmptyTableResultMultiError) AllErrors() []error { return m }

// ClearSingleEmptyTableResultValidationError is the validation error returned
// by ClearSingleEmptyTableResult.Validate if the designated constraints
// aren't met.
type ClearSingleEmptyTableResultValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ClearSingleEmptyTableResultValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ClearSingleEmptyTableResultValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ClearSingleEmptyTableResultValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ClearSingleEmptyTableResultValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ClearSingleEmptyTableResultValidationError) ErrorName() string {
	return "ClearSingleEmptyTableResultValidationError"
}

// Error satisfies the builtin error interface
func (e ClearSingleEmptyTableResultValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sClearSingleEmptyTableResult.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ClearSingleEmptyTableResultValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ClearSingleEmptyTableResultValidationError{}

// Validate checks the field values on GetPublicKeyRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetPublicKeyRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetPublicKeyRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetPublicKeyRequestMultiError, or nil if none found.
func (m *GetPublicKeyRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *GetPublicKeyRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return GetPublicKeyRequestMultiError(errors)
	}

	return nil
}

// GetPublicKeyRequestMultiError is an error wrapping multiple validation
// errors returned by GetPublicKeyRequest.ValidateAll() if the designated
// constraints aren't met.
type GetPublicKeyRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetPublicKeyRequestMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetPublicKeyRequestMultiError) AllErrors() []error { return m }

// GetPublicKeyRequestValidationError is the validation error returned by
// GetPublicKeyRequest.Validate if the designated constraints aren't met.
type GetPublicKeyRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetPublicKeyRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetPublicKeyRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetPublicKeyRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetPublicKeyRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetPublicKeyRequestValidationError) ErrorName() string {
	return "GetPublicKeyRequestValidationError"
}

// Error satisfies the builtin error interface
func (e GetPublicKeyRequestValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetPublicKeyRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetPublicKeyRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetPublicKeyRequestValidationError{}

// Validate checks the field values on GetPublicKeyResponse with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetPublicKeyResponse) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetPublicKeyResponse with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetPublicKeyResponseMultiError, or nil if none found.
func (m *GetPublicKeyResponse) ValidateAll() error {
	return m.validate(true)
}

func (m *GetPublicKeyResponse) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Pem

	if len(errors) > 0 {
		return GetPublicKeyResponseMultiError(errors)
	}

	return nil
}

// GetPublicKeyResponseMultiError is an error wrapping multiple validation
// errors returned by GetPublicKeyResponse.ValidateAll() if the designated
// constraints aren't met.
type GetPublicKeyResponseMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetPublicKeyResponseMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetPublicKeyResponseMultiError) AllErrors() []error { return m }

// GetPublicKeyResponseValidationError is the validation error returned by
// GetPublicKeyResponse.Validate if the designated constraints aren't met.
type GetPublicKeyResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetPublicKeyResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetPublicKeyResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetPublicKeyResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetPublicKeyResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetPublicKeyResponseValidationError) ErrorName() string {
	return "GetPublicKeyResponseValidationError"
}

// Error satisfies the builtin error interface
func (e GetPublicKeyResponseValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetPublicKeyResponse.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetPublicKeyResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetPublicKeyResponseValidationError{}

// Validate checks the field values on ImportSource with the rules defined in
// the proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *ImportSource) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ImportSource with the rules defined
// in the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in ImportSourceMultiError, or
// nil if none found.
func (m *ImportSource) ValidateAll() error {
	return m.validate(true)
}

func (m *ImportSource) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Type

	switch m.Source.(type) {

	case *ImportSource_S3:

		if all {
			switch v := interface{}(m.GetS3()).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ImportSourceValidationError{
						field:  "S3",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ImportSourceValidationError{
						field:  "S3",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(m.GetS3()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return ImportSourceValidationError{
					field:  "S3",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *ImportSource_Gcs:

		if all {
			switch v := interface{}(m.GetGcs()).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ImportSourceValidationError{
						field:  "Gcs",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ImportSourceValidationError{
						field:  "Gcs",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(m.GetGcs()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return ImportSourceValidationError{
					field:  "Gcs",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *ImportSource_AzureBlob:

		if all {
			switch v := interface{}(m.GetAzureBlob()).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ImportSourceValidationError{
						field:  "AzureBlob",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ImportSourceValidationError{
						field:  "AzureBlob",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(m.GetAzureBlob()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return ImportSourceValidationError{
					field:  "AzureBlob",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return ImportSourceMultiError(errors)
	}

	return nil
}

// ImportSourceMultiError is an error wrapping multiple validation errors
// returned by ImportSource.ValidateAll() if the designated constraints aren't met.
type ImportSourceMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ImportSourceMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ImportSourceMultiError) AllErrors() []error { return m }

// ImportSourceValidationError is the validation error returned by
// ImportSource.Validate if the designated constraints aren't met.
type ImportSourceValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ImportSourceValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ImportSourceValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ImportSourceValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ImportSourceValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ImportSourceValidationError) ErrorName() string { return "ImportSourceValidationError" }

// Error satisfies the builtin error interface
func (e ImportSourceValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sImportSource.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ImportSourceValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ImportSourceValidationError{}

// Validate checks the field values on S3Source with the rules defined in the
// proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *S3Source) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on S3Source with the rules defined in
// the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in S3SourceMultiError, or nil
// if none found.
func (m *S3Source) ValidateAll() error {
	return m.validate(true)
}

func (m *S3Source) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Uri

	// no validation rules for AuthType

	for idx, item := range m.GetTargetTableInfos() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, S3SourceValidationError{
						field:  fmt.Sprintf("TargetTableInfos[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, S3SourceValidationError{
						field:  fmt.Sprintf("TargetTableInfos[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return S3SourceValidationError{
					field:  fmt.Sprintf("TargetTableInfos[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	switch m.Auth.(type) {

	case *S3Source_RoleArn_:

		if all {
			switch v := interface{}(m.GetRoleArn()).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, S3SourceValidationError{
						field:  "RoleArn",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, S3SourceValidationError{
						field:  "RoleArn",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(m.GetRoleArn()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return S3SourceValidationError{
					field:  "RoleArn",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *S3Source_AccessKey_:

		if all {
			switch v := interface{}(m.GetAccessKey()).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, S3SourceValidationError{
						field:  "AccessKey",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, S3SourceValidationError{
						field:  "AccessKey",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(m.GetAccessKey()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return S3SourceValidationError{
					field:  "AccessKey",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return S3SourceMultiError(errors)
	}

	return nil
}

// S3SourceMultiError is an error wrapping multiple validation errors returned
// by S3Source.ValidateAll() if the designated constraints aren't met.
type S3SourceMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m S3SourceMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m S3SourceMultiError) AllErrors() []error { return m }

// S3SourceValidationError is the validation error returned by
// S3Source.Validate if the designated constraints aren't met.
type S3SourceValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e S3SourceValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e S3SourceValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e S3SourceValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e S3SourceValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e S3SourceValidationError) ErrorName() string { return "S3SourceValidationError" }

// Error satisfies the builtin error interface
func (e S3SourceValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sS3Source.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = S3SourceValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = S3SourceValidationError{}

// Validate checks the field values on GCSSource with the rules defined in the
// proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *GCSSource) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GCSSource with the rules defined in
// the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in GCSSourceMultiError, or nil
// if none found.
func (m *GCSSource) ValidateAll() error {
	return m.validate(true)
}

func (m *GCSSource) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Uri

	// no validation rules for AuthType

	for idx, item := range m.GetTargetTableInfos() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, GCSSourceValidationError{
						field:  fmt.Sprintf("TargetTableInfos[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, GCSSourceValidationError{
						field:  fmt.Sprintf("TargetTableInfos[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return GCSSourceValidationError{
					field:  fmt.Sprintf("TargetTableInfos[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	switch m.Auth.(type) {

	case *GCSSource_ServiceAccountKey:
		// no validation rules for ServiceAccountKey

	}

	if len(errors) > 0 {
		return GCSSourceMultiError(errors)
	}

	return nil
}

// GCSSourceMultiError is an error wrapping multiple validation errors returned
// by GCSSource.ValidateAll() if the designated constraints aren't met.
type GCSSourceMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GCSSourceMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GCSSourceMultiError) AllErrors() []error { return m }

// GCSSourceValidationError is the validation error returned by
// GCSSource.Validate if the designated constraints aren't met.
type GCSSourceValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GCSSourceValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GCSSourceValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GCSSourceValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GCSSourceValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GCSSourceValidationError) ErrorName() string { return "GCSSourceValidationError" }

// Error satisfies the builtin error interface
func (e GCSSourceValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGCSSource.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GCSSourceValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GCSSourceValidationError{}

// Validate checks the field values on AzureBlobSource with the rules defined
// in the proto definition for this message. If any rules are violated, the
// first error encountered is returned, or nil if there are no violations.
func (m *AzureBlobSource) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on AzureBlobSource with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// AzureBlobSourceMultiError, or nil if none found.
func (m *AzureBlobSource) ValidateAll() error {
	return m.validate(true)
}

func (m *AzureBlobSource) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for AuthType

	// no validation rules for Uri

	for idx, item := range m.GetTargetTableInfos() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, AzureBlobSourceValidationError{
						field:  fmt.Sprintf("TargetTableInfos[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, AzureBlobSourceValidationError{
						field:  fmt.Sprintf("TargetTableInfos[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return AzureBlobSourceValidationError{
					field:  fmt.Sprintf("TargetTableInfos[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	switch m.Auth.(type) {

	case *AzureBlobSource_SasToken:
		// no validation rules for SasToken

	}

	if len(errors) > 0 {
		return AzureBlobSourceMultiError(errors)
	}

	return nil
}

// AzureBlobSourceMultiError is an error wrapping multiple validation errors
// returned by AzureBlobSource.ValidateAll() if the designated constraints
// aren't met.
type AzureBlobSourceMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m AzureBlobSourceMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m AzureBlobSourceMultiError) AllErrors() []error { return m }

// AzureBlobSourceValidationError is the validation error returned by
// AzureBlobSource.Validate if the designated constraints aren't met.
type AzureBlobSourceValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e AzureBlobSourceValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e AzureBlobSourceValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e AzureBlobSourceValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e AzureBlobSourceValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e AzureBlobSourceValidationError) ErrorName() string { return "AzureBlobSourceValidationError" }

// Error satisfies the builtin error interface
func (e AzureBlobSourceValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sAzureBlobSource.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = AzureBlobSourceValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = AzureBlobSourceValidationError{}

// Validate checks the field values on ImportSourceType with the rules defined
// in the proto definition for this message. If any rules are violated, the
// first error encountered is returned, or nil if there are no violations.
func (m *ImportSourceType) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ImportSourceType with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// ImportSourceTypeMultiError, or nil if none found.
func (m *ImportSourceType) ValidateAll() error {
	return m.validate(true)
}

func (m *ImportSourceType) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return ImportSourceTypeMultiError(errors)
	}

	return nil
}

// ImportSourceTypeMultiError is an error wrapping multiple validation errors
// returned by ImportSourceType.ValidateAll() if the designated constraints
// aren't met.
type ImportSourceTypeMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ImportSourceTypeMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ImportSourceTypeMultiError) AllErrors() []error { return m }

// ImportSourceTypeValidationError is the validation error returned by
// ImportSourceType.Validate if the designated constraints aren't met.
type ImportSourceTypeValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ImportSourceTypeValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ImportSourceTypeValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ImportSourceTypeValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ImportSourceTypeValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ImportSourceTypeValidationError) ErrorName() string { return "ImportSourceTypeValidationError" }

// Error satisfies the builtin error interface
func (e ImportSourceTypeValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sImportSourceType.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ImportSourceTypeValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ImportSourceTypeValidationError{}

// Validate checks the field values on ImportS3AuthType with the rules defined
// in the proto definition for this message. If any rules are violated, the
// first error encountered is returned, or nil if there are no violations.
func (m *ImportS3AuthType) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ImportS3AuthType with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// ImportS3AuthTypeMultiError, or nil if none found.
func (m *ImportS3AuthType) ValidateAll() error {
	return m.validate(true)
}

func (m *ImportS3AuthType) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return ImportS3AuthTypeMultiError(errors)
	}

	return nil
}

// ImportS3AuthTypeMultiError is an error wrapping multiple validation errors
// returned by ImportS3AuthType.ValidateAll() if the designated constraints
// aren't met.
type ImportS3AuthTypeMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ImportS3AuthTypeMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ImportS3AuthTypeMultiError) AllErrors() []error { return m }

// ImportS3AuthTypeValidationError is the validation error returned by
// ImportS3AuthType.Validate if the designated constraints aren't met.
type ImportS3AuthTypeValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ImportS3AuthTypeValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ImportS3AuthTypeValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ImportS3AuthTypeValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ImportS3AuthTypeValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ImportS3AuthTypeValidationError) ErrorName() string { return "ImportS3AuthTypeValidationError" }

// Error satisfies the builtin error interface
func (e ImportS3AuthTypeValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sImportS3AuthType.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ImportS3AuthTypeValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ImportS3AuthTypeValidationError{}

// Validate checks the field values on ImportGcsAuthType with the rules defined
// in the proto definition for this message. If any rules are violated, the
// first error encountered is returned, or nil if there are no violations.
func (m *ImportGcsAuthType) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ImportGcsAuthType with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// ImportGcsAuthTypeMultiError, or nil if none found.
func (m *ImportGcsAuthType) ValidateAll() error {
	return m.validate(true)
}

func (m *ImportGcsAuthType) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return ImportGcsAuthTypeMultiError(errors)
	}

	return nil
}

// ImportGcsAuthTypeMultiError is an error wrapping multiple validation errors
// returned by ImportGcsAuthType.ValidateAll() if the designated constraints
// aren't met.
type ImportGcsAuthTypeMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ImportGcsAuthTypeMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ImportGcsAuthTypeMultiError) AllErrors() []error { return m }

// ImportGcsAuthTypeValidationError is the validation error returned by
// ImportGcsAuthType.Validate if the designated constraints aren't met.
type ImportGcsAuthTypeValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ImportGcsAuthTypeValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ImportGcsAuthTypeValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ImportGcsAuthTypeValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ImportGcsAuthTypeValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ImportGcsAuthTypeValidationError) ErrorName() string {
	return "ImportGcsAuthTypeValidationError"
}

// Error satisfies the builtin error interface
func (e ImportGcsAuthTypeValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sImportGcsAuthType.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ImportGcsAuthTypeValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ImportGcsAuthTypeValidationError{}

// Validate checks the field values on ImportAzureBlobAuthType with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *ImportAzureBlobAuthType) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ImportAzureBlobAuthType with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// ImportAzureBlobAuthTypeMultiError, or nil if none found.
func (m *ImportAzureBlobAuthType) ValidateAll() error {
	return m.validate(true)
}

func (m *ImportAzureBlobAuthType) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return ImportAzureBlobAuthTypeMultiError(errors)
	}

	return nil
}

// ImportAzureBlobAuthTypeMultiError is an error wrapping multiple validation
// errors returned by ImportAzureBlobAuthType.ValidateAll() if the designated
// constraints aren't met.
type ImportAzureBlobAuthTypeMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ImportAzureBlobAuthTypeMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ImportAzureBlobAuthTypeMultiError) AllErrors() []error { return m }

// ImportAzureBlobAuthTypeValidationError is the validation error returned by
// ImportAzureBlobAuthType.Validate if the designated constraints aren't met.
type ImportAzureBlobAuthTypeValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ImportAzureBlobAuthTypeValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ImportAzureBlobAuthTypeValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ImportAzureBlobAuthTypeValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ImportAzureBlobAuthTypeValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ImportAzureBlobAuthTypeValidationError) ErrorName() string {
	return "ImportAzureBlobAuthTypeValidationError"
}

// Error satisfies the builtin error interface
func (e ImportAzureBlobAuthTypeValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sImportAzureBlobAuthType.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ImportAzureBlobAuthTypeValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ImportAzureBlobAuthTypeValidationError{}

// Validate checks the field values on ImportTargetTableInfo with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *ImportTargetTableInfo) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ImportTargetTableInfo with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// ImportTargetTableInfoMultiError, or nil if none found.
func (m *ImportTargetTableInfo) ValidateAll() error {
	return m.validate(true)
}

func (m *ImportTargetTableInfo) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetTargetTable()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ImportTargetTableInfoValidationError{
					field:  "TargetTable",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ImportTargetTableInfoValidationError{
					field:  "TargetTable",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetTargetTable()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ImportTargetTableInfoValidationError{
				field:  "TargetTable",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for CustomFile

	if len(errors) > 0 {
		return ImportTargetTableInfoMultiError(errors)
	}

	return nil
}

// ImportTargetTableInfoMultiError is an error wrapping multiple validation
// errors returned by ImportTargetTableInfo.ValidateAll() if the designated
// constraints aren't met.
type ImportTargetTableInfoMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ImportTargetTableInfoMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ImportTargetTableInfoMultiError) AllErrors() []error { return m }

// ImportTargetTableInfoValidationError is the validation error returned by
// ImportTargetTableInfo.Validate if the designated constraints aren't met.
type ImportTargetTableInfoValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ImportTargetTableInfoValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ImportTargetTableInfoValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ImportTargetTableInfoValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ImportTargetTableInfoValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ImportTargetTableInfoValidationError) ErrorName() string {
	return "ImportTargetTableInfoValidationError"
}

// Error satisfies the builtin error interface
func (e ImportTargetTableInfoValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sImportTargetTableInfo.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ImportTargetTableInfoValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ImportTargetTableInfoValidationError{}

// Validate checks the field values on ImportOptions with the rules defined in
// the proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *ImportOptions) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ImportOptions with the rules defined
// in the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in ImportOptionsMultiError, or
// nil if none found.
func (m *ImportOptions) ValidateAll() error {
	return m.validate(true)
}

func (m *ImportOptions) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for FileType

	// no validation rules for NeedDropTable

	// no validation rules for DisplayName

	switch m.Format.(type) {

	case *ImportOptions_CsvConfig:

		if all {
			switch v := interface{}(m.GetCsvConfig()).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ImportOptionsValidationError{
						field:  "CsvConfig",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ImportOptionsValidationError{
						field:  "CsvConfig",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(m.GetCsvConfig()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return ImportOptionsValidationError{
					field:  "CsvConfig",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return ImportOptionsMultiError(errors)
	}

	return nil
}

// ImportOptionsMultiError is an error wrapping multiple validation errors
// returned by ImportOptions.ValidateAll() if the designated constraints
// aren't met.
type ImportOptionsMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ImportOptionsMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ImportOptionsMultiError) AllErrors() []error { return m }

// ImportOptionsValidationError is the validation error returned by
// ImportOptions.Validate if the designated constraints aren't met.
type ImportOptionsValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ImportOptionsValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ImportOptionsValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ImportOptionsValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ImportOptionsValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ImportOptionsValidationError) ErrorName() string { return "ImportOptionsValidationError" }

// Error satisfies the builtin error interface
func (e ImportOptionsValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sImportOptions.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ImportOptionsValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ImportOptionsValidationError{}

// Validate checks the field values on ImportFileType with the rules defined in
// the proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *ImportFileType) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ImportFileType with the rules defined
// in the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in ImportFileTypeMultiError,
// or nil if none found.
func (m *ImportFileType) ValidateAll() error {
	return m.validate(true)
}

func (m *ImportFileType) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if len(errors) > 0 {
		return ImportFileTypeMultiError(errors)
	}

	return nil
}

// ImportFileTypeMultiError is an error wrapping multiple validation errors
// returned by ImportFileType.ValidateAll() if the designated constraints
// aren't met.
type ImportFileTypeMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ImportFileTypeMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ImportFileTypeMultiError) AllErrors() []error { return m }

// ImportFileTypeValidationError is the validation error returned by
// ImportFileType.Validate if the designated constraints aren't met.
type ImportFileTypeValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ImportFileTypeValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ImportFileTypeValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ImportFileTypeValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ImportFileTypeValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ImportFileTypeValidationError) ErrorName() string { return "ImportFileTypeValidationError" }

// Error satisfies the builtin error interface
func (e ImportFileTypeValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sImportFileType.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ImportFileTypeValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ImportFileTypeValidationError{}

// Validate checks the field values on EncryptedData with the rules defined in
// the proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *EncryptedData) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on EncryptedData with the rules defined
// in the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in EncryptedDataMultiError, or
// nil if none found.
func (m *EncryptedData) ValidateAll() error {
	return m.validate(true)
}

func (m *EncryptedData) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Data

	// no validation rules for Pem

	if len(errors) > 0 {
		return EncryptedDataMultiError(errors)
	}

	return nil
}

// EncryptedDataMultiError is an error wrapping multiple validation errors
// returned by EncryptedData.ValidateAll() if the designated constraints
// aren't met.
type EncryptedDataMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m EncryptedDataMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m EncryptedDataMultiError) AllErrors() []error { return m }

// EncryptedDataValidationError is the validation error returned by
// EncryptedData.Validate if the designated constraints aren't met.
type EncryptedDataValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e EncryptedDataValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e EncryptedDataValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e EncryptedDataValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e EncryptedDataValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e EncryptedDataValidationError) ErrorName() string { return "EncryptedDataValidationError" }

// Error satisfies the builtin error interface
func (e EncryptedDataValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sEncryptedData.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = EncryptedDataValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = EncryptedDataValidationError{}

// Validate checks the field values on GetTiDBHostRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetTiDBHostRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetTiDBHostRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetTiDBHostRequestMultiError, or nil if none found.
func (m *GetTiDBHostRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *GetTiDBHostRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ClusterId

	if len(errors) > 0 {
		return GetTiDBHostRequestMultiError(errors)
	}

	return nil
}

// GetTiDBHostRequestMultiError is an error wrapping multiple validation errors
// returned by GetTiDBHostRequest.ValidateAll() if the designated constraints
// aren't met.
type GetTiDBHostRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetTiDBHostRequestMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetTiDBHostRequestMultiError) AllErrors() []error { return m }

// GetTiDBHostRequestValidationError is the validation error returned by
// GetTiDBHostRequest.Validate if the designated constraints aren't met.
type GetTiDBHostRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetTiDBHostRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetTiDBHostRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetTiDBHostRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetTiDBHostRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetTiDBHostRequestValidationError) ErrorName() string {
	return "GetTiDBHostRequestValidationError"
}

// Error satisfies the builtin error interface
func (e GetTiDBHostRequestValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetTiDBHostRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetTiDBHostRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetTiDBHostRequestValidationError{}

// Validate checks the field values on GetTiDBHostResponse with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetTiDBHostResponse) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetTiDBHostResponse with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetTiDBHostResponseMultiError, or nil if none found.
func (m *GetTiDBHostResponse) ValidateAll() error {
	return m.validate(true)
}

func (m *GetTiDBHostResponse) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Host

	if len(errors) > 0 {
		return GetTiDBHostResponseMultiError(errors)
	}

	return nil
}

// GetTiDBHostResponseMultiError is an error wrapping multiple validation
// errors returned by GetTiDBHostResponse.ValidateAll() if the designated
// constraints aren't met.
type GetTiDBHostResponseMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetTiDBHostResponseMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetTiDBHostResponseMultiError) AllErrors() []error { return m }

// GetTiDBHostResponseValidationError is the validation error returned by
// GetTiDBHostResponse.Validate if the designated constraints aren't met.
type GetTiDBHostResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetTiDBHostResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetTiDBHostResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetTiDBHostResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetTiDBHostResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetTiDBHostResponseValidationError) ErrorName() string {
	return "GetTiDBHostResponseValidationError"
}

// Error satisfies the builtin error interface
func (e GetTiDBHostResponseValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetTiDBHostResponse.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetTiDBHostResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetTiDBHostResponseValidationError{}

// Validate checks the field values on DMOpenAPIProxyRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *DMOpenAPIProxyRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DMOpenAPIProxyRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// DMOpenAPIProxyRequestMultiError, or nil if none found.
func (m *DMOpenAPIProxyRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *DMOpenAPIProxyRequest) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for DmNamespace

	// no validation rules for Path

	// no validation rules for Method

	// no validation rules for Body

	// no validation rules for PatchTargetConn

	// no validation rules for ClusterId

	if len(errors) > 0 {
		return DMOpenAPIProxyRequestMultiError(errors)
	}

	return nil
}

// DMOpenAPIProxyRequestMultiError is an error wrapping multiple validation
// errors returned by DMOpenAPIProxyRequest.ValidateAll() if the designated
// constraints aren't met.
type DMOpenAPIProxyRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DMOpenAPIProxyRequestMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m DMOpenAPIProxyRequestMultiError) AllErrors() []error { return m }

// DMOpenAPIProxyRequestValidationError is the validation error returned by
// DMOpenAPIProxyRequest.Validate if the designated constraints aren't met.
type DMOpenAPIProxyRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DMOpenAPIProxyRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DMOpenAPIProxyRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DMOpenAPIProxyRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DMOpenAPIProxyRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DMOpenAPIProxyRequestValidationError) ErrorName() string {
	return "DMOpenAPIProxyRequestValidationError"
}

// Error satisfies the builtin error interface
func (e DMOpenAPIProxyRequestValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sDMOpenAPIProxyRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DMOpenAPIProxyRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DMOpenAPIProxyRequestValidationError{}

// Validate checks the field values on DMOpenAPIProxyResponse with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *DMOpenAPIProxyResponse) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on DMOpenAPIProxyResponse with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// DMOpenAPIProxyResponseMultiError, or nil if none found.
func (m *DMOpenAPIProxyResponse) ValidateAll() error {
	return m.validate(true)
}

func (m *DMOpenAPIProxyResponse) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Status

	// no validation rules for Body

	if len(errors) > 0 {
		return DMOpenAPIProxyResponseMultiError(errors)
	}

	return nil
}

// DMOpenAPIProxyResponseMultiError is an error wrapping multiple validation
// errors returned by DMOpenAPIProxyResponse.ValidateAll() if the designated
// constraints aren't met.
type DMOpenAPIProxyResponseMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m DMOpenAPIProxyResponseMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m DMOpenAPIProxyResponseMultiError) AllErrors() []error { return m }

// DMOpenAPIProxyResponseValidationError is the validation error returned by
// DMOpenAPIProxyResponse.Validate if the designated constraints aren't met.
type DMOpenAPIProxyResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DMOpenAPIProxyResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DMOpenAPIProxyResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DMOpenAPIProxyResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DMOpenAPIProxyResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DMOpenAPIProxyResponseValidationError) ErrorName() string {
	return "DMOpenAPIProxyResponseValidationError"
}

// Error satisfies the builtin error interface
func (e DMOpenAPIProxyResponseValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sDMOpenAPIProxyResponse.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DMOpenAPIProxyResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DMOpenAPIProxyResponseValidationError{}

// Validate checks the field values on ExecSQLOnDMSourceRequest with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *ExecSQLOnDMSourceRequest) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ExecSQLOnDMSourceRequest with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// ExecSQLOnDMSourceRequestMultiError, or nil if none found.
func (m *ExecSQLOnDMSourceRequest) ValidateAll() error {
	return m.validate(true)
}

func (m *ExecSQLOnDMSourceRequest) 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, ExecSQLOnDMSourceRequestValidationError{
					field:  "ConnProfile",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ExecSQLOnDMSourceRequestValidationError{
					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 ExecSQLOnDMSourceRequestValidationError{
				field:  "ConnProfile",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for Sql

	if len(errors) > 0 {
		return ExecSQLOnDMSourceRequestMultiError(errors)
	}

	return nil
}

// ExecSQLOnDMSourceRequestMultiError is an error wrapping multiple validation
// errors returned by ExecSQLOnDMSourceRequest.ValidateAll() if the designated
// constraints aren't met.
type ExecSQLOnDMSourceRequestMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ExecSQLOnDMSourceRequestMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ExecSQLOnDMSourceRequestMultiError) AllErrors() []error { return m }

// ExecSQLOnDMSourceRequestValidationError is the validation error returned by
// ExecSQLOnDMSourceRequest.Validate if the designated constraints aren't met.
type ExecSQLOnDMSourceRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ExecSQLOnDMSourceRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ExecSQLOnDMSourceRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ExecSQLOnDMSourceRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ExecSQLOnDMSourceRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ExecSQLOnDMSourceRequestValidationError) ErrorName() string {
	return "ExecSQLOnDMSourceRequestValidationError"
}

// Error satisfies the builtin error interface
func (e ExecSQLOnDMSourceRequestValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sExecSQLOnDMSourceRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ExecSQLOnDMSourceRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ExecSQLOnDMSourceRequestValidationError{}

// 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

	if all {
		switch v := interface{}(m.GetEncryptedPassword()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, ConnProfileValidationError{
					field:  "EncryptedPassword",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, ConnProfileValidationError{
					field:  "EncryptedPassword",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetEncryptedPassword()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return ConnProfileValidationError{
				field:  "EncryptedPassword",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	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 m.Endpoint.(type) {

	case *ConnProfile_EndpointId:
		// no validation rules for EndpointId

	case *ConnProfile_Host:
		// no validation rules for Host

	}

	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 ExecSQLOnDMSourceResponse with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *ExecSQLOnDMSourceResponse) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on ExecSQLOnDMSourceResponse with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// ExecSQLOnDMSourceResponseMultiError, or nil if none found.
func (m *ExecSQLOnDMSourceResponse) ValidateAll() error {
	return m.validate(true)
}

func (m *ExecSQLOnDMSourceResponse) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for ErrorMsg

	// no validation rules for SqlResult

	for idx, item := range m.GetRows() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, ExecSQLOnDMSourceResponseValidationError{
						field:  fmt.Sprintf("Rows[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ExecSQLOnDMSourceResponseValidationError{
						field:  fmt.Sprintf("Rows[%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 ExecSQLOnDMSourceResponseValidationError{
					field:  fmt.Sprintf("Rows[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for PemChanged

	if len(errors) > 0 {
		return ExecSQLOnDMSourceResponseMultiError(errors)
	}

	return nil
}

// ExecSQLOnDMSourceResponseMultiError is an error wrapping multiple validation
// errors returned by ExecSQLOnDMSourceResponse.ValidateAll() if the
// designated constraints aren't met.
type ExecSQLOnDMSourceResponseMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m ExecSQLOnDMSourceResponseMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m ExecSQLOnDMSourceResponseMultiError) AllErrors() []error { return m }

// ExecSQLOnDMSourceResponseValidationError is the validation error returned by
// ExecSQLOnDMSourceResponse.Validate if the designated constraints aren't met.
type ExecSQLOnDMSourceResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ExecSQLOnDMSourceResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ExecSQLOnDMSourceResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ExecSQLOnDMSourceResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ExecSQLOnDMSourceResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ExecSQLOnDMSourceResponseValidationError) ErrorName() string {
	return "ExecSQLOnDMSourceResponseValidationError"
}

// Error satisfies the builtin error interface
func (e ExecSQLOnDMSourceResponseValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sExecSQLOnDMSourceResponse.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ExecSQLOnDMSourceResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ExecSQLOnDMSourceResponseValidationError{}

// Validate checks the field values on PrecheckImportFileReq_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 *PrecheckImportFileReq_Source) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on PrecheckImportFileReq_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
// PrecheckImportFileReq_SourceMultiError, or nil if none found.
func (m *PrecheckImportFileReq_Source) ValidateAll() error {
	return m.validate(true)
}

func (m *PrecheckImportFileReq_Source) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetTable()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, PrecheckImportFileReq_SourceValidationError{
					field:  "Table",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, PrecheckImportFileReq_SourceValidationError{
					field:  "Table",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetTable()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return PrecheckImportFileReq_SourceValidationError{
				field:  "Table",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for File

	if len(errors) > 0 {
		return PrecheckImportFileReq_SourceMultiError(errors)
	}

	return nil
}

// PrecheckImportFileReq_SourceMultiError is an error wrapping multiple
// validation errors returned by PrecheckImportFileReq_Source.ValidateAll() if
// the designated constraints aren't met.
type PrecheckImportFileReq_SourceMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m PrecheckImportFileReq_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 PrecheckImportFileReq_SourceMultiError) AllErrors() []error { return m }

// PrecheckImportFileReq_SourceValidationError is the validation error returned
// by PrecheckImportFileReq_Source.Validate if the designated constraints
// aren't met.
type PrecheckImportFileReq_SourceValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e PrecheckImportFileReq_SourceValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e PrecheckImportFileReq_SourceValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e PrecheckImportFileReq_SourceValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e PrecheckImportFileReq_SourceValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e PrecheckImportFileReq_SourceValidationError) ErrorName() string {
	return "PrecheckImportFileReq_SourceValidationError"
}

// Error satisfies the builtin error interface
func (e PrecheckImportFileReq_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 %sPrecheckImportFileReq_Source.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = PrecheckImportFileReq_SourceValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = PrecheckImportFileReq_SourceValidationError{}

// Validate checks the field values on SearchImportFilesReq_TargetSource with
// the rules defined in the proto definition for this message. If any rules
// are violated, the first error encountered is returned, or nil if there are
// no violations.
func (m *SearchImportFilesReq_TargetSource) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on SearchImportFilesReq_TargetSource
// with the rules defined in the proto definition for this message. If any
// rules are violated, the result is a list of violation errors wrapped in
// SearchImportFilesReq_TargetSourceMultiError, or nil if none found.
func (m *SearchImportFilesReq_TargetSource) ValidateAll() error {
	return m.validate(true)
}

func (m *SearchImportFilesReq_TargetSource) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetTargetTable()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, SearchImportFilesReq_TargetSourceValidationError{
					field:  "TargetTable",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, SearchImportFilesReq_TargetSourceValidationError{
					field:  "TargetTable",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetTargetTable()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return SearchImportFilesReq_TargetSourceValidationError{
				field:  "TargetTable",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for CustomFile

	if len(errors) > 0 {
		return SearchImportFilesReq_TargetSourceMultiError(errors)
	}

	return nil
}

// SearchImportFilesReq_TargetSourceMultiError is an error wrapping multiple
// validation errors returned by
// SearchImportFilesReq_TargetSource.ValidateAll() if the designated
// constraints aren't met.
type SearchImportFilesReq_TargetSourceMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m SearchImportFilesReq_TargetSourceMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m SearchImportFilesReq_TargetSourceMultiError) AllErrors() []error { return m }

// SearchImportFilesReq_TargetSourceValidationError is the validation error
// returned by SearchImportFilesReq_TargetSource.Validate if the designated
// constraints aren't met.
type SearchImportFilesReq_TargetSourceValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e SearchImportFilesReq_TargetSourceValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e SearchImportFilesReq_TargetSourceValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e SearchImportFilesReq_TargetSourceValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e SearchImportFilesReq_TargetSourceValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e SearchImportFilesReq_TargetSourceValidationError) ErrorName() string {
	return "SearchImportFilesReq_TargetSourceValidationError"
}

// Error satisfies the builtin error interface
func (e SearchImportFilesReq_TargetSourceValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sSearchImportFilesReq_TargetSource.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = SearchImportFilesReq_TargetSourceValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = SearchImportFilesReq_TargetSourceValidationError{}

// Validate checks the field values on GetImportFilesReq_TableMeta with the
// rules defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetImportFilesReq_TableMeta) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetImportFilesReq_TableMeta with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetImportFilesReq_TableMetaMultiError, or nil if none found.
func (m *GetImportFilesReq_TableMeta) ValidateAll() error {
	return m.validate(true)
}

func (m *GetImportFilesReq_TableMeta) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Database

	// no validation rules for Table

	// no validation rules for WildcardPath

	if len(errors) > 0 {
		return GetImportFilesReq_TableMetaMultiError(errors)
	}

	return nil
}

// GetImportFilesReq_TableMetaMultiError is an error wrapping multiple
// validation errors returned by GetImportFilesReq_TableMeta.ValidateAll() if
// the designated constraints aren't met.
type GetImportFilesReq_TableMetaMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetImportFilesReq_TableMetaMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetImportFilesReq_TableMetaMultiError) AllErrors() []error { return m }

// GetImportFilesReq_TableMetaValidationError is the validation error returned
// by GetImportFilesReq_TableMeta.Validate if the designated constraints
// aren't met.
type GetImportFilesReq_TableMetaValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetImportFilesReq_TableMetaValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetImportFilesReq_TableMetaValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetImportFilesReq_TableMetaValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetImportFilesReq_TableMetaValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetImportFilesReq_TableMetaValidationError) ErrorName() string {
	return "GetImportFilesReq_TableMetaValidationError"
}

// Error satisfies the builtin error interface
func (e GetImportFilesReq_TableMetaValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetImportFilesReq_TableMeta.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetImportFilesReq_TableMetaValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetImportFilesReq_TableMetaValidationError{}

// Validate checks the field values on
// CreateImportDataSizeEstimateTaskReq_TableMeta with the rules defined in the
// proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *CreateImportDataSizeEstimateTaskReq_TableMeta) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// CreateImportDataSizeEstimateTaskReq_TableMeta with the rules defined in the
// proto definition for this message. If any rules are violated, the result is
// a list of violation errors wrapped in
// CreateImportDataSizeEstimateTaskReq_TableMetaMultiError, or nil if none found.
func (m *CreateImportDataSizeEstimateTaskReq_TableMeta) ValidateAll() error {
	return m.validate(true)
}

func (m *CreateImportDataSizeEstimateTaskReq_TableMeta) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Database

	// no validation rules for Table

	// no validation rules for WildcardPath

	if len(errors) > 0 {
		return CreateImportDataSizeEstimateTaskReq_TableMetaMultiError(errors)
	}

	return nil
}

// CreateImportDataSizeEstimateTaskReq_TableMetaMultiError is an error wrapping
// multiple validation errors returned by
// CreateImportDataSizeEstimateTaskReq_TableMeta.ValidateAll() if the
// designated constraints aren't met.
type CreateImportDataSizeEstimateTaskReq_TableMetaMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m CreateImportDataSizeEstimateTaskReq_TableMetaMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m CreateImportDataSizeEstimateTaskReq_TableMetaMultiError) AllErrors() []error { return m }

// CreateImportDataSizeEstimateTaskReq_TableMetaValidationError is the
// validation error returned by
// CreateImportDataSizeEstimateTaskReq_TableMeta.Validate if the designated
// constraints aren't met.
type CreateImportDataSizeEstimateTaskReq_TableMetaValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e CreateImportDataSizeEstimateTaskReq_TableMetaValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e CreateImportDataSizeEstimateTaskReq_TableMetaValidationError) Reason() string {
	return e.reason
}

// Cause function returns cause value.
func (e CreateImportDataSizeEstimateTaskReq_TableMetaValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e CreateImportDataSizeEstimateTaskReq_TableMetaValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e CreateImportDataSizeEstimateTaskReq_TableMetaValidationError) ErrorName() string {
	return "CreateImportDataSizeEstimateTaskReq_TableMetaValidationError"
}

// Error satisfies the builtin error interface
func (e CreateImportDataSizeEstimateTaskReq_TableMetaValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sCreateImportDataSizeEstimateTaskReq_TableMeta.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = CreateImportDataSizeEstimateTaskReq_TableMetaValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = CreateImportDataSizeEstimateTaskReq_TableMetaValidationError{}

// Validate checks the field values on
// GetImportDataSizeEstimateTaskResp_TableEstimate with the rules defined in
// the proto definition for this message. If any rules are violated, the first
// error encountered is returned, or nil if there are no violations.
func (m *GetImportDataSizeEstimateTaskResp_TableEstimate) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// GetImportDataSizeEstimateTaskResp_TableEstimate with the rules defined in
// the proto definition for this message. If any rules are violated, the
// result is a list of violation errors wrapped in
// GetImportDataSizeEstimateTaskResp_TableEstimateMultiError, or nil if none found.
func (m *GetImportDataSizeEstimateTaskResp_TableEstimate) ValidateAll() error {
	return m.validate(true)
}

func (m *GetImportDataSizeEstimateTaskResp_TableEstimate) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Database

	// no validation rules for Table

	// no validation rules for SourceSize

	// no validation rules for TikvSize

	if len(errors) > 0 {
		return GetImportDataSizeEstimateTaskResp_TableEstimateMultiError(errors)
	}

	return nil
}

// GetImportDataSizeEstimateTaskResp_TableEstimateMultiError is an error
// wrapping multiple validation errors returned by
// GetImportDataSizeEstimateTaskResp_TableEstimate.ValidateAll() if the
// designated constraints aren't met.
type GetImportDataSizeEstimateTaskResp_TableEstimateMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetImportDataSizeEstimateTaskResp_TableEstimateMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetImportDataSizeEstimateTaskResp_TableEstimateMultiError) AllErrors() []error { return m }

// GetImportDataSizeEstimateTaskResp_TableEstimateValidationError is the
// validation error returned by
// GetImportDataSizeEstimateTaskResp_TableEstimate.Validate if the designated
// constraints aren't met.
type GetImportDataSizeEstimateTaskResp_TableEstimateValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetImportDataSizeEstimateTaskResp_TableEstimateValidationError) Field() string {
	return e.field
}

// Reason function returns reason value.
func (e GetImportDataSizeEstimateTaskResp_TableEstimateValidationError) Reason() string {
	return e.reason
}

// Cause function returns cause value.
func (e GetImportDataSizeEstimateTaskResp_TableEstimateValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetImportDataSizeEstimateTaskResp_TableEstimateValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetImportDataSizeEstimateTaskResp_TableEstimateValidationError) ErrorName() string {
	return "GetImportDataSizeEstimateTaskResp_TableEstimateValidationError"
}

// Error satisfies the builtin error interface
func (e GetImportDataSizeEstimateTaskResp_TableEstimateValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetImportDataSizeEstimateTaskResp_TableEstimate.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetImportDataSizeEstimateTaskResp_TableEstimateValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetImportDataSizeEstimateTaskResp_TableEstimateValidationError{}

// Validate checks the field values on GetImportDataSizeEstimateTaskResp_Result
// with the rules defined in the proto definition for this message. If any
// rules are violated, the first error encountered is returned, or nil if
// there are no violations.
func (m *GetImportDataSizeEstimateTaskResp_Result) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on
// GetImportDataSizeEstimateTaskResp_Result with the rules defined in the
// proto definition for this message. If any rules are violated, the result is
// a list of violation errors wrapped in
// GetImportDataSizeEstimateTaskResp_ResultMultiError, or nil if none found.
func (m *GetImportDataSizeEstimateTaskResp_Result) ValidateAll() error {
	return m.validate(true)
}

func (m *GetImportDataSizeEstimateTaskResp_Result) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for TotalSourceSize

	// no validation rules for TotalTikvSize

	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, GetImportDataSizeEstimateTaskResp_ResultValidationError{
						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, GetImportDataSizeEstimateTaskResp_ResultValidationError{
						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 GetImportDataSizeEstimateTaskResp_ResultValidationError{
					field:  fmt.Sprintf("Tables[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	if len(errors) > 0 {
		return GetImportDataSizeEstimateTaskResp_ResultMultiError(errors)
	}

	return nil
}

// GetImportDataSizeEstimateTaskResp_ResultMultiError is an error wrapping
// multiple validation errors returned by
// GetImportDataSizeEstimateTaskResp_Result.ValidateAll() if the designated
// constraints aren't met.
type GetImportDataSizeEstimateTaskResp_ResultMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetImportDataSizeEstimateTaskResp_ResultMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetImportDataSizeEstimateTaskResp_ResultMultiError) AllErrors() []error { return m }

// GetImportDataSizeEstimateTaskResp_ResultValidationError is the validation
// error returned by GetImportDataSizeEstimateTaskResp_Result.Validate if the
// designated constraints aren't met.
type GetImportDataSizeEstimateTaskResp_ResultValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetImportDataSizeEstimateTaskResp_ResultValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetImportDataSizeEstimateTaskResp_ResultValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetImportDataSizeEstimateTaskResp_ResultValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetImportDataSizeEstimateTaskResp_ResultValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetImportDataSizeEstimateTaskResp_ResultValidationError) ErrorName() string {
	return "GetImportDataSizeEstimateTaskResp_ResultValidationError"
}

// Error satisfies the builtin error interface
func (e GetImportDataSizeEstimateTaskResp_ResultValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetImportDataSizeEstimateTaskResp_Result.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetImportDataSizeEstimateTaskResp_ResultValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetImportDataSizeEstimateTaskResp_ResultValidationError{}

// Validate checks the field values on GetImportFilesResp_DataFileMeta with the
// rules defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetImportFilesResp_DataFileMeta) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetImportFilesResp_DataFileMeta with
// the rules defined in the proto definition for this message. If any rules
// are violated, the result is a list of violation errors wrapped in
// GetImportFilesResp_DataFileMetaMultiError, or nil if none found.
func (m *GetImportFilesResp_DataFileMeta) ValidateAll() error {
	return m.validate(true)
}

func (m *GetImportFilesResp_DataFileMeta) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Path

	// no validation rules for Size

	// no validation rules for SourceType

	// no validation rules for Compression

	if len(errors) > 0 {
		return GetImportFilesResp_DataFileMetaMultiError(errors)
	}

	return nil
}

// GetImportFilesResp_DataFileMetaMultiError is an error wrapping multiple
// validation errors returned by GetImportFilesResp_DataFileMeta.ValidateAll()
// if the designated constraints aren't met.
type GetImportFilesResp_DataFileMetaMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetImportFilesResp_DataFileMetaMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetImportFilesResp_DataFileMetaMultiError) AllErrors() []error { return m }

// GetImportFilesResp_DataFileMetaValidationError is the validation error
// returned by GetImportFilesResp_DataFileMeta.Validate if the designated
// constraints aren't met.
type GetImportFilesResp_DataFileMetaValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetImportFilesResp_DataFileMetaValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetImportFilesResp_DataFileMetaValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetImportFilesResp_DataFileMetaValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetImportFilesResp_DataFileMetaValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetImportFilesResp_DataFileMetaValidationError) ErrorName() string {
	return "GetImportFilesResp_DataFileMetaValidationError"
}

// Error satisfies the builtin error interface
func (e GetImportFilesResp_DataFileMetaValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetImportFilesResp_DataFileMeta.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetImportFilesResp_DataFileMetaValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetImportFilesResp_DataFileMetaValidationError{}

// Validate checks the field values on GetImportFilesResp_TableMeta with the
// rules defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetImportFilesResp_TableMeta) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetImportFilesResp_TableMeta with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// GetImportFilesResp_TableMetaMultiError, or nil if none found.
func (m *GetImportFilesResp_TableMeta) ValidateAll() error {
	return m.validate(true)
}

func (m *GetImportFilesResp_TableMeta) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Database

	// no validation rules for Table

	for idx, item := range m.GetDataFiles() {
		_, _ = idx, item

		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, GetImportFilesResp_TableMetaValidationError{
						field:  fmt.Sprintf("DataFiles[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, GetImportFilesResp_TableMetaValidationError{
						field:  fmt.Sprintf("DataFiles[%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 GetImportFilesResp_TableMetaValidationError{
					field:  fmt.Sprintf("DataFiles[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	// no validation rules for TotalSize

	// no validation rules for WildcardPath

	// no validation rules for SchemaFile

	// no validation rules for TableCreated

	if len(errors) > 0 {
		return GetImportFilesResp_TableMetaMultiError(errors)
	}

	return nil
}

// GetImportFilesResp_TableMetaMultiError is an error wrapping multiple
// validation errors returned by GetImportFilesResp_TableMeta.ValidateAll() if
// the designated constraints aren't met.
type GetImportFilesResp_TableMetaMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetImportFilesResp_TableMetaMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetImportFilesResp_TableMetaMultiError) AllErrors() []error { return m }

// GetImportFilesResp_TableMetaValidationError is the validation error returned
// by GetImportFilesResp_TableMeta.Validate if the designated constraints
// aren't met.
type GetImportFilesResp_TableMetaValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetImportFilesResp_TableMetaValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetImportFilesResp_TableMetaValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetImportFilesResp_TableMetaValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetImportFilesResp_TableMetaValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetImportFilesResp_TableMetaValidationError) ErrorName() string {
	return "GetImportFilesResp_TableMetaValidationError"
}

// Error satisfies the builtin error interface
func (e GetImportFilesResp_TableMetaValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetImportFilesResp_TableMeta.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetImportFilesResp_TableMetaValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetImportFilesResp_TableMetaValidationError{}

// Validate checks the field values on CreateSchemasReq_Schema with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *CreateSchemasReq_Schema) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on CreateSchemasReq_Schema with the
// rules defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// CreateSchemasReq_SchemaMultiError, or nil if none found.
func (m *CreateSchemasReq_Schema) ValidateAll() error {
	return m.validate(true)
}

func (m *CreateSchemasReq_Schema) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Database

	// no validation rules for Table

	if len(errors) > 0 {
		return CreateSchemasReq_SchemaMultiError(errors)
	}

	return nil
}

// CreateSchemasReq_SchemaMultiError is an error wrapping multiple validation
// errors returned by CreateSchemasReq_Schema.ValidateAll() if the designated
// constraints aren't met.
type CreateSchemasReq_SchemaMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m CreateSchemasReq_SchemaMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m CreateSchemasReq_SchemaMultiError) AllErrors() []error { return m }

// CreateSchemasReq_SchemaValidationError is the validation error returned by
// CreateSchemasReq_Schema.Validate if the designated constraints aren't met.
type CreateSchemasReq_SchemaValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e CreateSchemasReq_SchemaValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e CreateSchemasReq_SchemaValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e CreateSchemasReq_SchemaValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e CreateSchemasReq_SchemaValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e CreateSchemasReq_SchemaValidationError) ErrorName() string {
	return "CreateSchemasReq_SchemaValidationError"
}

// Error satisfies the builtin error interface
func (e CreateSchemasReq_SchemaValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sCreateSchemasReq_Schema.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = CreateSchemasReq_SchemaValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = CreateSchemasReq_SchemaValidationError{}

// Validate checks the field values on CreateSchemasResp_TableResult with the
// rules defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *CreateSchemasResp_TableResult) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on CreateSchemasResp_TableResult with
// the rules defined in the proto definition for this message. If any rules
// are violated, the result is a list of violation errors wrapped in
// CreateSchemasResp_TableResultMultiError, or nil if none found.
func (m *CreateSchemasResp_TableResult) ValidateAll() error {
	return m.validate(true)
}

func (m *CreateSchemasResp_TableResult) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Database

	// no validation rules for Table

	// no validation rules for Status

	if m.ErrorMsg != nil {
		// no validation rules for ErrorMsg
	}

	if len(errors) > 0 {
		return CreateSchemasResp_TableResultMultiError(errors)
	}

	return nil
}

// CreateSchemasResp_TableResultMultiError is an error wrapping multiple
// validation errors returned by CreateSchemasResp_TableResult.ValidateAll()
// if the designated constraints aren't met.
type CreateSchemasResp_TableResultMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m CreateSchemasResp_TableResultMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m CreateSchemasResp_TableResultMultiError) AllErrors() []error { return m }

// CreateSchemasResp_TableResultValidationError is the validation error
// returned by CreateSchemasResp_TableResult.Validate if the designated
// constraints aren't met.
type CreateSchemasResp_TableResultValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e CreateSchemasResp_TableResultValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e CreateSchemasResp_TableResultValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e CreateSchemasResp_TableResultValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e CreateSchemasResp_TableResultValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e CreateSchemasResp_TableResultValidationError) ErrorName() string {
	return "CreateSchemasResp_TableResultValidationError"
}

// Error satisfies the builtin error interface
func (e CreateSchemasResp_TableResultValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sCreateSchemasResp_TableResult.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = CreateSchemasResp_TableResultValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = CreateSchemasResp_TableResultValidationError{}

// Validate checks the field values on SearchImportFilesResp_TableMatch with
// the rules defined in the proto definition for this message. If any rules
// are violated, the first error encountered is returned, or nil if there are
// no violations.
func (m *SearchImportFilesResp_TableMatch) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on SearchImportFilesResp_TableMatch with
// the rules defined in the proto definition for this message. If any rules
// are violated, the result is a list of violation errors wrapped in
// SearchImportFilesResp_TableMatchMultiError, or nil if none found.
func (m *SearchImportFilesResp_TableMatch) ValidateAll() error {
	return m.validate(true)
}

func (m *SearchImportFilesResp_TableMatch) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	if all {
		switch v := interface{}(m.GetTargetTable()).(type) {
		case interface{ ValidateAll() error }:
			if err := v.ValidateAll(); err != nil {
				errors = append(errors, SearchImportFilesResp_TableMatchValidationError{
					field:  "TargetTable",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, SearchImportFilesResp_TableMatchValidationError{
					field:  "TargetTable",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		}
	} else if v, ok := interface{}(m.GetTargetTable()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return SearchImportFilesResp_TableMatchValidationError{
				field:  "TargetTable",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for SourceUri

	if len(errors) > 0 {
		return SearchImportFilesResp_TableMatchMultiError(errors)
	}

	return nil
}

// SearchImportFilesResp_TableMatchMultiError is an error wrapping multiple
// validation errors returned by
// SearchImportFilesResp_TableMatch.ValidateAll() if the designated
// constraints aren't met.
type SearchImportFilesResp_TableMatchMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m SearchImportFilesResp_TableMatchMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m SearchImportFilesResp_TableMatchMultiError) AllErrors() []error { return m }

// SearchImportFilesResp_TableMatchValidationError is the validation error
// returned by SearchImportFilesResp_TableMatch.Validate if the designated
// constraints aren't met.
type SearchImportFilesResp_TableMatchValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e SearchImportFilesResp_TableMatchValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e SearchImportFilesResp_TableMatchValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e SearchImportFilesResp_TableMatchValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e SearchImportFilesResp_TableMatchValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e SearchImportFilesResp_TableMatchValidationError) ErrorName() string {
	return "SearchImportFilesResp_TableMatchValidationError"
}

// Error satisfies the builtin error interface
func (e SearchImportFilesResp_TableMatchValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sSearchImportFilesResp_TableMatch.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = SearchImportFilesResp_TableMatchValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = SearchImportFilesResp_TableMatchValidationError{}

// Validate checks the field values on BatchCreateImportIntoJobTasksReq_Task
// with the rules defined in the proto definition for this message. If any
// rules are violated, the first error encountered is returned, or nil if
// there are no violations.
func (m *BatchCreateImportIntoJobTasksReq_Task) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BatchCreateImportIntoJobTasksReq_Task
// with the rules defined in the proto definition for this message. If any
// rules are violated, the result is a list of violation errors wrapped in
// BatchCreateImportIntoJobTasksReq_TaskMultiError, or nil if none found.
func (m *BatchCreateImportIntoJobTasksReq_Task) ValidateAll() error {
	return m.validate(true)
}

func (m *BatchCreateImportIntoJobTasksReq_Task) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for TaskId

	// no validation rules for Sql

	if len(errors) > 0 {
		return BatchCreateImportIntoJobTasksReq_TaskMultiError(errors)
	}

	return nil
}

// BatchCreateImportIntoJobTasksReq_TaskMultiError is an error wrapping
// multiple validation errors returned by
// BatchCreateImportIntoJobTasksReq_Task.ValidateAll() if the designated
// constraints aren't met.
type BatchCreateImportIntoJobTasksReq_TaskMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BatchCreateImportIntoJobTasksReq_TaskMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m BatchCreateImportIntoJobTasksReq_TaskMultiError) AllErrors() []error { return m }

// BatchCreateImportIntoJobTasksReq_TaskValidationError is the validation error
// returned by BatchCreateImportIntoJobTasksReq_Task.Validate if the
// designated constraints aren't met.
type BatchCreateImportIntoJobTasksReq_TaskValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BatchCreateImportIntoJobTasksReq_TaskValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BatchCreateImportIntoJobTasksReq_TaskValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BatchCreateImportIntoJobTasksReq_TaskValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BatchCreateImportIntoJobTasksReq_TaskValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BatchCreateImportIntoJobTasksReq_TaskValidationError) ErrorName() string {
	return "BatchCreateImportIntoJobTasksReq_TaskValidationError"
}

// Error satisfies the builtin error interface
func (e BatchCreateImportIntoJobTasksReq_TaskValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sBatchCreateImportIntoJobTasksReq_Task.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BatchCreateImportIntoJobTasksReq_TaskValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BatchCreateImportIntoJobTasksReq_TaskValidationError{}

// Validate checks the field values on GetImportIntoJobTaskResp_Result with the
// rules defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *GetImportIntoJobTaskResp_Result) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on GetImportIntoJobTaskResp_Result with
// the rules defined in the proto definition for this message. If any rules
// are violated, the result is a list of violation errors wrapped in
// GetImportIntoJobTaskResp_ResultMultiError, or nil if none found.
func (m *GetImportIntoJobTaskResp_Result) ValidateAll() error {
	return m.validate(true)
}

func (m *GetImportIntoJobTaskResp_Result) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for JobId

	if len(errors) > 0 {
		return GetImportIntoJobTaskResp_ResultMultiError(errors)
	}

	return nil
}

// GetImportIntoJobTaskResp_ResultMultiError is an error wrapping multiple
// validation errors returned by GetImportIntoJobTaskResp_Result.ValidateAll()
// if the designated constraints aren't met.
type GetImportIntoJobTaskResp_ResultMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m GetImportIntoJobTaskResp_ResultMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m GetImportIntoJobTaskResp_ResultMultiError) AllErrors() []error { return m }

// GetImportIntoJobTaskResp_ResultValidationError is the validation error
// returned by GetImportIntoJobTaskResp_Result.Validate if the designated
// constraints aren't met.
type GetImportIntoJobTaskResp_ResultValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetImportIntoJobTaskResp_ResultValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetImportIntoJobTaskResp_ResultValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetImportIntoJobTaskResp_ResultValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetImportIntoJobTaskResp_ResultValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetImportIntoJobTaskResp_ResultValidationError) ErrorName() string {
	return "GetImportIntoJobTaskResp_ResultValidationError"
}

// Error satisfies the builtin error interface
func (e GetImportIntoJobTaskResp_ResultValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetImportIntoJobTaskResp_Result.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetImportIntoJobTaskResp_ResultValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetImportIntoJobTaskResp_ResultValidationError{}

// Validate checks the field values on BatchCancelImportIntoJobsResp_Result
// with the rules defined in the proto definition for this message. If any
// rules are violated, the first error encountered is returned, or nil if
// there are no violations.
func (m *BatchCancelImportIntoJobsResp_Result) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on BatchCancelImportIntoJobsResp_Result
// with the rules defined in the proto definition for this message. If any
// rules are violated, the result is a list of violation errors wrapped in
// BatchCancelImportIntoJobsResp_ResultMultiError, or nil if none found.
func (m *BatchCancelImportIntoJobsResp_Result) ValidateAll() error {
	return m.validate(true)
}

func (m *BatchCancelImportIntoJobsResp_Result) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for JobId

	if m.ErrorMsg != nil {
		// no validation rules for ErrorMsg
	}

	if len(errors) > 0 {
		return BatchCancelImportIntoJobsResp_ResultMultiError(errors)
	}

	return nil
}

// BatchCancelImportIntoJobsResp_ResultMultiError is an error wrapping multiple
// validation errors returned by
// BatchCancelImportIntoJobsResp_Result.ValidateAll() if the designated
// constraints aren't met.
type BatchCancelImportIntoJobsResp_ResultMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m BatchCancelImportIntoJobsResp_ResultMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m BatchCancelImportIntoJobsResp_ResultMultiError) AllErrors() []error { return m }

// BatchCancelImportIntoJobsResp_ResultValidationError is the validation error
// returned by BatchCancelImportIntoJobsResp_Result.Validate if the designated
// constraints aren't met.
type BatchCancelImportIntoJobsResp_ResultValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e BatchCancelImportIntoJobsResp_ResultValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e BatchCancelImportIntoJobsResp_ResultValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e BatchCancelImportIntoJobsResp_ResultValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e BatchCancelImportIntoJobsResp_ResultValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e BatchCancelImportIntoJobsResp_ResultValidationError) ErrorName() string {
	return "BatchCancelImportIntoJobsResp_ResultValidationError"
}

// Error satisfies the builtin error interface
func (e BatchCancelImportIntoJobsResp_ResultValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sBatchCancelImportIntoJobsResp_Result.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = BatchCancelImportIntoJobsResp_ResultValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BatchCancelImportIntoJobsResp_ResultValidationError{}

// Validate checks the field values on S3Source_AccessKey with the rules
// defined in the proto definition for this message. If any rules are
// violated, the first error encountered is returned, or nil if there are no violations.
func (m *S3Source_AccessKey) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on S3Source_AccessKey with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// S3Source_AccessKeyMultiError, or nil if none found.
func (m *S3Source_AccessKey) ValidateAll() error {
	return m.validate(true)
}

func (m *S3Source_AccessKey) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for Id

	// no validation rules for Secret

	if len(errors) > 0 {
		return S3Source_AccessKeyMultiError(errors)
	}

	return nil
}

// S3Source_AccessKeyMultiError is an error wrapping multiple validation errors
// returned by S3Source_AccessKey.ValidateAll() if the designated constraints
// aren't met.
type S3Source_AccessKeyMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m S3Source_AccessKeyMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m S3Source_AccessKeyMultiError) AllErrors() []error { return m }

// S3Source_AccessKeyValidationError is the validation error returned by
// S3Source_AccessKey.Validate if the designated constraints aren't met.
type S3Source_AccessKeyValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e S3Source_AccessKeyValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e S3Source_AccessKeyValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e S3Source_AccessKeyValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e S3Source_AccessKeyValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e S3Source_AccessKeyValidationError) ErrorName() string {
	return "S3Source_AccessKeyValidationError"
}

// Error satisfies the builtin error interface
func (e S3Source_AccessKeyValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sS3Source_AccessKey.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = S3Source_AccessKeyValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = S3Source_AccessKeyValidationError{}

// Validate checks the field values on S3Source_RoleArn with the rules defined
// in the proto definition for this message. If any rules are violated, the
// first error encountered is returned, or nil if there are no violations.
func (m *S3Source_RoleArn) Validate() error {
	return m.validate(false)
}

// ValidateAll checks the field values on S3Source_RoleArn with the rules
// defined in the proto definition for this message. If any rules are
// violated, the result is a list of violation errors wrapped in
// S3Source_RoleArnMultiError, or nil if none found.
func (m *S3Source_RoleArn) ValidateAll() error {
	return m.validate(true)
}

func (m *S3Source_RoleArn) validate(all bool) error {
	if m == nil {
		return nil
	}

	var errors []error

	// no validation rules for RoleArn

	// no validation rules for ExternalId

	if len(errors) > 0 {
		return S3Source_RoleArnMultiError(errors)
	}

	return nil
}

// S3Source_RoleArnMultiError is an error wrapping multiple validation errors
// returned by S3Source_RoleArn.ValidateAll() if the designated constraints
// aren't met.
type S3Source_RoleArnMultiError []error

// Error returns a concatenation of all the error messages it wraps.
func (m S3Source_RoleArnMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}

// AllErrors returns a list of validation violation errors.
func (m S3Source_RoleArnMultiError) AllErrors() []error { return m }

// S3Source_RoleArnValidationError is the validation error returned by
// S3Source_RoleArn.Validate if the designated constraints aren't met.
type S3Source_RoleArnValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e S3Source_RoleArnValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e S3Source_RoleArnValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e S3Source_RoleArnValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e S3Source_RoleArnValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e S3Source_RoleArnValidationError) ErrorName() string { return "S3Source_RoleArnValidationError" }

// Error satisfies the builtin error interface
func (e S3Source_RoleArnValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sS3Source_RoleArn.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = S3Source_RoleArnValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = S3Source_RoleArnValidationError{}
