// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: 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

	// no validation rules for UseSchemaFile

	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

	// no validation rules for Status

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ImportPrecheckStatusTypeValidationError{}

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

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

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

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

	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

	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

	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 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,
				}
			}
		}

	}

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

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

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