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

package dataflow

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 EnableCRRFRequest 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 *EnableCRRFRequest) Validate() error {
	return m.validate(false)
}

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

	// no validation rules for SecondaryRegion

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = EnableCRRFRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Status

	// no validation rules for Message

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = EnableCRRFResponseValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = QueryCRRFRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ClusterId

	// no validation rules for Status

	// no validation rules for SecondaryRegion

	// no validation rules for MasterBucketId

	// no validation rules for SecondaryBucketId

	// no validation rules for ErrorMessage

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = QueryCRRFResponseValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for OrgId

	// no validation rules for ProjectId

	// no validation rules for ClusterId

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = DisableCRRFRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Status

	// no validation rules for Message

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = DisableCRRFResponseValidationError{}

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