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

package v1beta

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

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

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

	var errors []error

	// no validation rules for Separator

	// no validation rules for Delimiter

	// no validation rules for Header

	// no validation rules for NotNull

	// no validation rules for Null

	// no validation rules for BackslashEscape

	// no validation rules for TrimLastSeparator

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CustomCSVFormatValidationError{}

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

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

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

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

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

	// no validation rules for Type

	// no validation rules for DataFormat

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

	// no validation rules for SourceUrl

	// no validation rules for AwsRoleArn

	// no validation rules for FileName

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

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

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

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

	var errors []error

	// no validation rules for Id

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateImportRespValidationError{}

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

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

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

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

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

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

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

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

	var errors []error

	// no validation rules for Name

	// no validation rules for Size

	// no validation rules for CompletedPercent

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CurrentTableValidationError{}

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

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for TotalSize

	// no validation rules for TotalFiles

	// no validation rules for SourceUrl

	// no validation rules for CompletedTables

	// no validation rules for PendingTables

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

	// no validation rules for Status

	// no validation rules for CompletedPercent

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

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

	}

	// no validation rules for DataFormat

	// no validation rules for Message

	// no validation rules for ElapsedTimeSeconds

	// no validation rules for Id

	// no validation rules for ProcessedSourceDataSize

	// no validation rules for TotalTablesCount

	// no validation rules for PostImportCompletedPercent

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

	}

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetImportRespValidationError{}

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

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

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

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

	if m.Page != nil {

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

	}

	if m.PageSize != nil {

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

	}

	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 Total

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

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

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

	var errors []error

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

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

	// no validation rules for FileName

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GenerateUploadURLReqValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for UploadUrl

	// no validation rules for NewFileName

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GenerateUploadURLResqValidationError{}

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