func (e CheckOutput_ActionEffectValidationError) 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 %sCheckOutput_ActionEffect.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}
Error satisfies the builtin error interface
package enginev1
import (
	"bytes"
	"errors"
	"fmt"
	"net"
	"net/mail"
	"net/url"
	"regexp"
	"strings"
	"time"
	"unicode/utf8"
	"google.golang.org/protobuf/types/known/anypb"
	effectv1 "github.com/cerbos/cerbos/api/genpb/cerbos/effect/v1"
)
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{}
	_ = effectv1.Effect(0)
)
func (m *CheckInput) Validate() error {
	if m == nil {
		return nil
	}
	if m.GetResource() == nil {
		return CheckInputValidationError{
			field:  "Resource",
			reason: "value is required",
		}
	}
	if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return CheckInputValidationError{
				field:  "Resource",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}
	if m.GetPrincipal() == nil {
		return CheckInputValidationError{
			field:  "Principal",
			reason: "value is required",
		}
	}
	if v, ok := interface{}(m.GetPrincipal()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return CheckInputValidationError{
				field:  "Principal",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}
	_CheckInput_Actions_Unique := make(map[string]struct{}, len(m.GetActions()))
	for idx, item := range m.GetActions() {
		_, _ = idx, item
		if _, exists := _CheckInput_Actions_Unique[item]; exists {
			return CheckInputValidationError{
				field:  fmt.Sprintf("Actions[%v]", idx),
				reason: "repeated value must contain unique items",
			}
		} else {
			_CheckInput_Actions_Unique[item] = struct{}{}
		}
		if utf8.RuneCountInString(item) < 1 {
			return CheckInputValidationError{
				field:  fmt.Sprintf("Actions[%v]", idx),
				reason: "value length must be at least 1 runes",
			}
		}
	}
	if v, ok := interface{}(m.GetAuxData()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return CheckInputValidationError{
				field:  "AuxData",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}
	return nil
}
type CheckInputValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}
func (e CheckInputValidationError) Field() string { return e.field }
func (e CheckInputValidationError) Reason() string { return e.reason }
func (e CheckInputValidationError) Cause() error { return e.cause }
func (e CheckInputValidationError) Key() bool { return e.key }
func (e CheckInputValidationError) ErrorName() string { return "CheckInputValidationError" }
func (e CheckInputValidationError) 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 %sCheckInput.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}
var _ error = CheckInputValidationError{}
var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = CheckInputValidationError{}
func (m *CheckOutput) Validate() error {
	if m == nil {
		return nil
	}
	for key, val := range m.GetActions() {
		_ = val
		if v, ok := interface{}(val).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return CheckOutputValidationError{
					field:  fmt.Sprintf("Actions[%v]", key),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}
	}
	return nil
}
type CheckOutputValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}
func (e CheckOutputValidationError) Field() string { return e.field }
func (e CheckOutputValidationError) Reason() string { return e.reason }
func (e CheckOutputValidationError) Cause() error { return e.cause }
func (e CheckOutputValidationError) Key() bool { return e.key }
func (e CheckOutputValidationError) ErrorName() string { return "CheckOutputValidationError" }
func (e CheckOutputValidationError) 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 %sCheckOutput.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}
var _ error = CheckOutputValidationError{}
var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = CheckOutputValidationError{}
func (m *Resource) Validate() error {
	if m == nil {
		return nil
	}
	if utf8.RuneCountInString(m.GetKind()) < 1 {
		return ResourceValidationError{
			field:  "Kind",
			reason: "value length must be at least 1 runes",
		}
	}
	if !_Resource_Kind_Pattern.MatchString(m.GetKind()) {
		return ResourceValidationError{
			field:  "Kind",
			reason: "value does not match regex pattern \"^[[:alpha:]][[:word:]\\\\@\\\\.\\\\-/]*(\\\\:[[:alpha:]][[:word:]\\\\@\\\\.\\\\-/]*)*$\"",
		}
	}
	if !_Resource_PolicyVersion_Pattern.MatchString(m.GetPolicyVersion()) {
		return ResourceValidationError{
			field:  "PolicyVersion",
			reason: "value does not match regex pattern \"^[[:word:]]*$\"",
		}
	}
	if utf8.RuneCountInString(m.GetId()) < 1 {
		return ResourceValidationError{
			field:  "Id",
			reason: "value length must be at least 1 runes",
		}
	}
	for key, val := range m.GetAttr() {
		_ = val
		if val == nil {
			return ResourceValidationError{
				field:  fmt.Sprintf("Attr[%v]", key),
				reason: "value cannot be sparse, all pairs must be non-nil",
			}
		}
		if v, ok := interface{}(val).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return ResourceValidationError{
					field:  fmt.Sprintf("Attr[%v]", key),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}
	}
	return nil
}
type ResourceValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}
func (e ResourceValidationError) Field() string { return e.field }
func (e ResourceValidationError) Reason() string { return e.reason }
func (e ResourceValidationError) Cause() error { return e.cause }
func (e ResourceValidationError) Key() bool { return e.key }
func (e ResourceValidationError) ErrorName() string { return "ResourceValidationError" }
func (e ResourceValidationError) 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 %sResource.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}
var _ error = ResourceValidationError{}
var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ResourceValidationError{}
var _Resource_Kind_Pattern = regexp.MustCompile("^[[:alpha:]][[:word:]\\@\\.\\-/]*(\\:[[:alpha:]][[:word:]\\@\\.\\-/]*)*$")
var _Resource_PolicyVersion_Pattern = regexp.MustCompile("^[[:word:]]*$")
func (m *Principal) Validate() error {
	if m == nil {
		return nil
	}
	if utf8.RuneCountInString(m.GetId()) < 1 {
		return PrincipalValidationError{
			field:  "Id",
			reason: "value length must be at least 1 runes",
		}
	}
	if !_Principal_PolicyVersion_Pattern.MatchString(m.GetPolicyVersion()) {
		return PrincipalValidationError{
			field:  "PolicyVersion",
			reason: "value does not match regex pattern \"^[[:word:]]*$\"",
		}
	}
	if l := len(m.GetRoles()); l < 1 || l > 20 {
		return PrincipalValidationError{
			field:  "Roles",
			reason: "value must contain between 1 and 20 items, inclusive",
		}
	}
	_Principal_Roles_Unique := make(map[string]struct{}, len(m.GetRoles()))
	for idx, item := range m.GetRoles() {
		_, _ = idx, item
		if _, exists := _Principal_Roles_Unique[item]; exists {
			return PrincipalValidationError{
				field:  fmt.Sprintf("Roles[%v]", idx),
				reason: "repeated value must contain unique items",
			}
		} else {
			_Principal_Roles_Unique[item] = struct{}{}
		}
		if !_Principal_Roles_Pattern.MatchString(item) {
			return PrincipalValidationError{
				field:  fmt.Sprintf("Roles[%v]", idx),
				reason: "value does not match regex pattern \"^[[:word:]\\\\-\\\\.]+$\"",
			}
		}
	}
	for key, val := range m.GetAttr() {
		_ = val
		if val == nil {
			return PrincipalValidationError{
				field:  fmt.Sprintf("Attr[%v]", key),
				reason: "value cannot be sparse, all pairs must be non-nil",
			}
		}
		if v, ok := interface{}(val).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return PrincipalValidationError{
					field:  fmt.Sprintf("Attr[%v]", key),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}
	}
	return nil
}
type PrincipalValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}
func (e PrincipalValidationError) Field() string { return e.field }
func (e PrincipalValidationError) Reason() string { return e.reason }
func (e PrincipalValidationError) Cause() error { return e.cause }
func (e PrincipalValidationError) Key() bool { return e.key }
func (e PrincipalValidationError) ErrorName() string { return "PrincipalValidationError" }
func (e PrincipalValidationError) 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 %sPrincipal.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}
var _ error = PrincipalValidationError{}
var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = PrincipalValidationError{}
var _Principal_PolicyVersion_Pattern = regexp.MustCompile("^[[:word:]]*$")
var _Principal_Roles_Pattern = regexp.MustCompile("^[[:word:]\\-\\.]+$")
func (m *AuxData) Validate() error {
	if m == nil {
		return nil
	}
	for key, val := range m.GetJwt() {
		_ = val
		if v, ok := interface{}(val).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return AuxDataValidationError{
					field:  fmt.Sprintf("Jwt[%v]", key),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}
	}
	return nil
}
type AuxDataValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}
func (e AuxDataValidationError) Field() string { return e.field }
func (e AuxDataValidationError) Reason() string { return e.reason }
func (e AuxDataValidationError) Cause() error { return e.cause }
func (e AuxDataValidationError) Key() bool { return e.key }
func (e AuxDataValidationError) ErrorName() string { return "AuxDataValidationError" }
func (e AuxDataValidationError) 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 %sAuxData.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}
var _ error = AuxDataValidationError{}
var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = AuxDataValidationError{}
func (m *CheckOutput_ActionEffect) Validate() error {
	if m == nil {
		return nil
	}
	return nil
}
type CheckOutput_ActionEffectValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}
func (e CheckOutput_ActionEffectValidationError) Field() string { return e.field }
func (e CheckOutput_ActionEffectValidationError) Reason() string { return e.reason }
func (e CheckOutput_ActionEffectValidationError) Cause() error { return e.cause }
func (e CheckOutput_ActionEffectValidationError) Key() bool { return e.key }
func (e CheckOutput_ActionEffectValidationError) ErrorName() string {
	return "CheckOutput_ActionEffectValidationError"
}