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

package replay

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

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

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ClusterId

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = CreateReplayRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ReplayId

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = CreateReplayResponseValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ClusterId

	// no validation rules for PageSize

	// no validation rules for Page

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ListReplaysRequestValidationError{}

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

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

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

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

	var errors []error

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

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

	}

	// no validation rules for TotalSize

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ListReplaysResponseValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ClusterId

	// no validation rules for ReplayId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = GetReplayRequestValidationError{}

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

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

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

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

	var errors []error

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = GetReplayResponseValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ClusterId

	// no validation rules for ReplayId

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = UpdateReplayRequestValidationError{}

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

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

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

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

	var errors []error

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = UpdateReplayResponseValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ClusterId

	// no validation rules for ReplayId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = DeleteReplayRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ClusterId

	// no validation rules for ReplayId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = StartReplayRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ClusterId

	// no validation rules for ReplayId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = StopReplayRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for SourceClusterId

	// no validation rules for TargetClusterId

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

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

	}

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

	// no validation rules for Replicas

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

	// no validation rules for ReplayImage

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

	// no validation rules for CloudProvider

	// no validation rules for Region

	// no validation rules for ProjectId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ReplaySpecValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ReplayId

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for DesiredState

	// no validation rules for CurrentState

	// no validation rules for SourceClusterId

	// no validation rules for CloudProvider

	// no validation rules for Region

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

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

	}

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

	// no validation rules for Replicas

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

	// no validation rules for ReplayImage

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ReplayValidationError{}

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

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

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

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

	var errors []error

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

	// no validation rules for Username

	// no validation rules for Password

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ReplayCommonConfigValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ReplayStartTime

	// no validation rules for RunStartTime

	// no validation rules for ReplayIndex

	// no validation rules for CustomArguments

	// no validation rules for Format

	// no validation rules for IgnoreErrs

	// no validation rules for PsClose

	// no validation rules for BufSize

	// no validation rules for Speed

	// no validation rules for DynamicInput

	// no validation rules for ReadOnly

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ReplayConfigValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for InstanceType

	// no validation rules for StorageSize

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ReplayTaskResourcesValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Name

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

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

	// no validation rules for Replicas

	// no validation rules for ReplayStartTime

	// no validation rules for RunStartTime

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

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

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

	}

	// no validation rules for Image

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ReplayTaskValidationError{}

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

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

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

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

	var errors []error

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ReplayDataSourceValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Endpoint

	// no validation rules for Username

	// no validation rules for Password

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ReplayDataTargetValidationError{}

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

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

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

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

	var errors []error

	switch m.Storage.(type) {

	case *AuditLogAddr_Aws:

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

	case *AuditLogAddr_Gcp:

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

	case *AuditLogAddr_Aliyun:

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = AuditLogAddrValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for S3Url

	// no validation rules for RoleArn

	// no validation rules for ExternalId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = AWSAuditLogValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for GcsUrl

	// no validation rules for ServiceAccountJson

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = GCPAuditLogValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for AccessKeyId

	// no validation rules for SecretAccessKey

	// no validation rules for BucketUrl

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = AliyunAuditLogValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Phase

	// no validation rules for Message

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

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

	}

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

	// no validation rules for AwsNodeRoleArn

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ReplayStatusValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Name

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

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

	}

	// no validation rules for Message

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ReplayTaskStatusValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for PodName

	// no validation rules for Index

	// no validation rules for Phase

	// no validation rules for Ready

	// no validation rules for Message

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ReplayReplicaStatusValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Type

	// no validation rules for Status

	// no validation rules for StartTime

	// no validation rules for EndTime

	// no validation rules for Progress

	// no validation rules for Error

	// no validation rules for LastCommandTimestamp

	// no validation rules for SyncTime

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

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

	}

	// no validation rules for TotalCommands

	// no validation rules for ReplayedCommands

	// no validation rules for FailedCommands

	// no validation rules for TotalBytes

	// no validation rules for ProcessedBytes

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ReplayTaskInfoValidationError{}

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