// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: v1beta1/export.proto

package v1beta1

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

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

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

	var errors []error

	// no validation rules for ExportId

	// no validation rules for Name

	// no validation rules for ClusterId

	// no validation rules for CreatedBy

	// no validation rules for State

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

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

	// no validation rules for DisplayName

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

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

	if m.UpdateTime != nil {

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

	}

	if m.SnapshotTime != nil {

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

	}

	if m.ExpireTime != nil {

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

	}

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportStateValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportParquetCompressionTypeValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for FileType

	// no validation rules for Database

	// no validation rules for Table

	// no validation rules for Compression

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

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

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

	}

	if m.CsvFormat != nil {

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

	}

	if m.ParquetFormat != nil {

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

	}

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportOptionsValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportFileTypeValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportCompressionTypeValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportCSVDialectValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportTargetTypeValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportS3AuthTypeValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportGcsAuthTypeValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportAzureBlobAuthTypeValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Type

	switch v := m.Storage.(type) {
	case *ExportTarget_S3:
		if v == nil {
			err := ExportTargetValidationError{
				field:  "Storage",
				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, ExportTargetValidationError{
						field:  "S3",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ExportTargetValidationError{
						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 ExportTargetValidationError{
					field:  "S3",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *ExportTarget_Gcs:
		if v == nil {
			err := ExportTargetValidationError{
				field:  "Storage",
				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, ExportTargetValidationError{
						field:  "Gcs",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ExportTargetValidationError{
						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 ExportTargetValidationError{
					field:  "Gcs",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *ExportTarget_AzureBlob:
		if v == nil {
			err := ExportTargetValidationError{
				field:  "Storage",
				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, ExportTargetValidationError{
						field:  "AzureBlob",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ExportTargetValidationError{
						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 ExportTargetValidationError{
					field:  "AzureBlob",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	case *ExportTarget_Oss:
		if v == nil {
			err := ExportTargetValidationError{
				field:  "Storage",
				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, ExportTargetValidationError{
						field:  "Oss",
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, ExportTargetValidationError{
						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 ExportTargetValidationError{
					field:  "Oss",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportTargetValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Uri

	// no validation rules for AuthType

	switch v := m.Auth.(type) {
	case *GCSTarget_ServiceAccountKey:
		if v == nil {
			err := GCSTargetValidationError{
				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 GCSTargetMultiError(errors)
	}

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GCSTargetValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for AuthType

	// no validation rules for Uri

	switch v := m.Auth.(type) {
	case *AzureBlobTarget_SasToken:
		if v == nil {
			err := AzureBlobTargetValidationError{
				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 AzureBlobTargetMultiError(errors)
	}

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = AzureBlobTargetValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for BucketUri

	// no validation rules for Uri

	// no validation rules for AuthType

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

	case *S3Target_RoleArn:
		if v == nil {
			err := S3TargetValidationError{
				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 S3TargetMultiError(errors)
	}

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = S3TargetValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Uri

	// no validation rules for AuthType

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = OSSTargetValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportOSSAuthTypeValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for PageSize

	// no validation rules for PageToken

	// no validation rules for ClusterId

	// no validation rules for OrderBy

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListExportsRequestValidationError{}

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

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

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

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

	var errors []error

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

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

	}

	// no validation rules for NextPageToken

	// no validation rules for TotalSize

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListExportsResponseValidationError{}

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

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

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

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

	var errors []error

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DownloadExportsResponseValidationError{}

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

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

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

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

	var errors []error

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

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

	}

	// no validation rules for NextPageToken

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListExportFilesResponseValidationError{}

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

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

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

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

	var errors []error

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DownloadExportFilesResponseValidationError{}

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

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

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

func (m *ExportFile) 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 Url

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportFileValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Name

	// no validation rules for Url

	// no validation rules for Size

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DownloadUrlValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for ExportId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetExportRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for ExportId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DeleteExportRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for ExportId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CancelExportRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

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

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

	// no validation rules for DisplayName

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateExportRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for ExportId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DownloadExportRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for ExportId

	// no validation rules for PageSize

	// no validation rules for PageToken

	// no validation rules for GenerateUrl

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListExportFilesRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for ExportId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DownloadExportFilesRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Compression

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportOptions_ParquetFormatValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Separator

	// no validation rules for SkipHeader

	// no validation rules for Dialect

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ExportOptions_CSVFormatValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportOptions_ColumnSelectorValidationError{}

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

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

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

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

	var errors []error

	switch v := m.Type.(type) {
	case *ExportOptions_Filter_Sql:
		if v == nil {
			err := ExportOptions_FilterValidationError{
				field:  "Type",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}
		// no validation rules for Sql
	case *ExportOptions_Filter_Table_:
		if v == nil {
			err := ExportOptions_FilterValidationError{
				field:  "Type",
				reason: "oneof value cannot be a typed-nil",
			}
			if !all {
				return err
			}
			errors = append(errors, err)
		}

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ExportOptions_FilterValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Where

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ExportOptions_Filter_TableValidationError{}

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

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

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

func (m *S3Target_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 S3Target_AccessKeyMultiError(errors)
	}

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = S3Target_AccessKeyValidationError{}

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

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

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

func (m *OSSTarget_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 OSSTarget_AccessKeyMultiError(errors)
	}

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = OSSTarget_AccessKeyValidationError{}

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