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

package developerv1

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

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

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

	var errors []error

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

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = DeveloperRequestValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for InternalError

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = DeveloperResponseValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Schema

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = RequestContextValidationError{}

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

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

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

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

	var errors []error

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

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = OperationValidationError{}

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

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

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

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

	var errors []error

	{
		sorted_keys := make([]uint64, len(m.GetResults()))
		i := 0
		for key := range m.GetResults() {
			sorted_keys[i] = key
			i++
		}
		sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] })
		for _, key := range sorted_keys {
			val := m.GetResults()[key]
			_ = val

			// no validation rules for Results[key]

			if all {
				switch v := interface{}(val).(type) {
				case interface{ ValidateAll() error }:
					if err := v.ValidateAll(); err != nil {
						errors = append(errors, OperationsResultsValidationError{
							field:  fmt.Sprintf("Results[%v]", key),
							reason: "embedded message failed validation",
							cause:  err,
						})
					}
				case interface{ Validate() error }:
					if err := v.Validate(); err != nil {
						errors = append(errors, OperationsResultsValidationError{
							field:  fmt.Sprintf("Results[%v]", key),
							reason: "embedded message failed validation",
							cause:  err,
						})
					}
				}
			} else if v, ok := interface{}(val).(interface{ Validate() error }); ok {
				if err := v.Validate(); err != nil {
					return OperationsResultsValidationError{
						field:  fmt.Sprintf("Results[%v]", key),
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}

		}
	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = OperationsResultsValidationError{}

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

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

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

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

	var errors []error

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

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = OperationResultValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Message

	// no validation rules for Line

	// no validation rules for Column

	// no validation rules for SourceCode

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = DeveloperWarningValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Message

	// no validation rules for Line

	// no validation rules for Column

	// no validation rules for Source

	// no validation rules for Kind

	// no validation rules for Context

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = DeveloperErrorValidationError{}

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

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

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

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

	var errors []error

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = DeveloperErrorsValidationError{}

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

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

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

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

	var errors []error

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = CheckOperationParametersValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for Membership

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

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

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

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

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = CheckOperationsResultValidationError{}

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

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

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

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

	var errors []error

	if len(m.GetMissingRequiredContext()) < 1 {
		err := PartialCaveatInfoValidationError{
			field:  "MissingRequiredContext",
			reason: "value must contain at least 1 item(s)",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = PartialCaveatInfoValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for AssertionsYaml

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = RunAssertionsParametersValidationError{}

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

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

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

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

	var errors []error

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

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = RunAssertionsResultValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for ValidationYaml

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = RunValidationParametersValidationError{}

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

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

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

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

	var errors []error

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

	// no validation rules for UpdatedValidationYaml

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = RunValidationResultValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = FormatSchemaParametersValidationError{}

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

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

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

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

	var errors []error

	// no validation rules for FormattedSchema

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = FormatSchemaResultValidationError{}

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

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

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

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

	var errors []error

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = SchemaWarningsParametersValidationError{}

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

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

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

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

	var errors []error

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

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

	}

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

	return nil
}

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

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

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

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

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

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

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

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

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

var _ error = SchemaWarningsResultValidationError{}

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