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

package v1beta1

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

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

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

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

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

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

	var errors []error

	// no validation rules for Name

	// no validation rules for SizeBytes

	// no validation rules for Url

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = AuditLogFileValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for Date

	// no validation rules for PageSize

	// no validation rules for PageToken

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ListAuditLogFilesRequestValidationError{}

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

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

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

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

	var errors []error

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

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

	}

	// no validation rules for NextPageToken

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ListAuditLogFilesResponseValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = DownloadAuditLogFilesRequestValidationError{}

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

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

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

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

	var errors []error

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = DownloadAuditLogFilesResponseValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for FilterRuleId

	// no validation rules for ClusterId

	// no validation rules for DisplayName

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

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

	}

	// no validation rules for Disabled

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

	if m.UpdateTime != nil {

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = AuditLogFilterRuleValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = AuditLogFilterValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for FilterRuleId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = GetAuditLogFilterRuleRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for PageSize

	// no validation rules for PageToken

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ListAuditLogFilterRulesRequestValidationError{}

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

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

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

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

	var errors []error

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

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

	}

	// no validation rules for NextPageToken

	// no validation rules for TotalSize

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = ListAuditLogFilterRulesResponseValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = CreateAuditLogFilterRuleRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for FilterRuleId

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

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

	}

	// no validation rules for DisplayName

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = UpdateAuditLogFilterRuleRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for FilterRuleId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = DeleteAuditLogFilterRuleRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = GetAuditLogConfigRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

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

	// no validation rules for RotationIntervalMinutes

	// no validation rules for RotationSizeMib

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = AuditLogConfigValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = UpdateAuditLogConfigRequestValidationError{}

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