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

package console

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

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

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListTargetTablesReqValidationError{}

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

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

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

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

	var errors []error

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListTargetTablesRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Database

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DatabaseValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for ValidationType

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ValidateImportReqValidationError{}

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

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

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

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

	var errors []error

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ValidateImportRespValidationError{}

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

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

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

func (m *PrecheckReq) 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, PrecheckReqValidationError{
					field:  "ImportOptions",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, PrecheckReqValidationError{
					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 PrecheckReqValidationError{
				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, PrecheckReqValidationError{
					field:  "Source",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, PrecheckReqValidationError{
					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 PrecheckReqValidationError{
				field:  "Source",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = PrecheckReqValidationError{}

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

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

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

func (m *PrecheckResp) 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, PrecheckRespValidationError{
						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, PrecheckRespValidationError{
						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 PrecheckRespValidationError{
					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 Status

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = PrecheckRespValidationError{}

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

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

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

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

	var errors []error

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ImportsSupportedDataTypesRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for Database

	// no validation rules for Table

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ImportsGetTableColumnsReqValidationError{}

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

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

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

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

	var errors []error

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ImportsGetTableColumnsRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for FileName

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = UploadRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for UploadUrl

	// no validation rules for UploadId

	// no validation rules for CompatibleId

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = UploadResponseValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Separator

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

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

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CSVFormatValidationError{}

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

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

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

func (m *CreateImportReq) 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, CreateImportReqValidationError{
					field:  "ImportOptions",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, CreateImportReqValidationError{
					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 CreateImportReqValidationError{
				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, CreateImportReqValidationError{
					field:  "Source",
					reason: "embedded message failed validation",
					cause:  err,
				})
			}
		case interface{ Validate() error }:
			if err := v.Validate(); err != nil {
				errors = append(errors, CreateImportReqValidationError{
					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 CreateImportReqValidationError{
				field:  "Source",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	// no validation rules for Creator

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateImportReqValidationError{}

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

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

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

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

	var errors []error

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreationDetailsValidationError{}

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

// 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 v := m.Format.(type) {
	case *ImportOptions_CsvFormat:
		if v == nil {
			err := ImportOptionsValidationError{
				field:  "Format",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}

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

	default:
		_ = v // ensures v is used
	}

	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 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 v := m.Source.(type) {
	case *ImportSource_Local:
		if v == nil {
			err := ImportSourceValidationError{
				field:  "Source",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}

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

	case *ImportSource_S3:
		if v == nil {
			err := ImportSourceValidationError{
				field:  "Source",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}

		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 v == nil {
			err := ImportSourceValidationError{
				field:  "Source",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}

		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 v == nil {
			err := ImportSourceValidationError{
				field:  "Source",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}

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

	case *ImportSource_S3Compatible:
		if v == nil {
			err := ImportSourceValidationError{
				field:  "Source",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}

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

	case *ImportSource_Oss:
		if v == nil {
			err := ImportSourceValidationError{
				field:  "Source",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}

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

	default:
		_ = v // ensures v is used
	}

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

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

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

	var errors []error

	// no validation rules for UploadId

	// no validation rules for TargetDatabase

	// no validation rules for TargetTable

	// no validation rules for FileName

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = LocalSourceValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ColumnName

	// no validation rules for ColumnType

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ColumnInfoValidationError{}

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

// Validate checks the field values on 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 v := m.Auth.(type) {
	case *S3Source_RoleArn:
		if v == nil {
			err := S3SourceValidationError{
				field:  "Auth",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}
		// no validation rules for RoleArn
	case *S3Source_AccessKey_:
		if v == nil {
			err := S3SourceValidationError{
				field:  "Auth",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}

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

	default:
		_ = v // ensures v is used
	}

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

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

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

	}

	switch v := m.Auth.(type) {
	case *S3CompatibleSource_AccessKey_:
		if v == nil {
			err := S3CompatibleSourceValidationError{
				field:  "Auth",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}

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

	default:
		_ = v // ensures v is used
	}

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = S3CompatibleSourceValidationError{}

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

// 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 v := m.Auth.(type) {
	case *GCSSource_ServiceAccountKey:
		if v == nil {
			err := GCSSourceValidationError{
				field:  "Auth",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}
		// no validation rules for ServiceAccountKey
	default:
		_ = v // ensures v is used
	}

	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 v := m.Auth.(type) {
	case *AzureBlobSource_SasToken:
		if v == nil {
			err := AzureBlobSourceValidationError{
				field:  "Auth",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}
		// no validation rules for SasToken
	default:
		_ = v // ensures v is used
	}

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

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

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

	}

	switch v := m.Auth.(type) {
	case *OSSSource_AccessKey_:
		if v == nil {
			err := OSSSourceValidationError{
				field:  "Auth",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}

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

	case *OSSSource_RoleArn:
		if v == nil {
			err := OSSSourceValidationError{
				field:  "Auth",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}
		// no validation rules for RoleArn
	default:
		_ = v // ensures v is used
	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = OSSSourceValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for Id

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ImportIdsValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Id

	// no validation rules for DisplayName

	// no validation rules for ClusterId

	// no validation rules for TotalSize

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

	// no validation rules for State

	// no validation rules for CompletePercent

	// no validation rules for Message

	// no validation rules for CreatedBy

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

	// no validation rules for PostImportCompletedPercent

	// no validation rules for CompatibleId

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

	// no validation rules for TotalTablesCount

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

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

	if m.CompleteTime != nil {

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ImportValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TableName

	// no validation rules for Result

	// no validation rules for Message

	// no validation rules for DataFilePattern

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ImportTableCompletionInfoValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for PageToken

	// no validation rules for PageSize

	// no validation rules for OrderBy

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListImportsReqValidationError{}

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

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

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

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

	var errors []error

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

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

	}

	// no validation rules for TotalSize

	// no validation rules for NextPageToken

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListImportsRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for UploadId

	// no validation rules for FileType

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ImportsPreviewLocalReqValidationError{}

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

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

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

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

	var errors []error

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ImportsPreviewLocalRespValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for DatabaseName

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = FullTableValidationError{}

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

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

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

	// no validation rules for Table

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetProfileReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Type

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

	switch v := m.Profile.(type) {
	case *DataIngestionProfile_S3Profile:
		if v == nil {
			err := DataIngestionProfileValidationError{
				field:  "Profile",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}

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

	default:
		_ = v // ensures v is used
	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DataIngestionProfileValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for AwsAccountId

	// no validation rules for AwsExternalId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = S3ProfileValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ImportDataIngestionProfileTypeValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ImportStateValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ImportS3CompatibleAuthTypeValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ImportOSSAuthTypeValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ImportValidationTypeValidationError{}

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

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

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

func (m *S3CompatibleSource_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 S3CompatibleSource_AccessKeyMultiError(errors)
	}

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = S3CompatibleSource_AccessKeyValidationError{}

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

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

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

func (m *OSSSource_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 OSSSource_AccessKeyMultiError(errors)
	}

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = OSSSource_AccessKeyValidationError{}

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