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

	dataflow "github.com/tidbcloud/dataflow-service/idl/pbgen/proto/dataflow"
)

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

	_ = dataflow.WeekDay(0)
)

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

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

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

	var errors []error

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for PageSize

	// no validation rules for PageToken

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListBackupsRequestValidationError{}

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

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

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

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

	var errors []error

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

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

	}

	// no validation rules for TotalSize

	// no validation rules for NextPageToken

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListBackupsResponseValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Id

	// no validation rules for ClusterId

	// no validation rules for Name

	// no validation rules for Description

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

	// no validation rules for SizeBytes

	// no validation rules for State

	// no validation rules for Type

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

	// no validation rules for BackupTso

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

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

	}

	if m.ExpirationTime != nil {

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

	}

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

	if m.ScopeDetails != nil {

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = BackupValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Name

	// no validation rules for DisplayName

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = RegionInfoValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for BackupId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetBackupExportProfileRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for BackupId

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

	// no validation rules for DryRun

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateBackupExportRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Id

	// no validation rules for Name

	// no validation rules for BackupId

	// no validation rules for BackupName

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

	// no validation rules for Provider

	// no validation rules for Region

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

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

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

	// no validation rules for State

	// no validation rules for Message

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = BackupExportValidationError{}

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

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

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

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

	var errors []error

	switch m.Destination.(type) {

	case *StorageDestination_Gcs:

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

	case *StorageDestination_S3:

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = StorageDestinationValidationError{}

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

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

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

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

	var errors []error

	if m.Gcs != nil {

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

	}

	if m.S3 != nil {

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = BackupExportProfileValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for BackupId

	// no validation rules for PageSize

	// no validation rules for PageToken

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListBackupExportsRequestValidationError{}

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

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

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

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

	var errors []error

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

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

	}

	// no validation rules for TotalSize

	// no validation rules for NextPageToken

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ListBackupExportsResponseValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for BackupId

	// no validation rules for ExportId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetBackupExportRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for BackupId

	// no validation rules for ExportId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CancelBackupExportRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for Name

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = CreateBackupRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Type

	switch m.BackupScope.(type) {

	case *BackupScope_Full:

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

	case *BackupScope_Database:

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

	case *BackupScope_Table:

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

	case *BackupScope_Filter:

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = BackupScopeValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = FullBackupScopeValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DatabaseBackupScopeValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = TableBackupScopeValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = FilterBackupScopeValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = BackupScopeDetailsValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for BackupId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetBackupRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for BackupId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DeleteBackupRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetBackupOptionsRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	if m.DualRegionOptions != nil {

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = BackupOptionsValidationError{}

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

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

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

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

	var errors []error

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

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

	}

	if m.ClusterRegion != nil {

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DualRegionOptionsValidationError{}

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

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

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

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

	var errors []error

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = RegionOptionValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	if m.PitrSetting != nil {

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

	}

	if m.SnapshotBackupSchedule != nil {

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = ModifyBackupSettingsRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetBackupSettingsRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

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

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

	}

	if m.SnapshotBackupSchedule != nil {

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

	}

	if m.PitrSetting != nil {

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

	}

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = BackupSettingsValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetBackupPITRTimeRangesRequestValidationError{}

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

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

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

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

	var errors []error

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

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

	}

	// no validation rules for Message

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = GetBackupPITRTimeRangesResponseValidationError{}

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

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

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

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

	var errors []error

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = PITRSettingValidationError{}

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

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

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

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

	var errors []error

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = PITRTimeRangeValidationError{}

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

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

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

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

	var errors []error

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

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = PITRRegionTimeRangeValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ScheduleType

	switch m.Schedule.(type) {

	case *SnapshotBackupSchedule_DailySchedule:

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

	case *SnapshotBackupSchedule_WeeklySchedule:

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

	}

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

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

	if m.NextBackupTime != nil {

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = SnapshotBackupScheduleValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ScheduleTime

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = DailyScheduleValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ScheduleTime

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = WeeklyScheduleValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TargetUri

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = StorageDestination_GCSDestinationValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for TargetUri

	// no validation rules for Region

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = StorageDestination_S3DestinationValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ServiceAccount

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = BackupExportProfile_GCSProfileValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for RoleArn

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = BackupExportProfile_S3ProfileValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for RoleArn

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

	return nil
}

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

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

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

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

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

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

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

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

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

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

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

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

var _ error = BackupExportProfile_AzBlobProfileValidationError{}

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