summaryrefslogtreecommitdiff
path: root/vendor/github.com/authzed/authzed-go/proto
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-07-22 17:35:49 -0600
committermo khan <mo@mokhan.ca>2025-07-22 17:35:49 -0600
commit20ef0d92694465ac86b550df139e8366a0a2b4fa (patch)
tree3f14589e1ce6eb9306a3af31c3a1f9e1af5ed637 /vendor/github.com/authzed/authzed-go/proto
parent44e0d272c040cdc53a98b9f1dc58ae7da67752e6 (diff)
feat: connect to spicedb
Diffstat (limited to 'vendor/github.com/authzed/authzed-go/proto')
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/00_handwritten_validation.go144
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/core.pb.go928
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/core.pb.validate.go1804
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/core_vtproto.pb.go2747
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/debug.pb.go696
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/debug.pb.validate.go864
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/debug_vtproto.pb.go1628
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/error_reason.pb.go588
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/error_reason.pb.validate.go36
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service.pb.go2824
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service.pb.gw.go707
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service.pb.validate.go6081
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service_grpc.pb.go525
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service_vtproto.pb.go11445
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/openapi.pb.go71
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/openapi.pb.validate.go36
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service.pb.go2899
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service.pb.gw.go656
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service.pb.validate.go5860
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service_grpc.pb.go535
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service_vtproto.pb.go9383
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service.pb.go2001
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service.pb.gw.go469
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service.pb.validate.go4026
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service_grpc.pb.go349
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service_vtproto.pb.go8305
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service.pb.go347
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service.pb.gw.go136
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service.pb.validate.go423
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service_grpc.pb.go124
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service_vtproto.pb.go835
-rw-r--r--vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/zz_generated.version.go6
32 files changed, 67478 insertions, 0 deletions
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/00_handwritten_validation.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/00_handwritten_validation.go
new file mode 100644
index 0000000..720e601
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/00_handwritten_validation.go
@@ -0,0 +1,144 @@
+// The contents of this file are hand-written to add HandwrittenValidate to select message types
+
+package v1
+
+func (m *CheckPermissionRequest) HandwrittenValidate() error {
+ if m == nil {
+ return nil
+ }
+
+ if m.GetResource() != nil && m.GetResource().GetObjectId() == "*" {
+ return ObjectReferenceValidationError{
+ field: "ObjectId",
+ reason: "alphanumeric value is required",
+ }
+ }
+
+ return m.GetSubject().HandwrittenValidate()
+}
+
+func (m *ExpandPermissionTreeRequest) HandwrittenValidate() error {
+ if m == nil {
+ return nil
+ }
+
+ if m.GetResource() != nil && m.GetResource().GetObjectId() == "*" {
+ return ObjectReferenceValidationError{
+ field: "ObjectId",
+ reason: "alphanumeric value is required",
+ }
+ }
+
+ return nil
+}
+
+func (m *Precondition) HandwrittenValidate() error {
+ if m == nil {
+ return nil
+ }
+
+ return m.GetFilter().HandwrittenValidate()
+}
+
+func (m *RelationshipFilter) HandwrittenValidate() error {
+ if m == nil {
+ return nil
+ }
+
+ if m.GetOptionalResourceId() == "*" {
+ return RelationshipFilterValidationError{
+ field: "OptionalResourceId",
+ reason: "alphanumeric value is required",
+ }
+ }
+
+ return m.GetOptionalSubjectFilter().HandwrittenValidate()
+}
+
+func (m *SubjectFilter) HandwrittenValidate() error {
+ if m == nil {
+ return nil
+ }
+
+ if m.GetOptionalSubjectId() == "*" && m.GetOptionalRelation() != nil && m.GetOptionalRelation().GetRelation() != "" {
+ return SubjectFilterValidationError{
+ field: "OptionalRelation",
+ reason: "optionalrelation must be empty on subject if object ID is a wildcard",
+ }
+ }
+ return nil
+}
+
+func (m *RelationshipUpdate) HandwrittenValidate() error {
+ return m.GetRelationship().HandwrittenValidate()
+}
+
+func (m *SubjectReference) HandwrittenValidate() error {
+ if m.GetObject() != nil && m.GetObject().GetObjectId() == "*" && m.GetOptionalRelation() != "" {
+ return SubjectReferenceValidationError{
+ field: "OptionalRelation",
+ reason: "optionalrelation must be empty on subject if object ID is a wildcard",
+ }
+ }
+ return nil
+}
+
+func (m *Relationship) HandwrittenValidate() error {
+ if m == nil {
+ return nil
+ }
+
+ if m.GetResource() != nil && m.GetResource().GetObjectId() == "*" {
+ return ObjectReferenceValidationError{
+ field: "ObjectId",
+ reason: "alphanumeric value is required",
+ }
+ }
+
+ return m.GetSubject().HandwrittenValidate()
+}
+
+func (m *DeleteRelationshipsRequest) HandwrittenValidate() error {
+ if m == nil {
+ return nil
+ }
+
+ if m.GetOptionalPreconditions() != nil {
+ for _, precondition := range m.GetOptionalPreconditions() {
+ err := precondition.HandwrittenValidate()
+ if err != nil {
+ return err
+ }
+ }
+ }
+
+ return m.GetRelationshipFilter().HandwrittenValidate()
+}
+
+func (m *WriteRelationshipsRequest) HandwrittenValidate() error {
+ if m == nil {
+ return nil
+ }
+
+ if m.GetOptionalPreconditions() != nil {
+ for _, precondition := range m.GetOptionalPreconditions() {
+ err := precondition.HandwrittenValidate()
+ if err != nil {
+ return err
+ }
+ }
+ }
+
+ if m.GetUpdates() != nil {
+ for _, update := range m.GetUpdates() {
+ if update.GetRelationship() != nil {
+ err := update.GetRelationship().HandwrittenValidate()
+ if err != nil {
+ return err
+ }
+ }
+ }
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/core.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/core.pb.go
new file mode 100644
index 0000000..10bc21f
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/core.pb.go
@@ -0,0 +1,928 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.6
+// protoc (unknown)
+// source: authzed/api/v1/core.proto
+
+package v1
+
+import (
+ _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type RelationshipUpdate_Operation int32
+
+const (
+ RelationshipUpdate_OPERATION_UNSPECIFIED RelationshipUpdate_Operation = 0
+ RelationshipUpdate_OPERATION_CREATE RelationshipUpdate_Operation = 1
+ RelationshipUpdate_OPERATION_TOUCH RelationshipUpdate_Operation = 2
+ RelationshipUpdate_OPERATION_DELETE RelationshipUpdate_Operation = 3
+)
+
+// Enum value maps for RelationshipUpdate_Operation.
+var (
+ RelationshipUpdate_Operation_name = map[int32]string{
+ 0: "OPERATION_UNSPECIFIED",
+ 1: "OPERATION_CREATE",
+ 2: "OPERATION_TOUCH",
+ 3: "OPERATION_DELETE",
+ }
+ RelationshipUpdate_Operation_value = map[string]int32{
+ "OPERATION_UNSPECIFIED": 0,
+ "OPERATION_CREATE": 1,
+ "OPERATION_TOUCH": 2,
+ "OPERATION_DELETE": 3,
+ }
+)
+
+func (x RelationshipUpdate_Operation) Enum() *RelationshipUpdate_Operation {
+ p := new(RelationshipUpdate_Operation)
+ *p = x
+ return p
+}
+
+func (x RelationshipUpdate_Operation) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (RelationshipUpdate_Operation) Descriptor() protoreflect.EnumDescriptor {
+ return file_authzed_api_v1_core_proto_enumTypes[0].Descriptor()
+}
+
+func (RelationshipUpdate_Operation) Type() protoreflect.EnumType {
+ return &file_authzed_api_v1_core_proto_enumTypes[0]
+}
+
+func (x RelationshipUpdate_Operation) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use RelationshipUpdate_Operation.Descriptor instead.
+func (RelationshipUpdate_Operation) EnumDescriptor() ([]byte, []int) {
+ return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{6, 0}
+}
+
+type AlgebraicSubjectSet_Operation int32
+
+const (
+ AlgebraicSubjectSet_OPERATION_UNSPECIFIED AlgebraicSubjectSet_Operation = 0
+ AlgebraicSubjectSet_OPERATION_UNION AlgebraicSubjectSet_Operation = 1
+ AlgebraicSubjectSet_OPERATION_INTERSECTION AlgebraicSubjectSet_Operation = 2
+ AlgebraicSubjectSet_OPERATION_EXCLUSION AlgebraicSubjectSet_Operation = 3
+)
+
+// Enum value maps for AlgebraicSubjectSet_Operation.
+var (
+ AlgebraicSubjectSet_Operation_name = map[int32]string{
+ 0: "OPERATION_UNSPECIFIED",
+ 1: "OPERATION_UNION",
+ 2: "OPERATION_INTERSECTION",
+ 3: "OPERATION_EXCLUSION",
+ }
+ AlgebraicSubjectSet_Operation_value = map[string]int32{
+ "OPERATION_UNSPECIFIED": 0,
+ "OPERATION_UNION": 1,
+ "OPERATION_INTERSECTION": 2,
+ "OPERATION_EXCLUSION": 3,
+ }
+)
+
+func (x AlgebraicSubjectSet_Operation) Enum() *AlgebraicSubjectSet_Operation {
+ p := new(AlgebraicSubjectSet_Operation)
+ *p = x
+ return p
+}
+
+func (x AlgebraicSubjectSet_Operation) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (AlgebraicSubjectSet_Operation) Descriptor() protoreflect.EnumDescriptor {
+ return file_authzed_api_v1_core_proto_enumTypes[1].Descriptor()
+}
+
+func (AlgebraicSubjectSet_Operation) Type() protoreflect.EnumType {
+ return &file_authzed_api_v1_core_proto_enumTypes[1]
+}
+
+func (x AlgebraicSubjectSet_Operation) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use AlgebraicSubjectSet_Operation.Descriptor instead.
+func (AlgebraicSubjectSet_Operation) EnumDescriptor() ([]byte, []int) {
+ return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{8, 0}
+}
+
+// Relationship specifies how a resource relates to a subject. Relationships
+// form the data for the graph over which all permissions questions are
+// answered.
+type Relationship struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // resource is the resource to which the subject is related, in some manner
+ Resource *ObjectReference `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
+ // relation is how the resource and subject are related.
+ Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"`
+ // subject is the subject to which the resource is related, in some manner.
+ Subject *SubjectReference `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
+ // optional_caveat is a reference to a the caveat that must be enforced over the relationship
+ OptionalCaveat *ContextualizedCaveat `protobuf:"bytes,4,opt,name=optional_caveat,json=optionalCaveat,proto3" json:"optional_caveat,omitempty"`
+ // optional_expires_at is the time at which the relationship expires, if any.
+ OptionalExpiresAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=optional_expires_at,json=optionalExpiresAt,proto3" json:"optional_expires_at,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Relationship) Reset() {
+ *x = Relationship{}
+ mi := &file_authzed_api_v1_core_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Relationship) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Relationship) ProtoMessage() {}
+
+func (x *Relationship) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_core_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Relationship.ProtoReflect.Descriptor instead.
+func (*Relationship) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Relationship) GetResource() *ObjectReference {
+ if x != nil {
+ return x.Resource
+ }
+ return nil
+}
+
+func (x *Relationship) GetRelation() string {
+ if x != nil {
+ return x.Relation
+ }
+ return ""
+}
+
+func (x *Relationship) GetSubject() *SubjectReference {
+ if x != nil {
+ return x.Subject
+ }
+ return nil
+}
+
+func (x *Relationship) GetOptionalCaveat() *ContextualizedCaveat {
+ if x != nil {
+ return x.OptionalCaveat
+ }
+ return nil
+}
+
+func (x *Relationship) GetOptionalExpiresAt() *timestamppb.Timestamp {
+ if x != nil {
+ return x.OptionalExpiresAt
+ }
+ return nil
+}
+
+// ContextualizedCaveat represents a reference to a caveat to be used by caveated relationships.
+// The context consists of key-value pairs that will be injected at evaluation time.
+// The keys must match the arguments defined on the caveat in the schema.
+type ContextualizedCaveat struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // caveat_name is the name of the caveat expression to use, as defined in the schema
+ CaveatName string `protobuf:"bytes,1,opt,name=caveat_name,json=caveatName,proto3" json:"caveat_name,omitempty"`
+ // context consists of any named values that are defined at write time for the caveat expression
+ Context *structpb.Struct `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ContextualizedCaveat) Reset() {
+ *x = ContextualizedCaveat{}
+ mi := &file_authzed_api_v1_core_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ContextualizedCaveat) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ContextualizedCaveat) ProtoMessage() {}
+
+func (x *ContextualizedCaveat) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_core_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ContextualizedCaveat.ProtoReflect.Descriptor instead.
+func (*ContextualizedCaveat) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ContextualizedCaveat) GetCaveatName() string {
+ if x != nil {
+ return x.CaveatName
+ }
+ return ""
+}
+
+func (x *ContextualizedCaveat) GetContext() *structpb.Struct {
+ if x != nil {
+ return x.Context
+ }
+ return nil
+}
+
+// SubjectReference is used for referring to the subject portion of a
+// Relationship. The relation component is optional and is used for defining a
+// sub-relation on the subject, e.g. group:123#members
+type SubjectReference struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Object *ObjectReference `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"`
+ OptionalRelation string `protobuf:"bytes,2,opt,name=optional_relation,json=optionalRelation,proto3" json:"optional_relation,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SubjectReference) Reset() {
+ *x = SubjectReference{}
+ mi := &file_authzed_api_v1_core_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SubjectReference) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SubjectReference) ProtoMessage() {}
+
+func (x *SubjectReference) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_core_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SubjectReference.ProtoReflect.Descriptor instead.
+func (*SubjectReference) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *SubjectReference) GetObject() *ObjectReference {
+ if x != nil {
+ return x.Object
+ }
+ return nil
+}
+
+func (x *SubjectReference) GetOptionalRelation() string {
+ if x != nil {
+ return x.OptionalRelation
+ }
+ return ""
+}
+
+// ObjectReference is used to refer to a specific object in the system.
+type ObjectReference struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ObjectType string `protobuf:"bytes,1,opt,name=object_type,json=objectType,proto3" json:"object_type,omitempty"`
+ ObjectId string `protobuf:"bytes,2,opt,name=object_id,json=objectId,proto3" json:"object_id,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ObjectReference) Reset() {
+ *x = ObjectReference{}
+ mi := &file_authzed_api_v1_core_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ObjectReference) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ObjectReference) ProtoMessage() {}
+
+func (x *ObjectReference) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_core_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ObjectReference.ProtoReflect.Descriptor instead.
+func (*ObjectReference) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *ObjectReference) GetObjectType() string {
+ if x != nil {
+ return x.ObjectType
+ }
+ return ""
+}
+
+func (x *ObjectReference) GetObjectId() string {
+ if x != nil {
+ return x.ObjectId
+ }
+ return ""
+}
+
+// ZedToken is used to provide causality metadata between Write and Check
+// requests.
+//
+// See the authzed.api.v1.Consistency message for more information.
+type ZedToken struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ZedToken) Reset() {
+ *x = ZedToken{}
+ mi := &file_authzed_api_v1_core_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ZedToken) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ZedToken) ProtoMessage() {}
+
+func (x *ZedToken) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_core_proto_msgTypes[4]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ZedToken.ProtoReflect.Descriptor instead.
+func (*ZedToken) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *ZedToken) GetToken() string {
+ if x != nil {
+ return x.Token
+ }
+ return ""
+}
+
+// Cursor is used to provide resumption of listing between calls to APIs
+// such as LookupResources.
+type Cursor struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Cursor) Reset() {
+ *x = Cursor{}
+ mi := &file_authzed_api_v1_core_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Cursor) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Cursor) ProtoMessage() {}
+
+func (x *Cursor) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_core_proto_msgTypes[5]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Cursor.ProtoReflect.Descriptor instead.
+func (*Cursor) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *Cursor) GetToken() string {
+ if x != nil {
+ return x.Token
+ }
+ return ""
+}
+
+// RelationshipUpdate is used for mutating a single relationship within the
+// service.
+//
+// CREATE will create the relationship only if it doesn't exist, and error
+// otherwise.
+//
+// TOUCH will upsert the relationship, and will not error if it
+// already exists.
+//
+// DELETE will delete the relationship. If the relationship does not exist,
+// this operation will no-op.
+type RelationshipUpdate struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Operation RelationshipUpdate_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=authzed.api.v1.RelationshipUpdate_Operation" json:"operation,omitempty"`
+ Relationship *Relationship `protobuf:"bytes,2,opt,name=relationship,proto3" json:"relationship,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *RelationshipUpdate) Reset() {
+ *x = RelationshipUpdate{}
+ mi := &file_authzed_api_v1_core_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *RelationshipUpdate) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RelationshipUpdate) ProtoMessage() {}
+
+func (x *RelationshipUpdate) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_core_proto_msgTypes[6]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RelationshipUpdate.ProtoReflect.Descriptor instead.
+func (*RelationshipUpdate) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *RelationshipUpdate) GetOperation() RelationshipUpdate_Operation {
+ if x != nil {
+ return x.Operation
+ }
+ return RelationshipUpdate_OPERATION_UNSPECIFIED
+}
+
+func (x *RelationshipUpdate) GetRelationship() *Relationship {
+ if x != nil {
+ return x.Relationship
+ }
+ return nil
+}
+
+// PermissionRelationshipTree is used for representing a tree of a resource and
+// its permission relationships with other objects.
+type PermissionRelationshipTree struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Types that are valid to be assigned to TreeType:
+ //
+ // *PermissionRelationshipTree_Intermediate
+ // *PermissionRelationshipTree_Leaf
+ TreeType isPermissionRelationshipTree_TreeType `protobuf_oneof:"tree_type"`
+ ExpandedObject *ObjectReference `protobuf:"bytes,3,opt,name=expanded_object,json=expandedObject,proto3" json:"expanded_object,omitempty"`
+ ExpandedRelation string `protobuf:"bytes,4,opt,name=expanded_relation,json=expandedRelation,proto3" json:"expanded_relation,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *PermissionRelationshipTree) Reset() {
+ *x = PermissionRelationshipTree{}
+ mi := &file_authzed_api_v1_core_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *PermissionRelationshipTree) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PermissionRelationshipTree) ProtoMessage() {}
+
+func (x *PermissionRelationshipTree) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_core_proto_msgTypes[7]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PermissionRelationshipTree.ProtoReflect.Descriptor instead.
+func (*PermissionRelationshipTree) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *PermissionRelationshipTree) GetTreeType() isPermissionRelationshipTree_TreeType {
+ if x != nil {
+ return x.TreeType
+ }
+ return nil
+}
+
+func (x *PermissionRelationshipTree) GetIntermediate() *AlgebraicSubjectSet {
+ if x != nil {
+ if x, ok := x.TreeType.(*PermissionRelationshipTree_Intermediate); ok {
+ return x.Intermediate
+ }
+ }
+ return nil
+}
+
+func (x *PermissionRelationshipTree) GetLeaf() *DirectSubjectSet {
+ if x != nil {
+ if x, ok := x.TreeType.(*PermissionRelationshipTree_Leaf); ok {
+ return x.Leaf
+ }
+ }
+ return nil
+}
+
+func (x *PermissionRelationshipTree) GetExpandedObject() *ObjectReference {
+ if x != nil {
+ return x.ExpandedObject
+ }
+ return nil
+}
+
+func (x *PermissionRelationshipTree) GetExpandedRelation() string {
+ if x != nil {
+ return x.ExpandedRelation
+ }
+ return ""
+}
+
+type isPermissionRelationshipTree_TreeType interface {
+ isPermissionRelationshipTree_TreeType()
+}
+
+type PermissionRelationshipTree_Intermediate struct {
+ Intermediate *AlgebraicSubjectSet `protobuf:"bytes,1,opt,name=intermediate,proto3,oneof"`
+}
+
+type PermissionRelationshipTree_Leaf struct {
+ Leaf *DirectSubjectSet `protobuf:"bytes,2,opt,name=leaf,proto3,oneof"`
+}
+
+func (*PermissionRelationshipTree_Intermediate) isPermissionRelationshipTree_TreeType() {}
+
+func (*PermissionRelationshipTree_Leaf) isPermissionRelationshipTree_TreeType() {}
+
+// AlgebraicSubjectSet is a subject set which is computed based on applying the
+// specified operation to the operands according to the algebra of sets.
+//
+// UNION is a logical set containing the subject members from all operands.
+//
+// INTERSECTION is a logical set containing only the subject members which are
+// present in all operands.
+//
+// EXCLUSION is a logical set containing only the subject members which are
+// present in the first operand, and none of the other operands.
+type AlgebraicSubjectSet struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Operation AlgebraicSubjectSet_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=authzed.api.v1.AlgebraicSubjectSet_Operation" json:"operation,omitempty"`
+ Children []*PermissionRelationshipTree `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *AlgebraicSubjectSet) Reset() {
+ *x = AlgebraicSubjectSet{}
+ mi := &file_authzed_api_v1_core_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *AlgebraicSubjectSet) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AlgebraicSubjectSet) ProtoMessage() {}
+
+func (x *AlgebraicSubjectSet) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_core_proto_msgTypes[8]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AlgebraicSubjectSet.ProtoReflect.Descriptor instead.
+func (*AlgebraicSubjectSet) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *AlgebraicSubjectSet) GetOperation() AlgebraicSubjectSet_Operation {
+ if x != nil {
+ return x.Operation
+ }
+ return AlgebraicSubjectSet_OPERATION_UNSPECIFIED
+}
+
+func (x *AlgebraicSubjectSet) GetChildren() []*PermissionRelationshipTree {
+ if x != nil {
+ return x.Children
+ }
+ return nil
+}
+
+// DirectSubjectSet is a subject set which is simply a collection of subjects.
+type DirectSubjectSet struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Subjects []*SubjectReference `protobuf:"bytes,1,rep,name=subjects,proto3" json:"subjects,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DirectSubjectSet) Reset() {
+ *x = DirectSubjectSet{}
+ mi := &file_authzed_api_v1_core_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DirectSubjectSet) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DirectSubjectSet) ProtoMessage() {}
+
+func (x *DirectSubjectSet) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_core_proto_msgTypes[9]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DirectSubjectSet.ProtoReflect.Descriptor instead.
+func (*DirectSubjectSet) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *DirectSubjectSet) GetSubjects() []*SubjectReference {
+ if x != nil {
+ return x.Subjects
+ }
+ return nil
+}
+
+// PartialCaveatInfo carries information necessary for the client to take action
+// in the event a response contains a partially evaluated caveat
+type PartialCaveatInfo struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // missing_required_context is a list of one or more fields that were missing and prevented caveats
+ // from being fully evaluated
+ MissingRequiredContext []string `protobuf:"bytes,1,rep,name=missing_required_context,json=missingRequiredContext,proto3" json:"missing_required_context,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *PartialCaveatInfo) Reset() {
+ *x = PartialCaveatInfo{}
+ mi := &file_authzed_api_v1_core_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *PartialCaveatInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PartialCaveatInfo) ProtoMessage() {}
+
+func (x *PartialCaveatInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_core_proto_msgTypes[10]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PartialCaveatInfo.ProtoReflect.Descriptor instead.
+func (*PartialCaveatInfo) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_core_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *PartialCaveatInfo) GetMissingRequiredContext() []string {
+ if x != nil {
+ return x.MissingRequiredContext
+ }
+ return nil
+}
+
+var File_authzed_api_v1_core_proto protoreflect.FileDescriptor
+
+const file_authzed_api_v1_core_proto_rawDesc = "" +
+ "\n" +
+ "\x19authzed/api/v1/core.proto\x12\x0eauthzed.api.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17validate/validate.proto\"\xbe\x03\n" +
+ "\fRelationship\x12K\n" +
+ "\bresource\x18\x01 \x01(\v2\x1f.authzed.api.v1.ObjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\bresource\x12j\n" +
+ "\brelation\x18\x02 \x01(\tBN\xfaB$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$\xbaH$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$R\brelation\x12J\n" +
+ "\asubject\x18\x03 \x01(\v2 .authzed.api.v1.SubjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\asubject\x12]\n" +
+ "\x0foptional_caveat\x18\x04 \x01(\v2$.authzed.api.v1.ContextualizedCaveatB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\x0eoptionalCaveat\x12J\n" +
+ "\x13optional_expires_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\x11optionalExpiresAt\"\xdd\x01\n" +
+ "\x14ContextualizedCaveat\x12\x81\x01\n" +
+ "\vcaveat_name\x18\x01 \x01(\tB`\xfaB-r+(\x80\x012&^([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})$\xbaH-r+(\x80\x012&^([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})$R\n" +
+ "caveatName\x12A\n" +
+ "\acontext\x18\x02 \x01(\v2\x17.google.protobuf.StructB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\acontext\"\xdf\x01\n" +
+ "\x10SubjectReference\x12G\n" +
+ "\x06object\x18\x01 \x01(\v2\x1f.authzed.api.v1.ObjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\x06object\x12\x81\x01\n" +
+ "\x11optional_relation\x18\x02 \x01(\tBT\xfaB'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\xbaH'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x10optionalRelation\"\xb7\x02\n" +
+ "\x0fObjectReference\x12\xb2\x01\n" +
+ "\vobject_type\x18\x01 \x01(\tB\x90\x01\xfaBErC(\x80\x012>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\xbaHErC(\x80\x012>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\n" +
+ "objectType\x12o\n" +
+ "\tobject_id\x18\x02 \x01(\tBR\xfaB&r$(\x80\b2\x1f^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)$\xbaH&r$(\x80\b2\x1f^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)$R\bobjectId\"0\n" +
+ "\bZedToken\x12$\n" +
+ "\x05token\x18\x01 \x01(\tB\x0e\xfaB\x04r\x02 \x01\xbaH\x04r\x02 \x01R\x05token\"6\n" +
+ "\x06Cursor\x12,\n" +
+ "\x05token\x18\x01 \x01(\tB\x16\xfaB\br\x06 \x01(\x80\xa0\x06\xbaH\br\x06 \x01(\x80\xa0\x06R\x05token\"\xb1\x02\n" +
+ "\x12RelationshipUpdate\x12`\n" +
+ "\toperation\x18\x01 \x01(\x0e2,.authzed.api.v1.RelationshipUpdate.OperationB\x14\xfaB\a\x82\x01\x04\x10\x01 \x00\xbaH\a\x82\x01\x04\x10\x01 \x00R\toperation\x12P\n" +
+ "\frelationship\x18\x02 \x01(\v2\x1c.authzed.api.v1.RelationshipB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\frelationship\"g\n" +
+ "\tOperation\x12\x19\n" +
+ "\x15OPERATION_UNSPECIFIED\x10\x00\x12\x14\n" +
+ "\x10OPERATION_CREATE\x10\x01\x12\x13\n" +
+ "\x0fOPERATION_TOUCH\x10\x02\x12\x14\n" +
+ "\x10OPERATION_DELETE\x10\x03\"\xad\x02\n" +
+ "\x1aPermissionRelationshipTree\x12I\n" +
+ "\fintermediate\x18\x01 \x01(\v2#.authzed.api.v1.AlgebraicSubjectSetH\x00R\fintermediate\x126\n" +
+ "\x04leaf\x18\x02 \x01(\v2 .authzed.api.v1.DirectSubjectSetH\x00R\x04leaf\x12H\n" +
+ "\x0fexpanded_object\x18\x03 \x01(\v2\x1f.authzed.api.v1.ObjectReferenceR\x0eexpandedObject\x12+\n" +
+ "\x11expanded_relation\x18\x04 \x01(\tR\x10expandedRelationB\x15\n" +
+ "\ttree_type\x12\b\xf8B\x01\xbaH\x02\b\x01\"\xcc\x02\n" +
+ "\x13AlgebraicSubjectSet\x12a\n" +
+ "\toperation\x18\x01 \x01(\x0e2-.authzed.api.v1.AlgebraicSubjectSet.OperationB\x14\xfaB\a\x82\x01\x04\x10\x01 \x00\xbaH\a\x82\x01\x04\x10\x01 \x00R\toperation\x12`\n" +
+ "\bchildren\x18\x02 \x03(\v2*.authzed.api.v1.PermissionRelationshipTreeB\x18\xfaB\n" +
+ "\x92\x01\a\"\x05\x8a\x01\x02\x10\x01\xbaH\b\x92\x01\x05\"\x03\xc8\x01\x01R\bchildren\"p\n" +
+ "\tOperation\x12\x19\n" +
+ "\x15OPERATION_UNSPECIFIED\x10\x00\x12\x13\n" +
+ "\x0fOPERATION_UNION\x10\x01\x12\x1a\n" +
+ "\x16OPERATION_INTERSECTION\x10\x02\x12\x17\n" +
+ "\x13OPERATION_EXCLUSION\x10\x03\"P\n" +
+ "\x10DirectSubjectSet\x12<\n" +
+ "\bsubjects\x18\x01 \x03(\v2 .authzed.api.v1.SubjectReferenceR\bsubjects\"_\n" +
+ "\x11PartialCaveatInfo\x12J\n" +
+ "\x18missing_required_context\x18\x01 \x03(\tB\x10\xfaB\x05\x92\x01\x02\b\x01\xbaH\x05\x92\x01\x02\b\x01R\x16missingRequiredContextBJ\n" +
+ "\x12com.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
+
+var (
+ file_authzed_api_v1_core_proto_rawDescOnce sync.Once
+ file_authzed_api_v1_core_proto_rawDescData []byte
+)
+
+func file_authzed_api_v1_core_proto_rawDescGZIP() []byte {
+ file_authzed_api_v1_core_proto_rawDescOnce.Do(func() {
+ file_authzed_api_v1_core_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authzed_api_v1_core_proto_rawDesc), len(file_authzed_api_v1_core_proto_rawDesc)))
+ })
+ return file_authzed_api_v1_core_proto_rawDescData
+}
+
+var file_authzed_api_v1_core_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_authzed_api_v1_core_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
+var file_authzed_api_v1_core_proto_goTypes = []any{
+ (RelationshipUpdate_Operation)(0), // 0: authzed.api.v1.RelationshipUpdate.Operation
+ (AlgebraicSubjectSet_Operation)(0), // 1: authzed.api.v1.AlgebraicSubjectSet.Operation
+ (*Relationship)(nil), // 2: authzed.api.v1.Relationship
+ (*ContextualizedCaveat)(nil), // 3: authzed.api.v1.ContextualizedCaveat
+ (*SubjectReference)(nil), // 4: authzed.api.v1.SubjectReference
+ (*ObjectReference)(nil), // 5: authzed.api.v1.ObjectReference
+ (*ZedToken)(nil), // 6: authzed.api.v1.ZedToken
+ (*Cursor)(nil), // 7: authzed.api.v1.Cursor
+ (*RelationshipUpdate)(nil), // 8: authzed.api.v1.RelationshipUpdate
+ (*PermissionRelationshipTree)(nil), // 9: authzed.api.v1.PermissionRelationshipTree
+ (*AlgebraicSubjectSet)(nil), // 10: authzed.api.v1.AlgebraicSubjectSet
+ (*DirectSubjectSet)(nil), // 11: authzed.api.v1.DirectSubjectSet
+ (*PartialCaveatInfo)(nil), // 12: authzed.api.v1.PartialCaveatInfo
+ (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp
+ (*structpb.Struct)(nil), // 14: google.protobuf.Struct
+}
+var file_authzed_api_v1_core_proto_depIdxs = []int32{
+ 5, // 0: authzed.api.v1.Relationship.resource:type_name -> authzed.api.v1.ObjectReference
+ 4, // 1: authzed.api.v1.Relationship.subject:type_name -> authzed.api.v1.SubjectReference
+ 3, // 2: authzed.api.v1.Relationship.optional_caveat:type_name -> authzed.api.v1.ContextualizedCaveat
+ 13, // 3: authzed.api.v1.Relationship.optional_expires_at:type_name -> google.protobuf.Timestamp
+ 14, // 4: authzed.api.v1.ContextualizedCaveat.context:type_name -> google.protobuf.Struct
+ 5, // 5: authzed.api.v1.SubjectReference.object:type_name -> authzed.api.v1.ObjectReference
+ 0, // 6: authzed.api.v1.RelationshipUpdate.operation:type_name -> authzed.api.v1.RelationshipUpdate.Operation
+ 2, // 7: authzed.api.v1.RelationshipUpdate.relationship:type_name -> authzed.api.v1.Relationship
+ 10, // 8: authzed.api.v1.PermissionRelationshipTree.intermediate:type_name -> authzed.api.v1.AlgebraicSubjectSet
+ 11, // 9: authzed.api.v1.PermissionRelationshipTree.leaf:type_name -> authzed.api.v1.DirectSubjectSet
+ 5, // 10: authzed.api.v1.PermissionRelationshipTree.expanded_object:type_name -> authzed.api.v1.ObjectReference
+ 1, // 11: authzed.api.v1.AlgebraicSubjectSet.operation:type_name -> authzed.api.v1.AlgebraicSubjectSet.Operation
+ 9, // 12: authzed.api.v1.AlgebraicSubjectSet.children:type_name -> authzed.api.v1.PermissionRelationshipTree
+ 4, // 13: authzed.api.v1.DirectSubjectSet.subjects:type_name -> authzed.api.v1.SubjectReference
+ 14, // [14:14] is the sub-list for method output_type
+ 14, // [14:14] is the sub-list for method input_type
+ 14, // [14:14] is the sub-list for extension type_name
+ 14, // [14:14] is the sub-list for extension extendee
+ 0, // [0:14] is the sub-list for field type_name
+}
+
+func init() { file_authzed_api_v1_core_proto_init() }
+func file_authzed_api_v1_core_proto_init() {
+ if File_authzed_api_v1_core_proto != nil {
+ return
+ }
+ file_authzed_api_v1_core_proto_msgTypes[7].OneofWrappers = []any{
+ (*PermissionRelationshipTree_Intermediate)(nil),
+ (*PermissionRelationshipTree_Leaf)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_authzed_api_v1_core_proto_rawDesc), len(file_authzed_api_v1_core_proto_rawDesc)),
+ NumEnums: 2,
+ NumMessages: 11,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_authzed_api_v1_core_proto_goTypes,
+ DependencyIndexes: file_authzed_api_v1_core_proto_depIdxs,
+ EnumInfos: file_authzed_api_v1_core_proto_enumTypes,
+ MessageInfos: file_authzed_api_v1_core_proto_msgTypes,
+ }.Build()
+ File_authzed_api_v1_core_proto = out.File
+ file_authzed_api_v1_core_proto_goTypes = nil
+ file_authzed_api_v1_core_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/core.pb.validate.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/core.pb.validate.go
new file mode 100644
index 0000000..3285929
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/core.pb.validate.go
@@ -0,0 +1,1804 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: authzed/api/v1/core.proto
+
+package v1
+
+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 Relationship 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 *Relationship) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Relationship 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 RelationshipMultiError, or
+// nil if none found.
+func (m *Relationship) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Relationship) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetResource() == nil {
+ err := RelationshipValidationError{
+ field: "Resource",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetResource()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RelationshipValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RelationshipValidationError{
+ 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 RelationshipValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(m.GetRelation()) > 64 {
+ err := RelationshipValidationError{
+ field: "Relation",
+ reason: "value length must be at most 64 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_Relationship_Relation_Pattern.MatchString(m.GetRelation()) {
+ err := RelationshipValidationError{
+ field: "Relation",
+ reason: "value does not match regex pattern \"^[a-z][a-z0-9_]{1,62}[a-z0-9]$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if m.GetSubject() == nil {
+ err := RelationshipValidationError{
+ field: "Subject",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetSubject()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RelationshipValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RelationshipValidationError{
+ 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 RelationshipValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetOptionalCaveat()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RelationshipValidationError{
+ field: "OptionalCaveat",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RelationshipValidationError{
+ field: "OptionalCaveat",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalCaveat()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RelationshipValidationError{
+ field: "OptionalCaveat",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetOptionalExpiresAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RelationshipValidationError{
+ field: "OptionalExpiresAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RelationshipValidationError{
+ field: "OptionalExpiresAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalExpiresAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RelationshipValidationError{
+ field: "OptionalExpiresAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return RelationshipMultiError(errors)
+ }
+
+ return nil
+}
+
+// RelationshipMultiError is an error wrapping multiple validation errors
+// returned by Relationship.ValidateAll() if the designated constraints aren't met.
+type RelationshipMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m RelationshipMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m RelationshipMultiError) AllErrors() []error { return m }
+
+// RelationshipValidationError is the validation error returned by
+// Relationship.Validate if the designated constraints aren't met.
+type RelationshipValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e RelationshipValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e RelationshipValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e RelationshipValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e RelationshipValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e RelationshipValidationError) ErrorName() string { return "RelationshipValidationError" }
+
+// Error satisfies the builtin error interface
+func (e RelationshipValidationError) 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 %sRelationship.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = RelationshipValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = RelationshipValidationError{}
+
+var _Relationship_Relation_Pattern = regexp.MustCompile("^[a-z][a-z0-9_]{1,62}[a-z0-9]$")
+
+// Validate checks the field values on ContextualizedCaveat 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 *ContextualizedCaveat) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ContextualizedCaveat 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
+// ContextualizedCaveatMultiError, or nil if none found.
+func (m *ContextualizedCaveat) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ContextualizedCaveat) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetCaveatName()) > 128 {
+ err := ContextualizedCaveatValidationError{
+ field: "CaveatName",
+ reason: "value length must be at most 128 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_ContextualizedCaveat_CaveatName_Pattern.MatchString(m.GetCaveatName()) {
+ err := ContextualizedCaveatValidationError{
+ field: "CaveatName",
+ reason: "value does not match regex pattern \"^([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetContext()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ContextualizedCaveatValidationError{
+ field: "Context",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ContextualizedCaveatValidationError{
+ 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 ContextualizedCaveatValidationError{
+ field: "Context",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ContextualizedCaveatMultiError(errors)
+ }
+
+ return nil
+}
+
+// ContextualizedCaveatMultiError is an error wrapping multiple validation
+// errors returned by ContextualizedCaveat.ValidateAll() if the designated
+// constraints aren't met.
+type ContextualizedCaveatMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ContextualizedCaveatMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ContextualizedCaveatMultiError) AllErrors() []error { return m }
+
+// ContextualizedCaveatValidationError is the validation error returned by
+// ContextualizedCaveat.Validate if the designated constraints aren't met.
+type ContextualizedCaveatValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ContextualizedCaveatValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ContextualizedCaveatValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ContextualizedCaveatValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ContextualizedCaveatValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ContextualizedCaveatValidationError) ErrorName() string {
+ return "ContextualizedCaveatValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ContextualizedCaveatValidationError) 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 %sContextualizedCaveat.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ContextualizedCaveatValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ContextualizedCaveatValidationError{}
+
+var _ContextualizedCaveat_CaveatName_Pattern = regexp.MustCompile("^([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})$")
+
+// Validate checks the field values on SubjectReference 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 *SubjectReference) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on SubjectReference 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
+// SubjectReferenceMultiError, or nil if none found.
+func (m *SubjectReference) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SubjectReference) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetObject() == nil {
+ err := SubjectReferenceValidationError{
+ field: "Object",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetObject()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SubjectReferenceValidationError{
+ field: "Object",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SubjectReferenceValidationError{
+ field: "Object",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetObject()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SubjectReferenceValidationError{
+ field: "Object",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(m.GetOptionalRelation()) > 64 {
+ err := SubjectReferenceValidationError{
+ field: "OptionalRelation",
+ reason: "value length must be at most 64 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_SubjectReference_OptionalRelation_Pattern.MatchString(m.GetOptionalRelation()) {
+ err := SubjectReferenceValidationError{
+ field: "OptionalRelation",
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return SubjectReferenceMultiError(errors)
+ }
+
+ return nil
+}
+
+// SubjectReferenceMultiError is an error wrapping multiple validation errors
+// returned by SubjectReference.ValidateAll() if the designated constraints
+// aren't met.
+type SubjectReferenceMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SubjectReferenceMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SubjectReferenceMultiError) AllErrors() []error { return m }
+
+// SubjectReferenceValidationError is the validation error returned by
+// SubjectReference.Validate if the designated constraints aren't met.
+type SubjectReferenceValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SubjectReferenceValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SubjectReferenceValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e SubjectReferenceValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SubjectReferenceValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SubjectReferenceValidationError) ErrorName() string { return "SubjectReferenceValidationError" }
+
+// Error satisfies the builtin error interface
+func (e SubjectReferenceValidationError) 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 %sSubjectReference.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SubjectReferenceValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SubjectReferenceValidationError{}
+
+var _SubjectReference_OptionalRelation_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])?$")
+
+// Validate checks the field values on ObjectReference 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 *ObjectReference) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ObjectReference 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
+// ObjectReferenceMultiError, or nil if none found.
+func (m *ObjectReference) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ObjectReference) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetObjectType()) > 128 {
+ err := ObjectReferenceValidationError{
+ field: "ObjectType",
+ reason: "value length must be at most 128 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_ObjectReference_ObjectType_Pattern.MatchString(m.GetObjectType()) {
+ err := ObjectReferenceValidationError{
+ field: "ObjectType",
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(m.GetObjectId()) > 1024 {
+ err := ObjectReferenceValidationError{
+ field: "ObjectId",
+ reason: "value length must be at most 1024 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_ObjectReference_ObjectId_Pattern.MatchString(m.GetObjectId()) {
+ err := ObjectReferenceValidationError{
+ field: "ObjectId",
+ reason: "value does not match regex pattern \"^(([a-zA-Z0-9/_|\\\\-=+]{1,})|\\\\*)$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return ObjectReferenceMultiError(errors)
+ }
+
+ return nil
+}
+
+// ObjectReferenceMultiError is an error wrapping multiple validation errors
+// returned by ObjectReference.ValidateAll() if the designated constraints
+// aren't met.
+type ObjectReferenceMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ObjectReferenceMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ObjectReferenceMultiError) AllErrors() []error { return m }
+
+// ObjectReferenceValidationError is the validation error returned by
+// ObjectReference.Validate if the designated constraints aren't met.
+type ObjectReferenceValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ObjectReferenceValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ObjectReferenceValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ObjectReferenceValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ObjectReferenceValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ObjectReferenceValidationError) ErrorName() string { return "ObjectReferenceValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ObjectReferenceValidationError) 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 %sObjectReference.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ObjectReferenceValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ObjectReferenceValidationError{}
+
+var _ObjectReference_ObjectType_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$")
+
+var _ObjectReference_ObjectId_Pattern = regexp.MustCompile("^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)$")
+
+// Validate checks the field values on ZedToken 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 *ZedToken) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ZedToken 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 ZedTokenMultiError, or nil
+// if none found.
+func (m *ZedToken) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ZedToken) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetToken()) < 1 {
+ err := ZedTokenValidationError{
+ field: "Token",
+ reason: "value length must be at least 1 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return ZedTokenMultiError(errors)
+ }
+
+ return nil
+}
+
+// ZedTokenMultiError is an error wrapping multiple validation errors returned
+// by ZedToken.ValidateAll() if the designated constraints aren't met.
+type ZedTokenMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ZedTokenMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ZedTokenMultiError) AllErrors() []error { return m }
+
+// ZedTokenValidationError is the validation error returned by
+// ZedToken.Validate if the designated constraints aren't met.
+type ZedTokenValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ZedTokenValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ZedTokenValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ZedTokenValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ZedTokenValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ZedTokenValidationError) ErrorName() string { return "ZedTokenValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ZedTokenValidationError) 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 %sZedToken.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ZedTokenValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ZedTokenValidationError{}
+
+// Validate checks the field values on Cursor 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 *Cursor) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Cursor 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 CursorMultiError, or nil if none found.
+func (m *Cursor) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Cursor) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if l := len(m.GetToken()); l < 1 || l > 102400 {
+ err := CursorValidationError{
+ field: "Token",
+ reason: "value length must be between 1 and 102400 bytes, inclusive",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return CursorMultiError(errors)
+ }
+
+ return nil
+}
+
+// CursorMultiError is an error wrapping multiple validation errors returned by
+// Cursor.ValidateAll() if the designated constraints aren't met.
+type CursorMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CursorMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CursorMultiError) AllErrors() []error { return m }
+
+// CursorValidationError is the validation error returned by Cursor.Validate if
+// the designated constraints aren't met.
+type CursorValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CursorValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CursorValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CursorValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CursorValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CursorValidationError) ErrorName() string { return "CursorValidationError" }
+
+// Error satisfies the builtin error interface
+func (e CursorValidationError) 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 %sCursor.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CursorValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CursorValidationError{}
+
+// Validate checks the field values on RelationshipUpdate 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 *RelationshipUpdate) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on RelationshipUpdate 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
+// RelationshipUpdateMultiError, or nil if none found.
+func (m *RelationshipUpdate) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *RelationshipUpdate) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if _, ok := _RelationshipUpdate_Operation_NotInLookup[m.GetOperation()]; ok {
+ err := RelationshipUpdateValidationError{
+ field: "Operation",
+ reason: "value must not be in list [OPERATION_UNSPECIFIED]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if _, ok := RelationshipUpdate_Operation_name[int32(m.GetOperation())]; !ok {
+ err := RelationshipUpdateValidationError{
+ field: "Operation",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if m.GetRelationship() == nil {
+ err := RelationshipUpdateValidationError{
+ field: "Relationship",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRelationship()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RelationshipUpdateValidationError{
+ field: "Relationship",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RelationshipUpdateValidationError{
+ field: "Relationship",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelationship()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RelationshipUpdateValidationError{
+ field: "Relationship",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return RelationshipUpdateMultiError(errors)
+ }
+
+ return nil
+}
+
+// RelationshipUpdateMultiError is an error wrapping multiple validation errors
+// returned by RelationshipUpdate.ValidateAll() if the designated constraints
+// aren't met.
+type RelationshipUpdateMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m RelationshipUpdateMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m RelationshipUpdateMultiError) AllErrors() []error { return m }
+
+// RelationshipUpdateValidationError is the validation error returned by
+// RelationshipUpdate.Validate if the designated constraints aren't met.
+type RelationshipUpdateValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e RelationshipUpdateValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e RelationshipUpdateValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e RelationshipUpdateValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e RelationshipUpdateValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e RelationshipUpdateValidationError) ErrorName() string {
+ return "RelationshipUpdateValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e RelationshipUpdateValidationError) 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 %sRelationshipUpdate.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = RelationshipUpdateValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = RelationshipUpdateValidationError{}
+
+var _RelationshipUpdate_Operation_NotInLookup = map[RelationshipUpdate_Operation]struct{}{
+ 0: {},
+}
+
+// Validate checks the field values on PermissionRelationshipTree 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 *PermissionRelationshipTree) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on PermissionRelationshipTree 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
+// PermissionRelationshipTreeMultiError, or nil if none found.
+func (m *PermissionRelationshipTree) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *PermissionRelationshipTree) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetExpandedObject()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, PermissionRelationshipTreeValidationError{
+ field: "ExpandedObject",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, PermissionRelationshipTreeValidationError{
+ field: "ExpandedObject",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetExpandedObject()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return PermissionRelationshipTreeValidationError{
+ field: "ExpandedObject",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for ExpandedRelation
+
+ oneofTreeTypePresent := false
+ switch v := m.TreeType.(type) {
+ case *PermissionRelationshipTree_Intermediate:
+ if v == nil {
+ err := PermissionRelationshipTreeValidationError{
+ field: "TreeType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofTreeTypePresent = true
+
+ if all {
+ switch v := interface{}(m.GetIntermediate()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, PermissionRelationshipTreeValidationError{
+ field: "Intermediate",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, PermissionRelationshipTreeValidationError{
+ field: "Intermediate",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetIntermediate()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return PermissionRelationshipTreeValidationError{
+ field: "Intermediate",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *PermissionRelationshipTree_Leaf:
+ if v == nil {
+ err := PermissionRelationshipTreeValidationError{
+ field: "TreeType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofTreeTypePresent = true
+
+ if all {
+ switch v := interface{}(m.GetLeaf()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, PermissionRelationshipTreeValidationError{
+ field: "Leaf",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, PermissionRelationshipTreeValidationError{
+ field: "Leaf",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetLeaf()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return PermissionRelationshipTreeValidationError{
+ field: "Leaf",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofTreeTypePresent {
+ err := PermissionRelationshipTreeValidationError{
+ field: "TreeType",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return PermissionRelationshipTreeMultiError(errors)
+ }
+
+ return nil
+}
+
+// PermissionRelationshipTreeMultiError is an error wrapping multiple
+// validation errors returned by PermissionRelationshipTree.ValidateAll() if
+// the designated constraints aren't met.
+type PermissionRelationshipTreeMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m PermissionRelationshipTreeMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m PermissionRelationshipTreeMultiError) AllErrors() []error { return m }
+
+// PermissionRelationshipTreeValidationError is the validation error returned
+// by PermissionRelationshipTree.Validate if the designated constraints aren't met.
+type PermissionRelationshipTreeValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e PermissionRelationshipTreeValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e PermissionRelationshipTreeValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e PermissionRelationshipTreeValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e PermissionRelationshipTreeValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e PermissionRelationshipTreeValidationError) ErrorName() string {
+ return "PermissionRelationshipTreeValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e PermissionRelationshipTreeValidationError) 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 %sPermissionRelationshipTree.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = PermissionRelationshipTreeValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = PermissionRelationshipTreeValidationError{}
+
+// Validate checks the field values on AlgebraicSubjectSet 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 *AlgebraicSubjectSet) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on AlgebraicSubjectSet 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
+// AlgebraicSubjectSetMultiError, or nil if none found.
+func (m *AlgebraicSubjectSet) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *AlgebraicSubjectSet) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if _, ok := _AlgebraicSubjectSet_Operation_NotInLookup[m.GetOperation()]; ok {
+ err := AlgebraicSubjectSetValidationError{
+ field: "Operation",
+ reason: "value must not be in list [OPERATION_UNSPECIFIED]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if _, ok := AlgebraicSubjectSet_Operation_name[int32(m.GetOperation())]; !ok {
+ err := AlgebraicSubjectSetValidationError{
+ field: "Operation",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetChildren() {
+ _, _ = idx, item
+
+ if item == nil {
+ err := AlgebraicSubjectSetValidationError{
+ field: fmt.Sprintf("Children[%v]", idx),
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, AlgebraicSubjectSetValidationError{
+ field: fmt.Sprintf("Children[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, AlgebraicSubjectSetValidationError{
+ field: fmt.Sprintf("Children[%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 AlgebraicSubjectSetValidationError{
+ field: fmt.Sprintf("Children[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return AlgebraicSubjectSetMultiError(errors)
+ }
+
+ return nil
+}
+
+// AlgebraicSubjectSetMultiError is an error wrapping multiple validation
+// errors returned by AlgebraicSubjectSet.ValidateAll() if the designated
+// constraints aren't met.
+type AlgebraicSubjectSetMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m AlgebraicSubjectSetMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m AlgebraicSubjectSetMultiError) AllErrors() []error { return m }
+
+// AlgebraicSubjectSetValidationError is the validation error returned by
+// AlgebraicSubjectSet.Validate if the designated constraints aren't met.
+type AlgebraicSubjectSetValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e AlgebraicSubjectSetValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e AlgebraicSubjectSetValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e AlgebraicSubjectSetValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e AlgebraicSubjectSetValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e AlgebraicSubjectSetValidationError) ErrorName() string {
+ return "AlgebraicSubjectSetValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e AlgebraicSubjectSetValidationError) 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 %sAlgebraicSubjectSet.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = AlgebraicSubjectSetValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = AlgebraicSubjectSetValidationError{}
+
+var _AlgebraicSubjectSet_Operation_NotInLookup = map[AlgebraicSubjectSet_Operation]struct{}{
+ 0: {},
+}
+
+// Validate checks the field values on DirectSubjectSet 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 *DirectSubjectSet) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DirectSubjectSet 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
+// DirectSubjectSetMultiError, or nil if none found.
+func (m *DirectSubjectSet) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DirectSubjectSet) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetSubjects() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DirectSubjectSetValidationError{
+ field: fmt.Sprintf("Subjects[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DirectSubjectSetValidationError{
+ field: fmt.Sprintf("Subjects[%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 DirectSubjectSetValidationError{
+ field: fmt.Sprintf("Subjects[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return DirectSubjectSetMultiError(errors)
+ }
+
+ return nil
+}
+
+// DirectSubjectSetMultiError is an error wrapping multiple validation errors
+// returned by DirectSubjectSet.ValidateAll() if the designated constraints
+// aren't met.
+type DirectSubjectSetMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DirectSubjectSetMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DirectSubjectSetMultiError) AllErrors() []error { return m }
+
+// DirectSubjectSetValidationError is the validation error returned by
+// DirectSubjectSet.Validate if the designated constraints aren't met.
+type DirectSubjectSetValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DirectSubjectSetValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DirectSubjectSetValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DirectSubjectSetValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DirectSubjectSetValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DirectSubjectSetValidationError) ErrorName() string { return "DirectSubjectSetValidationError" }
+
+// Error satisfies the builtin error interface
+func (e DirectSubjectSetValidationError) 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 %sDirectSubjectSet.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DirectSubjectSetValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DirectSubjectSetValidationError{}
+
+// 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 {
+ msgs := make([]string, 0, len(m))
+ 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{}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/core_vtproto.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/core_vtproto.pb.go
new file mode 100644
index 0000000..c4522c7
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/core_vtproto.pb.go
@@ -0,0 +1,2747 @@
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// protoc-gen-go-vtproto version: v0.6.1-0.20240319094008-0393e58bdf10
+// source: authzed/api/v1/core.proto
+
+package v1
+
+import (
+ fmt "fmt"
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ structpb1 "github.com/planetscale/vtprotobuf/types/known/structpb"
+ timestamppb1 "github.com/planetscale/vtprotobuf/types/known/timestamppb"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ io "io"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *Relationship) CloneVT() *Relationship {
+ if m == nil {
+ return (*Relationship)(nil)
+ }
+ r := new(Relationship)
+ r.Resource = m.Resource.CloneVT()
+ r.Relation = m.Relation
+ r.Subject = m.Subject.CloneVT()
+ r.OptionalCaveat = m.OptionalCaveat.CloneVT()
+ r.OptionalExpiresAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.OptionalExpiresAt).CloneVT())
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *Relationship) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ContextualizedCaveat) CloneVT() *ContextualizedCaveat {
+ if m == nil {
+ return (*ContextualizedCaveat)(nil)
+ }
+ r := new(ContextualizedCaveat)
+ r.CaveatName = m.CaveatName
+ r.Context = (*structpb.Struct)((*structpb1.Struct)(m.Context).CloneVT())
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ContextualizedCaveat) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *SubjectReference) CloneVT() *SubjectReference {
+ if m == nil {
+ return (*SubjectReference)(nil)
+ }
+ r := new(SubjectReference)
+ r.Object = m.Object.CloneVT()
+ r.OptionalRelation = m.OptionalRelation
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *SubjectReference) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ObjectReference) CloneVT() *ObjectReference {
+ if m == nil {
+ return (*ObjectReference)(nil)
+ }
+ r := new(ObjectReference)
+ r.ObjectType = m.ObjectType
+ r.ObjectId = m.ObjectId
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ObjectReference) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ZedToken) CloneVT() *ZedToken {
+ if m == nil {
+ return (*ZedToken)(nil)
+ }
+ r := new(ZedToken)
+ r.Token = m.Token
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ZedToken) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *Cursor) CloneVT() *Cursor {
+ if m == nil {
+ return (*Cursor)(nil)
+ }
+ r := new(Cursor)
+ r.Token = m.Token
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *Cursor) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *RelationshipUpdate) CloneVT() *RelationshipUpdate {
+ if m == nil {
+ return (*RelationshipUpdate)(nil)
+ }
+ r := new(RelationshipUpdate)
+ r.Operation = m.Operation
+ r.Relationship = m.Relationship.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *RelationshipUpdate) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *PermissionRelationshipTree) CloneVT() *PermissionRelationshipTree {
+ if m == nil {
+ return (*PermissionRelationshipTree)(nil)
+ }
+ r := new(PermissionRelationshipTree)
+ r.ExpandedObject = m.ExpandedObject.CloneVT()
+ r.ExpandedRelation = m.ExpandedRelation
+ if m.TreeType != nil {
+ r.TreeType = m.TreeType.(interface {
+ CloneVT() isPermissionRelationshipTree_TreeType
+ }).CloneVT()
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *PermissionRelationshipTree) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *PermissionRelationshipTree_Intermediate) CloneVT() isPermissionRelationshipTree_TreeType {
+ if m == nil {
+ return (*PermissionRelationshipTree_Intermediate)(nil)
+ }
+ r := new(PermissionRelationshipTree_Intermediate)
+ r.Intermediate = m.Intermediate.CloneVT()
+ return r
+}
+
+func (m *PermissionRelationshipTree_Leaf) CloneVT() isPermissionRelationshipTree_TreeType {
+ if m == nil {
+ return (*PermissionRelationshipTree_Leaf)(nil)
+ }
+ r := new(PermissionRelationshipTree_Leaf)
+ r.Leaf = m.Leaf.CloneVT()
+ return r
+}
+
+func (m *AlgebraicSubjectSet) CloneVT() *AlgebraicSubjectSet {
+ if m == nil {
+ return (*AlgebraicSubjectSet)(nil)
+ }
+ r := new(AlgebraicSubjectSet)
+ r.Operation = m.Operation
+ if rhs := m.Children; rhs != nil {
+ tmpContainer := make([]*PermissionRelationshipTree, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Children = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *AlgebraicSubjectSet) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *DirectSubjectSet) CloneVT() *DirectSubjectSet {
+ if m == nil {
+ return (*DirectSubjectSet)(nil)
+ }
+ r := new(DirectSubjectSet)
+ if rhs := m.Subjects; rhs != nil {
+ tmpContainer := make([]*SubjectReference, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Subjects = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *DirectSubjectSet) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *PartialCaveatInfo) CloneVT() *PartialCaveatInfo {
+ if m == nil {
+ return (*PartialCaveatInfo)(nil)
+ }
+ r := new(PartialCaveatInfo)
+ if rhs := m.MissingRequiredContext; rhs != nil {
+ tmpContainer := make([]string, len(rhs))
+ copy(tmpContainer, rhs)
+ r.MissingRequiredContext = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *PartialCaveatInfo) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (this *Relationship) EqualVT(that *Relationship) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Resource.EqualVT(that.Resource) {
+ return false
+ }
+ if this.Relation != that.Relation {
+ return false
+ }
+ if !this.Subject.EqualVT(that.Subject) {
+ return false
+ }
+ if !this.OptionalCaveat.EqualVT(that.OptionalCaveat) {
+ return false
+ }
+ if !(*timestamppb1.Timestamp)(this.OptionalExpiresAt).EqualVT((*timestamppb1.Timestamp)(that.OptionalExpiresAt)) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *Relationship) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*Relationship)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ContextualizedCaveat) EqualVT(that *ContextualizedCaveat) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.CaveatName != that.CaveatName {
+ return false
+ }
+ if !(*structpb1.Struct)(this.Context).EqualVT((*structpb1.Struct)(that.Context)) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ContextualizedCaveat) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ContextualizedCaveat)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *SubjectReference) EqualVT(that *SubjectReference) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Object.EqualVT(that.Object) {
+ return false
+ }
+ if this.OptionalRelation != that.OptionalRelation {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *SubjectReference) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*SubjectReference)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ObjectReference) EqualVT(that *ObjectReference) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.ObjectType != that.ObjectType {
+ return false
+ }
+ if this.ObjectId != that.ObjectId {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ObjectReference) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ObjectReference)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ZedToken) EqualVT(that *ZedToken) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Token != that.Token {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ZedToken) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ZedToken)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *Cursor) EqualVT(that *Cursor) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Token != that.Token {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *Cursor) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*Cursor)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *RelationshipUpdate) EqualVT(that *RelationshipUpdate) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Operation != that.Operation {
+ return false
+ }
+ if !this.Relationship.EqualVT(that.Relationship) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *RelationshipUpdate) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*RelationshipUpdate)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *PermissionRelationshipTree) EqualVT(that *PermissionRelationshipTree) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.TreeType == nil && that.TreeType != nil {
+ return false
+ } else if this.TreeType != nil {
+ if that.TreeType == nil {
+ return false
+ }
+ if !this.TreeType.(interface {
+ EqualVT(isPermissionRelationshipTree_TreeType) bool
+ }).EqualVT(that.TreeType) {
+ return false
+ }
+ }
+ if !this.ExpandedObject.EqualVT(that.ExpandedObject) {
+ return false
+ }
+ if this.ExpandedRelation != that.ExpandedRelation {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *PermissionRelationshipTree) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*PermissionRelationshipTree)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *PermissionRelationshipTree_Intermediate) EqualVT(thatIface isPermissionRelationshipTree_TreeType) bool {
+ that, ok := thatIface.(*PermissionRelationshipTree_Intermediate)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.Intermediate, that.Intermediate; p != q {
+ if p == nil {
+ p = &AlgebraicSubjectSet{}
+ }
+ if q == nil {
+ q = &AlgebraicSubjectSet{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *PermissionRelationshipTree_Leaf) EqualVT(thatIface isPermissionRelationshipTree_TreeType) bool {
+ that, ok := thatIface.(*PermissionRelationshipTree_Leaf)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.Leaf, that.Leaf; p != q {
+ if p == nil {
+ p = &DirectSubjectSet{}
+ }
+ if q == nil {
+ q = &DirectSubjectSet{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *AlgebraicSubjectSet) EqualVT(that *AlgebraicSubjectSet) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Operation != that.Operation {
+ return false
+ }
+ if len(this.Children) != len(that.Children) {
+ return false
+ }
+ for i, vx := range this.Children {
+ vy := that.Children[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &PermissionRelationshipTree{}
+ }
+ if q == nil {
+ q = &PermissionRelationshipTree{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *AlgebraicSubjectSet) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*AlgebraicSubjectSet)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *DirectSubjectSet) EqualVT(that *DirectSubjectSet) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if len(this.Subjects) != len(that.Subjects) {
+ return false
+ }
+ for i, vx := range this.Subjects {
+ vy := that.Subjects[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &SubjectReference{}
+ }
+ if q == nil {
+ q = &SubjectReference{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *DirectSubjectSet) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*DirectSubjectSet)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *PartialCaveatInfo) EqualVT(that *PartialCaveatInfo) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if len(this.MissingRequiredContext) != len(that.MissingRequiredContext) {
+ return false
+ }
+ for i, vx := range this.MissingRequiredContext {
+ vy := that.MissingRequiredContext[i]
+ if vx != vy {
+ return false
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *PartialCaveatInfo) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*PartialCaveatInfo)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (m *Relationship) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Relationship) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *Relationship) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.OptionalExpiresAt != nil {
+ size, err := (*timestamppb1.Timestamp)(m.OptionalExpiresAt).MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.OptionalCaveat != nil {
+ size, err := m.OptionalCaveat.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.Subject != nil {
+ size, err := m.Subject.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Relation) > 0 {
+ i -= len(m.Relation)
+ copy(dAtA[i:], m.Relation)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Relation)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Resource != nil {
+ size, err := m.Resource.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ContextualizedCaveat) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ContextualizedCaveat) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ContextualizedCaveat) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Context != nil {
+ size, err := (*structpb1.Struct)(m.Context).MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.CaveatName) > 0 {
+ i -= len(m.CaveatName)
+ copy(dAtA[i:], m.CaveatName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CaveatName)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *SubjectReference) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SubjectReference) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *SubjectReference) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.OptionalRelation) > 0 {
+ i -= len(m.OptionalRelation)
+ copy(dAtA[i:], m.OptionalRelation)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalRelation)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Object != nil {
+ size, err := m.Object.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ObjectReference) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ObjectReference) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ObjectReference) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.ObjectId) > 0 {
+ i -= len(m.ObjectId)
+ copy(dAtA[i:], m.ObjectId)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ObjectId)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.ObjectType) > 0 {
+ i -= len(m.ObjectType)
+ copy(dAtA[i:], m.ObjectType)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ObjectType)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ZedToken) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ZedToken) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ZedToken) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Token) > 0 {
+ i -= len(m.Token)
+ copy(dAtA[i:], m.Token)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Token)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Cursor) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Cursor) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *Cursor) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Token) > 0 {
+ i -= len(m.Token)
+ copy(dAtA[i:], m.Token)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Token)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *RelationshipUpdate) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RelationshipUpdate) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *RelationshipUpdate) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Relationship != nil {
+ size, err := m.Relationship.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Operation != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Operation))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *PermissionRelationshipTree) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PermissionRelationshipTree) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *PermissionRelationshipTree) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if vtmsg, ok := m.TreeType.(interface {
+ MarshalToSizedBufferVT([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if len(m.ExpandedRelation) > 0 {
+ i -= len(m.ExpandedRelation)
+ copy(dAtA[i:], m.ExpandedRelation)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ExpandedRelation)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.ExpandedObject != nil {
+ size, err := m.ExpandedObject.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *PermissionRelationshipTree_Intermediate) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *PermissionRelationshipTree_Intermediate) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Intermediate != nil {
+ size, err := m.Intermediate.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+func (m *PermissionRelationshipTree_Leaf) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *PermissionRelationshipTree_Leaf) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Leaf != nil {
+ size, err := m.Leaf.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *AlgebraicSubjectSet) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AlgebraicSubjectSet) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *AlgebraicSubjectSet) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Children) > 0 {
+ for iNdEx := len(m.Children) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Children[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.Operation != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Operation))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DirectSubjectSet) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DirectSubjectSet) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *DirectSubjectSet) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Subjects) > 0 {
+ for iNdEx := len(m.Subjects) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Subjects[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *PartialCaveatInfo) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PartialCaveatInfo) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *PartialCaveatInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.MissingRequiredContext) > 0 {
+ for iNdEx := len(m.MissingRequiredContext) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.MissingRequiredContext[iNdEx])
+ copy(dAtA[i:], m.MissingRequiredContext[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MissingRequiredContext[iNdEx])))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Relationship) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Resource != nil {
+ l = m.Resource.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Relation)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Subject != nil {
+ l = m.Subject.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OptionalCaveat != nil {
+ l = m.OptionalCaveat.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OptionalExpiresAt != nil {
+ l = (*timestamppb1.Timestamp)(m.OptionalExpiresAt).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ContextualizedCaveat) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.CaveatName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Context != nil {
+ l = (*structpb1.Struct)(m.Context).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *SubjectReference) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Object != nil {
+ l = m.Object.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.OptionalRelation)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ObjectReference) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.ObjectType)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.ObjectId)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ZedToken) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Token)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *Cursor) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Token)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *RelationshipUpdate) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Operation != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Operation))
+ }
+ if m.Relationship != nil {
+ l = m.Relationship.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *PermissionRelationshipTree) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.TreeType.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ if m.ExpandedObject != nil {
+ l = m.ExpandedObject.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.ExpandedRelation)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *PermissionRelationshipTree_Intermediate) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Intermediate != nil {
+ l = m.Intermediate.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *PermissionRelationshipTree_Leaf) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Leaf != nil {
+ l = m.Leaf.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *AlgebraicSubjectSet) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Operation != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Operation))
+ }
+ if len(m.Children) > 0 {
+ for _, e := range m.Children {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DirectSubjectSet) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Subjects) > 0 {
+ for _, e := range m.Subjects {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *PartialCaveatInfo) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.MissingRequiredContext) > 0 {
+ for _, s := range m.MissingRequiredContext {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *Relationship) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Relationship: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Relationship: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resource == nil {
+ m.Resource = &ObjectReference{}
+ }
+ if err := m.Resource.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Relation = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Subject == nil {
+ m.Subject = &SubjectReference{}
+ }
+ if err := m.Subject.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalCaveat", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalCaveat == nil {
+ m.OptionalCaveat = &ContextualizedCaveat{}
+ }
+ if err := m.OptionalCaveat.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalExpiresAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalExpiresAt == nil {
+ m.OptionalExpiresAt = &timestamppb.Timestamp{}
+ }
+ if err := (*timestamppb1.Timestamp)(m.OptionalExpiresAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ContextualizedCaveat) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ContextualizedCaveat: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ContextualizedCaveat: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CaveatName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Context == nil {
+ m.Context = &structpb.Struct{}
+ }
+ if err := (*structpb1.Struct)(m.Context).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SubjectReference) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SubjectReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SubjectReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Object == nil {
+ m.Object = &ObjectReference{}
+ }
+ if err := m.Object.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalRelation", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalRelation = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ObjectReference) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ObjectReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ObjectReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ObjectType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ObjectId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ObjectId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ZedToken) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ZedToken: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ZedToken: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Token = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Cursor) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Cursor: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Cursor: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Token = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RelationshipUpdate) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RelationshipUpdate: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RelationshipUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType)
+ }
+ m.Operation = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Operation |= RelationshipUpdate_Operation(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Relationship", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Relationship == nil {
+ m.Relationship = &Relationship{}
+ }
+ if err := m.Relationship.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PermissionRelationshipTree) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PermissionRelationshipTree: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PermissionRelationshipTree: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Intermediate", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.TreeType.(*PermissionRelationshipTree_Intermediate); ok {
+ if err := oneof.Intermediate.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &AlgebraicSubjectSet{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.TreeType = &PermissionRelationshipTree_Intermediate{Intermediate: v}
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.TreeType.(*PermissionRelationshipTree_Leaf); ok {
+ if err := oneof.Leaf.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &DirectSubjectSet{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.TreeType = &PermissionRelationshipTree_Leaf{Leaf: v}
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExpandedObject", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ExpandedObject == nil {
+ m.ExpandedObject = &ObjectReference{}
+ }
+ if err := m.ExpandedObject.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExpandedRelation", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ExpandedRelation = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *AlgebraicSubjectSet) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AlgebraicSubjectSet: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AlgebraicSubjectSet: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType)
+ }
+ m.Operation = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Operation |= AlgebraicSubjectSet_Operation(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Children = append(m.Children, &PermissionRelationshipTree{})
+ if err := m.Children[len(m.Children)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DirectSubjectSet) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DirectSubjectSet: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DirectSubjectSet: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Subjects = append(m.Subjects, &SubjectReference{})
+ if err := m.Subjects[len(m.Subjects)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PartialCaveatInfo) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PartialCaveatInfo: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PartialCaveatInfo: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MissingRequiredContext", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MissingRequiredContext = append(m.MissingRequiredContext, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/debug.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/debug.pb.go
new file mode 100644
index 0000000..d1f4b55
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/debug.pb.go
@@ -0,0 +1,696 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.6
+// protoc (unknown)
+// source: authzed/api/v1/debug.proto
+
+package v1
+
+import (
+ _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type CheckDebugTrace_PermissionType int32
+
+const (
+ CheckDebugTrace_PERMISSION_TYPE_UNSPECIFIED CheckDebugTrace_PermissionType = 0
+ CheckDebugTrace_PERMISSION_TYPE_RELATION CheckDebugTrace_PermissionType = 1
+ CheckDebugTrace_PERMISSION_TYPE_PERMISSION CheckDebugTrace_PermissionType = 2
+)
+
+// Enum value maps for CheckDebugTrace_PermissionType.
+var (
+ CheckDebugTrace_PermissionType_name = map[int32]string{
+ 0: "PERMISSION_TYPE_UNSPECIFIED",
+ 1: "PERMISSION_TYPE_RELATION",
+ 2: "PERMISSION_TYPE_PERMISSION",
+ }
+ CheckDebugTrace_PermissionType_value = map[string]int32{
+ "PERMISSION_TYPE_UNSPECIFIED": 0,
+ "PERMISSION_TYPE_RELATION": 1,
+ "PERMISSION_TYPE_PERMISSION": 2,
+ }
+)
+
+func (x CheckDebugTrace_PermissionType) Enum() *CheckDebugTrace_PermissionType {
+ p := new(CheckDebugTrace_PermissionType)
+ *p = x
+ return p
+}
+
+func (x CheckDebugTrace_PermissionType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CheckDebugTrace_PermissionType) Descriptor() protoreflect.EnumDescriptor {
+ return file_authzed_api_v1_debug_proto_enumTypes[0].Descriptor()
+}
+
+func (CheckDebugTrace_PermissionType) Type() protoreflect.EnumType {
+ return &file_authzed_api_v1_debug_proto_enumTypes[0]
+}
+
+func (x CheckDebugTrace_PermissionType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use CheckDebugTrace_PermissionType.Descriptor instead.
+func (CheckDebugTrace_PermissionType) EnumDescriptor() ([]byte, []int) {
+ return file_authzed_api_v1_debug_proto_rawDescGZIP(), []int{1, 0}
+}
+
+type CheckDebugTrace_Permissionship int32
+
+const (
+ CheckDebugTrace_PERMISSIONSHIP_UNSPECIFIED CheckDebugTrace_Permissionship = 0
+ CheckDebugTrace_PERMISSIONSHIP_NO_PERMISSION CheckDebugTrace_Permissionship = 1
+ CheckDebugTrace_PERMISSIONSHIP_HAS_PERMISSION CheckDebugTrace_Permissionship = 2
+ CheckDebugTrace_PERMISSIONSHIP_CONDITIONAL_PERMISSION CheckDebugTrace_Permissionship = 3
+)
+
+// Enum value maps for CheckDebugTrace_Permissionship.
+var (
+ CheckDebugTrace_Permissionship_name = map[int32]string{
+ 0: "PERMISSIONSHIP_UNSPECIFIED",
+ 1: "PERMISSIONSHIP_NO_PERMISSION",
+ 2: "PERMISSIONSHIP_HAS_PERMISSION",
+ 3: "PERMISSIONSHIP_CONDITIONAL_PERMISSION",
+ }
+ CheckDebugTrace_Permissionship_value = map[string]int32{
+ "PERMISSIONSHIP_UNSPECIFIED": 0,
+ "PERMISSIONSHIP_NO_PERMISSION": 1,
+ "PERMISSIONSHIP_HAS_PERMISSION": 2,
+ "PERMISSIONSHIP_CONDITIONAL_PERMISSION": 3,
+ }
+)
+
+func (x CheckDebugTrace_Permissionship) Enum() *CheckDebugTrace_Permissionship {
+ p := new(CheckDebugTrace_Permissionship)
+ *p = x
+ return p
+}
+
+func (x CheckDebugTrace_Permissionship) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CheckDebugTrace_Permissionship) Descriptor() protoreflect.EnumDescriptor {
+ return file_authzed_api_v1_debug_proto_enumTypes[1].Descriptor()
+}
+
+func (CheckDebugTrace_Permissionship) Type() protoreflect.EnumType {
+ return &file_authzed_api_v1_debug_proto_enumTypes[1]
+}
+
+func (x CheckDebugTrace_Permissionship) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use CheckDebugTrace_Permissionship.Descriptor instead.
+func (CheckDebugTrace_Permissionship) EnumDescriptor() ([]byte, []int) {
+ return file_authzed_api_v1_debug_proto_rawDescGZIP(), []int{1, 1}
+}
+
+type CaveatEvalInfo_Result int32
+
+const (
+ CaveatEvalInfo_RESULT_UNSPECIFIED CaveatEvalInfo_Result = 0
+ CaveatEvalInfo_RESULT_UNEVALUATED CaveatEvalInfo_Result = 1
+ CaveatEvalInfo_RESULT_FALSE CaveatEvalInfo_Result = 2
+ CaveatEvalInfo_RESULT_TRUE CaveatEvalInfo_Result = 3
+ CaveatEvalInfo_RESULT_MISSING_SOME_CONTEXT CaveatEvalInfo_Result = 4
+)
+
+// Enum value maps for CaveatEvalInfo_Result.
+var (
+ CaveatEvalInfo_Result_name = map[int32]string{
+ 0: "RESULT_UNSPECIFIED",
+ 1: "RESULT_UNEVALUATED",
+ 2: "RESULT_FALSE",
+ 3: "RESULT_TRUE",
+ 4: "RESULT_MISSING_SOME_CONTEXT",
+ }
+ CaveatEvalInfo_Result_value = map[string]int32{
+ "RESULT_UNSPECIFIED": 0,
+ "RESULT_UNEVALUATED": 1,
+ "RESULT_FALSE": 2,
+ "RESULT_TRUE": 3,
+ "RESULT_MISSING_SOME_CONTEXT": 4,
+ }
+)
+
+func (x CaveatEvalInfo_Result) Enum() *CaveatEvalInfo_Result {
+ p := new(CaveatEvalInfo_Result)
+ *p = x
+ return p
+}
+
+func (x CaveatEvalInfo_Result) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CaveatEvalInfo_Result) Descriptor() protoreflect.EnumDescriptor {
+ return file_authzed_api_v1_debug_proto_enumTypes[2].Descriptor()
+}
+
+func (CaveatEvalInfo_Result) Type() protoreflect.EnumType {
+ return &file_authzed_api_v1_debug_proto_enumTypes[2]
+}
+
+func (x CaveatEvalInfo_Result) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use CaveatEvalInfo_Result.Descriptor instead.
+func (CaveatEvalInfo_Result) EnumDescriptor() ([]byte, []int) {
+ return file_authzed_api_v1_debug_proto_rawDescGZIP(), []int{2, 0}
+}
+
+// DebugInformation defines debug information returned by an API call in a footer when
+// requested with a specific debugging header.
+//
+// The specific debug information returned will depend on the type of the API call made.
+//
+// See the github.com/authzed/authzed-go project for the specific header and footer names.
+type DebugInformation struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // check holds debug information about a check request.
+ Check *CheckDebugTrace `protobuf:"bytes,1,opt,name=check,proto3" json:"check,omitempty"`
+ // schema_used holds the schema used for the request.
+ SchemaUsed string `protobuf:"bytes,2,opt,name=schema_used,json=schemaUsed,proto3" json:"schema_used,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DebugInformation) Reset() {
+ *x = DebugInformation{}
+ mi := &file_authzed_api_v1_debug_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DebugInformation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DebugInformation) ProtoMessage() {}
+
+func (x *DebugInformation) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_debug_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DebugInformation.ProtoReflect.Descriptor instead.
+func (*DebugInformation) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_debug_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *DebugInformation) GetCheck() *CheckDebugTrace {
+ if x != nil {
+ return x.Check
+ }
+ return nil
+}
+
+func (x *DebugInformation) GetSchemaUsed() string {
+ if x != nil {
+ return x.SchemaUsed
+ }
+ return ""
+}
+
+// CheckDebugTrace is a recursive trace of the requests made for resolving a CheckPermission
+// API call.
+type CheckDebugTrace struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // resource holds the resource on which the Check was performed.
+ // for batched calls, the object_id field contains a comma-separated list of object IDs
+ // for all the resources checked in the batch.
+ Resource *ObjectReference `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
+ // permission holds the name of the permission or relation on which the Check was performed.
+ Permission string `protobuf:"bytes,2,opt,name=permission,proto3" json:"permission,omitempty"`
+ // permission_type holds information indicating whether it was a permission or relation.
+ PermissionType CheckDebugTrace_PermissionType `protobuf:"varint,3,opt,name=permission_type,json=permissionType,proto3,enum=authzed.api.v1.CheckDebugTrace_PermissionType" json:"permission_type,omitempty"`
+ // subject holds the subject on which the Check was performed. This will be static across all calls within
+ // the same Check tree.
+ Subject *SubjectReference `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
+ // result holds the result of the Check call.
+ Result CheckDebugTrace_Permissionship `protobuf:"varint,5,opt,name=result,proto3,enum=authzed.api.v1.CheckDebugTrace_Permissionship" json:"result,omitempty"`
+ // caveat_evaluation_info holds information about the caveat evaluated for this step of the trace.
+ CaveatEvaluationInfo *CaveatEvalInfo `protobuf:"bytes,8,opt,name=caveat_evaluation_info,json=caveatEvaluationInfo,proto3" json:"caveat_evaluation_info,omitempty"`
+ // duration holds the time spent executing this Check operation.
+ Duration *durationpb.Duration `protobuf:"bytes,9,opt,name=duration,proto3" json:"duration,omitempty"`
+ // resolution holds information about how the problem was resolved.
+ //
+ // Types that are valid to be assigned to Resolution:
+ //
+ // *CheckDebugTrace_WasCachedResult
+ // *CheckDebugTrace_SubProblems_
+ Resolution isCheckDebugTrace_Resolution `protobuf_oneof:"resolution"`
+ // optional_expires_at is the time at which at least one of the relationships used to
+ // compute this result, expires (if any). This is *not* related to the caching window.
+ OptionalExpiresAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=optional_expires_at,json=optionalExpiresAt,proto3" json:"optional_expires_at,omitempty"`
+ // trace_operation_id is a unique identifier for this trace's operation, that will
+ // be shared for all traces created for the same check operation in SpiceDB.
+ //
+ // In cases where SpiceDB performs automatic batching of subproblems, this ID can be used
+ // to correlate work that was shared across multiple traces.
+ //
+ // This identifier is generated by SpiceDB, is to be considered opaque to the caller
+ // and only guaranteed to be unique within the same overall Check or CheckBulk operation.
+ TraceOperationId string `protobuf:"bytes,11,opt,name=trace_operation_id,json=traceOperationId,proto3" json:"trace_operation_id,omitempty"`
+ // source holds the source of the result. It is of the form:
+ // `<sourcetype>:<sourceid>`, where sourcetype can be, among others:
+ // `spicedb`, `materialize`, etc.
+ Source string `protobuf:"bytes,12,opt,name=source,proto3" json:"source,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *CheckDebugTrace) Reset() {
+ *x = CheckDebugTrace{}
+ mi := &file_authzed_api_v1_debug_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *CheckDebugTrace) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CheckDebugTrace) ProtoMessage() {}
+
+func (x *CheckDebugTrace) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_debug_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CheckDebugTrace.ProtoReflect.Descriptor instead.
+func (*CheckDebugTrace) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_debug_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CheckDebugTrace) GetResource() *ObjectReference {
+ if x != nil {
+ return x.Resource
+ }
+ return nil
+}
+
+func (x *CheckDebugTrace) GetPermission() string {
+ if x != nil {
+ return x.Permission
+ }
+ return ""
+}
+
+func (x *CheckDebugTrace) GetPermissionType() CheckDebugTrace_PermissionType {
+ if x != nil {
+ return x.PermissionType
+ }
+ return CheckDebugTrace_PERMISSION_TYPE_UNSPECIFIED
+}
+
+func (x *CheckDebugTrace) GetSubject() *SubjectReference {
+ if x != nil {
+ return x.Subject
+ }
+ return nil
+}
+
+func (x *CheckDebugTrace) GetResult() CheckDebugTrace_Permissionship {
+ if x != nil {
+ return x.Result
+ }
+ return CheckDebugTrace_PERMISSIONSHIP_UNSPECIFIED
+}
+
+func (x *CheckDebugTrace) GetCaveatEvaluationInfo() *CaveatEvalInfo {
+ if x != nil {
+ return x.CaveatEvaluationInfo
+ }
+ return nil
+}
+
+func (x *CheckDebugTrace) GetDuration() *durationpb.Duration {
+ if x != nil {
+ return x.Duration
+ }
+ return nil
+}
+
+func (x *CheckDebugTrace) GetResolution() isCheckDebugTrace_Resolution {
+ if x != nil {
+ return x.Resolution
+ }
+ return nil
+}
+
+func (x *CheckDebugTrace) GetWasCachedResult() bool {
+ if x != nil {
+ if x, ok := x.Resolution.(*CheckDebugTrace_WasCachedResult); ok {
+ return x.WasCachedResult
+ }
+ }
+ return false
+}
+
+func (x *CheckDebugTrace) GetSubProblems() *CheckDebugTrace_SubProblems {
+ if x != nil {
+ if x, ok := x.Resolution.(*CheckDebugTrace_SubProblems_); ok {
+ return x.SubProblems
+ }
+ }
+ return nil
+}
+
+func (x *CheckDebugTrace) GetOptionalExpiresAt() *timestamppb.Timestamp {
+ if x != nil {
+ return x.OptionalExpiresAt
+ }
+ return nil
+}
+
+func (x *CheckDebugTrace) GetTraceOperationId() string {
+ if x != nil {
+ return x.TraceOperationId
+ }
+ return ""
+}
+
+func (x *CheckDebugTrace) GetSource() string {
+ if x != nil {
+ return x.Source
+ }
+ return ""
+}
+
+type isCheckDebugTrace_Resolution interface {
+ isCheckDebugTrace_Resolution()
+}
+
+type CheckDebugTrace_WasCachedResult struct {
+ // was_cached_result, if true, indicates that the result was found in the cache and returned directly.
+ WasCachedResult bool `protobuf:"varint,6,opt,name=was_cached_result,json=wasCachedResult,proto3,oneof"`
+}
+
+type CheckDebugTrace_SubProblems_ struct {
+ // sub_problems holds the sub problems that were executed to resolve the answer to this Check. An empty list
+ // and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
+ SubProblems *CheckDebugTrace_SubProblems `protobuf:"bytes,7,opt,name=sub_problems,json=subProblems,proto3,oneof"`
+}
+
+func (*CheckDebugTrace_WasCachedResult) isCheckDebugTrace_Resolution() {}
+
+func (*CheckDebugTrace_SubProblems_) isCheckDebugTrace_Resolution() {}
+
+// CaveatEvalInfo holds information about a caveat expression that was evaluated.
+type CaveatEvalInfo struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // expression is the expression that was evaluated.
+ Expression string `protobuf:"bytes,1,opt,name=expression,proto3" json:"expression,omitempty"`
+ // result is the result of the evaluation.
+ Result CaveatEvalInfo_Result `protobuf:"varint,2,opt,name=result,proto3,enum=authzed.api.v1.CaveatEvalInfo_Result" json:"result,omitempty"`
+ // context consists of any named values that were used for evaluating the caveat expression.
+ Context *structpb.Struct `protobuf:"bytes,3,opt,name=context,proto3" json:"context,omitempty"`
+ // partial_caveat_info holds information of a partially-evaluated caveated response, if applicable.
+ PartialCaveatInfo *PartialCaveatInfo `protobuf:"bytes,4,opt,name=partial_caveat_info,json=partialCaveatInfo,proto3" json:"partial_caveat_info,omitempty"`
+ // caveat_name is the name of the caveat that was executed, if applicable.
+ CaveatName string `protobuf:"bytes,5,opt,name=caveat_name,json=caveatName,proto3" json:"caveat_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *CaveatEvalInfo) Reset() {
+ *x = CaveatEvalInfo{}
+ mi := &file_authzed_api_v1_debug_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *CaveatEvalInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CaveatEvalInfo) ProtoMessage() {}
+
+func (x *CaveatEvalInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_debug_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CaveatEvalInfo.ProtoReflect.Descriptor instead.
+func (*CaveatEvalInfo) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_debug_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *CaveatEvalInfo) GetExpression() string {
+ if x != nil {
+ return x.Expression
+ }
+ return ""
+}
+
+func (x *CaveatEvalInfo) GetResult() CaveatEvalInfo_Result {
+ if x != nil {
+ return x.Result
+ }
+ return CaveatEvalInfo_RESULT_UNSPECIFIED
+}
+
+func (x *CaveatEvalInfo) GetContext() *structpb.Struct {
+ if x != nil {
+ return x.Context
+ }
+ return nil
+}
+
+func (x *CaveatEvalInfo) GetPartialCaveatInfo() *PartialCaveatInfo {
+ if x != nil {
+ return x.PartialCaveatInfo
+ }
+ return nil
+}
+
+func (x *CaveatEvalInfo) GetCaveatName() string {
+ if x != nil {
+ return x.CaveatName
+ }
+ return ""
+}
+
+type CheckDebugTrace_SubProblems struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Traces []*CheckDebugTrace `protobuf:"bytes,1,rep,name=traces,proto3" json:"traces,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *CheckDebugTrace_SubProblems) Reset() {
+ *x = CheckDebugTrace_SubProblems{}
+ mi := &file_authzed_api_v1_debug_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *CheckDebugTrace_SubProblems) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CheckDebugTrace_SubProblems) ProtoMessage() {}
+
+func (x *CheckDebugTrace_SubProblems) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_debug_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CheckDebugTrace_SubProblems.ProtoReflect.Descriptor instead.
+func (*CheckDebugTrace_SubProblems) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_debug_proto_rawDescGZIP(), []int{1, 0}
+}
+
+func (x *CheckDebugTrace_SubProblems) GetTraces() []*CheckDebugTrace {
+ if x != nil {
+ return x.Traces
+ }
+ return nil
+}
+
+var File_authzed_api_v1_debug_proto protoreflect.FileDescriptor
+
+const file_authzed_api_v1_debug_proto_rawDesc = "" +
+ "\n" +
+ "\x1aauthzed/api/v1/debug.proto\x12\x0eauthzed.api.v1\x1a\x19authzed/api/v1/core.proto\x1a\x1bbuf/validate/validate.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17validate/validate.proto\"j\n" +
+ "\x10DebugInformation\x125\n" +
+ "\x05check\x18\x01 \x01(\v2\x1f.authzed.api.v1.CheckDebugTraceR\x05check\x12\x1f\n" +
+ "\vschema_used\x18\x02 \x01(\tR\n" +
+ "schemaUsed\"\xaa\t\n" +
+ "\x0fCheckDebugTrace\x12K\n" +
+ "\bresource\x18\x01 \x01(\v2\x1f.authzed.api.v1.ObjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\bresource\x12\x1e\n" +
+ "\n" +
+ "permission\x18\x02 \x01(\tR\n" +
+ "permission\x12m\n" +
+ "\x0fpermission_type\x18\x03 \x01(\x0e2..authzed.api.v1.CheckDebugTrace.PermissionTypeB\x14\xfaB\a\x82\x01\x04\x10\x01 \x00\xbaH\a\x82\x01\x04\x10\x01 \x00R\x0epermissionType\x12J\n" +
+ "\asubject\x18\x04 \x01(\v2 .authzed.api.v1.SubjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\asubject\x12\\\n" +
+ "\x06result\x18\x05 \x01(\x0e2..authzed.api.v1.CheckDebugTrace.PermissionshipB\x14\xfaB\a\x82\x01\x04\x10\x01 \x00\xbaH\a\x82\x01\x04\x10\x01 \x00R\x06result\x12T\n" +
+ "\x16caveat_evaluation_info\x18\b \x01(\v2\x1e.authzed.api.v1.CaveatEvalInfoR\x14caveatEvaluationInfo\x125\n" +
+ "\bduration\x18\t \x01(\v2\x19.google.protobuf.DurationR\bduration\x12,\n" +
+ "\x11was_cached_result\x18\x06 \x01(\bH\x00R\x0fwasCachedResult\x12P\n" +
+ "\fsub_problems\x18\a \x01(\v2+.authzed.api.v1.CheckDebugTrace.SubProblemsH\x00R\vsubProblems\x12J\n" +
+ "\x13optional_expires_at\x18\n" +
+ " \x01(\v2\x1a.google.protobuf.TimestampR\x11optionalExpiresAt\x12,\n" +
+ "\x12trace_operation_id\x18\v \x01(\tR\x10traceOperationId\x12\x16\n" +
+ "\x06source\x18\f \x01(\tR\x06source\x1aF\n" +
+ "\vSubProblems\x127\n" +
+ "\x06traces\x18\x01 \x03(\v2\x1f.authzed.api.v1.CheckDebugTraceR\x06traces\"o\n" +
+ "\x0ePermissionType\x12\x1f\n" +
+ "\x1bPERMISSION_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n" +
+ "\x18PERMISSION_TYPE_RELATION\x10\x01\x12\x1e\n" +
+ "\x1aPERMISSION_TYPE_PERMISSION\x10\x02\"\xa0\x01\n" +
+ "\x0ePermissionship\x12\x1e\n" +
+ "\x1aPERMISSIONSHIP_UNSPECIFIED\x10\x00\x12 \n" +
+ "\x1cPERMISSIONSHIP_NO_PERMISSION\x10\x01\x12!\n" +
+ "\x1dPERMISSIONSHIP_HAS_PERMISSION\x10\x02\x12)\n" +
+ "%PERMISSIONSHIP_CONDITIONAL_PERMISSION\x10\x03B\x16\n" +
+ "\n" +
+ "resolution\x12\b\xf8B\x01\xbaH\x02\b\x01\"\x94\x03\n" +
+ "\x0eCaveatEvalInfo\x12\x1e\n" +
+ "\n" +
+ "expression\x18\x01 \x01(\tR\n" +
+ "expression\x12=\n" +
+ "\x06result\x18\x02 \x01(\x0e2%.authzed.api.v1.CaveatEvalInfo.ResultR\x06result\x121\n" +
+ "\acontext\x18\x03 \x01(\v2\x17.google.protobuf.StructR\acontext\x12Q\n" +
+ "\x13partial_caveat_info\x18\x04 \x01(\v2!.authzed.api.v1.PartialCaveatInfoR\x11partialCaveatInfo\x12\x1f\n" +
+ "\vcaveat_name\x18\x05 \x01(\tR\n" +
+ "caveatName\"|\n" +
+ "\x06Result\x12\x16\n" +
+ "\x12RESULT_UNSPECIFIED\x10\x00\x12\x16\n" +
+ "\x12RESULT_UNEVALUATED\x10\x01\x12\x10\n" +
+ "\fRESULT_FALSE\x10\x02\x12\x0f\n" +
+ "\vRESULT_TRUE\x10\x03\x12\x1f\n" +
+ "\x1bRESULT_MISSING_SOME_CONTEXT\x10\x04BJ\n" +
+ "\x12com.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
+
+var (
+ file_authzed_api_v1_debug_proto_rawDescOnce sync.Once
+ file_authzed_api_v1_debug_proto_rawDescData []byte
+)
+
+func file_authzed_api_v1_debug_proto_rawDescGZIP() []byte {
+ file_authzed_api_v1_debug_proto_rawDescOnce.Do(func() {
+ file_authzed_api_v1_debug_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authzed_api_v1_debug_proto_rawDesc), len(file_authzed_api_v1_debug_proto_rawDesc)))
+ })
+ return file_authzed_api_v1_debug_proto_rawDescData
+}
+
+var file_authzed_api_v1_debug_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
+var file_authzed_api_v1_debug_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_authzed_api_v1_debug_proto_goTypes = []any{
+ (CheckDebugTrace_PermissionType)(0), // 0: authzed.api.v1.CheckDebugTrace.PermissionType
+ (CheckDebugTrace_Permissionship)(0), // 1: authzed.api.v1.CheckDebugTrace.Permissionship
+ (CaveatEvalInfo_Result)(0), // 2: authzed.api.v1.CaveatEvalInfo.Result
+ (*DebugInformation)(nil), // 3: authzed.api.v1.DebugInformation
+ (*CheckDebugTrace)(nil), // 4: authzed.api.v1.CheckDebugTrace
+ (*CaveatEvalInfo)(nil), // 5: authzed.api.v1.CaveatEvalInfo
+ (*CheckDebugTrace_SubProblems)(nil), // 6: authzed.api.v1.CheckDebugTrace.SubProblems
+ (*ObjectReference)(nil), // 7: authzed.api.v1.ObjectReference
+ (*SubjectReference)(nil), // 8: authzed.api.v1.SubjectReference
+ (*durationpb.Duration)(nil), // 9: google.protobuf.Duration
+ (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp
+ (*structpb.Struct)(nil), // 11: google.protobuf.Struct
+ (*PartialCaveatInfo)(nil), // 12: authzed.api.v1.PartialCaveatInfo
+}
+var file_authzed_api_v1_debug_proto_depIdxs = []int32{
+ 4, // 0: authzed.api.v1.DebugInformation.check:type_name -> authzed.api.v1.CheckDebugTrace
+ 7, // 1: authzed.api.v1.CheckDebugTrace.resource:type_name -> authzed.api.v1.ObjectReference
+ 0, // 2: authzed.api.v1.CheckDebugTrace.permission_type:type_name -> authzed.api.v1.CheckDebugTrace.PermissionType
+ 8, // 3: authzed.api.v1.CheckDebugTrace.subject:type_name -> authzed.api.v1.SubjectReference
+ 1, // 4: authzed.api.v1.CheckDebugTrace.result:type_name -> authzed.api.v1.CheckDebugTrace.Permissionship
+ 5, // 5: authzed.api.v1.CheckDebugTrace.caveat_evaluation_info:type_name -> authzed.api.v1.CaveatEvalInfo
+ 9, // 6: authzed.api.v1.CheckDebugTrace.duration:type_name -> google.protobuf.Duration
+ 6, // 7: authzed.api.v1.CheckDebugTrace.sub_problems:type_name -> authzed.api.v1.CheckDebugTrace.SubProblems
+ 10, // 8: authzed.api.v1.CheckDebugTrace.optional_expires_at:type_name -> google.protobuf.Timestamp
+ 2, // 9: authzed.api.v1.CaveatEvalInfo.result:type_name -> authzed.api.v1.CaveatEvalInfo.Result
+ 11, // 10: authzed.api.v1.CaveatEvalInfo.context:type_name -> google.protobuf.Struct
+ 12, // 11: authzed.api.v1.CaveatEvalInfo.partial_caveat_info:type_name -> authzed.api.v1.PartialCaveatInfo
+ 4, // 12: authzed.api.v1.CheckDebugTrace.SubProblems.traces:type_name -> authzed.api.v1.CheckDebugTrace
+ 13, // [13:13] is the sub-list for method output_type
+ 13, // [13:13] is the sub-list for method input_type
+ 13, // [13:13] is the sub-list for extension type_name
+ 13, // [13:13] is the sub-list for extension extendee
+ 0, // [0:13] is the sub-list for field type_name
+}
+
+func init() { file_authzed_api_v1_debug_proto_init() }
+func file_authzed_api_v1_debug_proto_init() {
+ if File_authzed_api_v1_debug_proto != nil {
+ return
+ }
+ file_authzed_api_v1_core_proto_init()
+ file_authzed_api_v1_debug_proto_msgTypes[1].OneofWrappers = []any{
+ (*CheckDebugTrace_WasCachedResult)(nil),
+ (*CheckDebugTrace_SubProblems_)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_authzed_api_v1_debug_proto_rawDesc), len(file_authzed_api_v1_debug_proto_rawDesc)),
+ NumEnums: 3,
+ NumMessages: 4,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_authzed_api_v1_debug_proto_goTypes,
+ DependencyIndexes: file_authzed_api_v1_debug_proto_depIdxs,
+ EnumInfos: file_authzed_api_v1_debug_proto_enumTypes,
+ MessageInfos: file_authzed_api_v1_debug_proto_msgTypes,
+ }.Build()
+ File_authzed_api_v1_debug_proto = out.File
+ file_authzed_api_v1_debug_proto_goTypes = nil
+ file_authzed_api_v1_debug_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/debug.pb.validate.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/debug.pb.validate.go
new file mode 100644
index 0000000..4148f2b
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/debug.pb.validate.go
@@ -0,0 +1,864 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: authzed/api/v1/debug.proto
+
+package v1
+
+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 DebugInformation 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 *DebugInformation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DebugInformation 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
+// DebugInformationMultiError, or nil if none found.
+func (m *DebugInformation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DebugInformation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetCheck()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DebugInformationValidationError{
+ field: "Check",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DebugInformationValidationError{
+ field: "Check",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCheck()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DebugInformationValidationError{
+ field: "Check",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for SchemaUsed
+
+ if len(errors) > 0 {
+ return DebugInformationMultiError(errors)
+ }
+
+ return nil
+}
+
+// DebugInformationMultiError is an error wrapping multiple validation errors
+// returned by DebugInformation.ValidateAll() if the designated constraints
+// aren't met.
+type DebugInformationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DebugInformationMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DebugInformationMultiError) AllErrors() []error { return m }
+
+// DebugInformationValidationError is the validation error returned by
+// DebugInformation.Validate if the designated constraints aren't met.
+type DebugInformationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DebugInformationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DebugInformationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DebugInformationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DebugInformationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DebugInformationValidationError) ErrorName() string { return "DebugInformationValidationError" }
+
+// Error satisfies the builtin error interface
+func (e DebugInformationValidationError) 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 %sDebugInformation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DebugInformationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DebugInformationValidationError{}
+
+// Validate checks the field values on CheckDebugTrace 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 *CheckDebugTrace) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CheckDebugTrace 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
+// CheckDebugTraceMultiError, or nil if none found.
+func (m *CheckDebugTrace) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CheckDebugTrace) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetResource() == nil {
+ err := CheckDebugTraceValidationError{
+ field: "Resource",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetResource()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckDebugTraceValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckDebugTraceValidationError{
+ 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 CheckDebugTraceValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Permission
+
+ if _, ok := _CheckDebugTrace_PermissionType_NotInLookup[m.GetPermissionType()]; ok {
+ err := CheckDebugTraceValidationError{
+ field: "PermissionType",
+ reason: "value must not be in list [PERMISSION_TYPE_UNSPECIFIED]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if _, ok := CheckDebugTrace_PermissionType_name[int32(m.GetPermissionType())]; !ok {
+ err := CheckDebugTraceValidationError{
+ field: "PermissionType",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if m.GetSubject() == nil {
+ err := CheckDebugTraceValidationError{
+ field: "Subject",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetSubject()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckDebugTraceValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckDebugTraceValidationError{
+ 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 CheckDebugTraceValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if _, ok := _CheckDebugTrace_Result_NotInLookup[m.GetResult()]; ok {
+ err := CheckDebugTraceValidationError{
+ field: "Result",
+ reason: "value must not be in list [PERMISSIONSHIP_UNSPECIFIED]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if _, ok := CheckDebugTrace_Permissionship_name[int32(m.GetResult())]; !ok {
+ err := CheckDebugTraceValidationError{
+ field: "Result",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCaveatEvaluationInfo()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckDebugTraceValidationError{
+ field: "CaveatEvaluationInfo",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckDebugTraceValidationError{
+ field: "CaveatEvaluationInfo",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCaveatEvaluationInfo()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CheckDebugTraceValidationError{
+ field: "CaveatEvaluationInfo",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetDuration()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckDebugTraceValidationError{
+ field: "Duration",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckDebugTraceValidationError{
+ field: "Duration",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetDuration()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CheckDebugTraceValidationError{
+ field: "Duration",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetOptionalExpiresAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckDebugTraceValidationError{
+ field: "OptionalExpiresAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckDebugTraceValidationError{
+ field: "OptionalExpiresAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalExpiresAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CheckDebugTraceValidationError{
+ field: "OptionalExpiresAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for TraceOperationId
+
+ // no validation rules for Source
+
+ oneofResolutionPresent := false
+ switch v := m.Resolution.(type) {
+ case *CheckDebugTrace_WasCachedResult:
+ if v == nil {
+ err := CheckDebugTraceValidationError{
+ field: "Resolution",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofResolutionPresent = true
+ // no validation rules for WasCachedResult
+ case *CheckDebugTrace_SubProblems_:
+ if v == nil {
+ err := CheckDebugTraceValidationError{
+ field: "Resolution",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofResolutionPresent = true
+
+ if all {
+ switch v := interface{}(m.GetSubProblems()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckDebugTraceValidationError{
+ field: "SubProblems",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckDebugTraceValidationError{
+ field: "SubProblems",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSubProblems()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CheckDebugTraceValidationError{
+ field: "SubProblems",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofResolutionPresent {
+ err := CheckDebugTraceValidationError{
+ field: "Resolution",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return CheckDebugTraceMultiError(errors)
+ }
+
+ return nil
+}
+
+// CheckDebugTraceMultiError is an error wrapping multiple validation errors
+// returned by CheckDebugTrace.ValidateAll() if the designated constraints
+// aren't met.
+type CheckDebugTraceMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CheckDebugTraceMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CheckDebugTraceMultiError) AllErrors() []error { return m }
+
+// CheckDebugTraceValidationError is the validation error returned by
+// CheckDebugTrace.Validate if the designated constraints aren't met.
+type CheckDebugTraceValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CheckDebugTraceValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CheckDebugTraceValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CheckDebugTraceValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CheckDebugTraceValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CheckDebugTraceValidationError) ErrorName() string { return "CheckDebugTraceValidationError" }
+
+// Error satisfies the builtin error interface
+func (e CheckDebugTraceValidationError) 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 %sCheckDebugTrace.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CheckDebugTraceValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CheckDebugTraceValidationError{}
+
+var _CheckDebugTrace_PermissionType_NotInLookup = map[CheckDebugTrace_PermissionType]struct{}{
+ 0: {},
+}
+
+var _CheckDebugTrace_Result_NotInLookup = map[CheckDebugTrace_Permissionship]struct{}{
+ 0: {},
+}
+
+// Validate checks the field values on CaveatEvalInfo 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 *CaveatEvalInfo) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CaveatEvalInfo 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 CaveatEvalInfoMultiError,
+// or nil if none found.
+func (m *CaveatEvalInfo) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CaveatEvalInfo) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Expression
+
+ // no validation rules for Result
+
+ if all {
+ switch v := interface{}(m.GetContext()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CaveatEvalInfoValidationError{
+ field: "Context",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CaveatEvalInfoValidationError{
+ 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 CaveatEvalInfoValidationError{
+ field: "Context",
+ 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, CaveatEvalInfoValidationError{
+ field: "PartialCaveatInfo",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CaveatEvalInfoValidationError{
+ 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 CaveatEvalInfoValidationError{
+ field: "PartialCaveatInfo",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for CaveatName
+
+ if len(errors) > 0 {
+ return CaveatEvalInfoMultiError(errors)
+ }
+
+ return nil
+}
+
+// CaveatEvalInfoMultiError is an error wrapping multiple validation errors
+// returned by CaveatEvalInfo.ValidateAll() if the designated constraints
+// aren't met.
+type CaveatEvalInfoMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CaveatEvalInfoMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CaveatEvalInfoMultiError) AllErrors() []error { return m }
+
+// CaveatEvalInfoValidationError is the validation error returned by
+// CaveatEvalInfo.Validate if the designated constraints aren't met.
+type CaveatEvalInfoValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CaveatEvalInfoValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CaveatEvalInfoValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CaveatEvalInfoValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CaveatEvalInfoValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CaveatEvalInfoValidationError) ErrorName() string { return "CaveatEvalInfoValidationError" }
+
+// Error satisfies the builtin error interface
+func (e CaveatEvalInfoValidationError) 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 %sCaveatEvalInfo.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CaveatEvalInfoValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CaveatEvalInfoValidationError{}
+
+// Validate checks the field values on CheckDebugTrace_SubProblems 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 *CheckDebugTrace_SubProblems) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CheckDebugTrace_SubProblems 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
+// CheckDebugTrace_SubProblemsMultiError, or nil if none found.
+func (m *CheckDebugTrace_SubProblems) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CheckDebugTrace_SubProblems) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetTraces() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckDebugTrace_SubProblemsValidationError{
+ field: fmt.Sprintf("Traces[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckDebugTrace_SubProblemsValidationError{
+ field: fmt.Sprintf("Traces[%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 CheckDebugTrace_SubProblemsValidationError{
+ field: fmt.Sprintf("Traces[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return CheckDebugTrace_SubProblemsMultiError(errors)
+ }
+
+ return nil
+}
+
+// CheckDebugTrace_SubProblemsMultiError is an error wrapping multiple
+// validation errors returned by CheckDebugTrace_SubProblems.ValidateAll() if
+// the designated constraints aren't met.
+type CheckDebugTrace_SubProblemsMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CheckDebugTrace_SubProblemsMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CheckDebugTrace_SubProblemsMultiError) AllErrors() []error { return m }
+
+// CheckDebugTrace_SubProblemsValidationError is the validation error returned
+// by CheckDebugTrace_SubProblems.Validate if the designated constraints
+// aren't met.
+type CheckDebugTrace_SubProblemsValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CheckDebugTrace_SubProblemsValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CheckDebugTrace_SubProblemsValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CheckDebugTrace_SubProblemsValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CheckDebugTrace_SubProblemsValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CheckDebugTrace_SubProblemsValidationError) ErrorName() string {
+ return "CheckDebugTrace_SubProblemsValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CheckDebugTrace_SubProblemsValidationError) 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 %sCheckDebugTrace_SubProblems.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CheckDebugTrace_SubProblemsValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CheckDebugTrace_SubProblemsValidationError{}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/debug_vtproto.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/debug_vtproto.pb.go
new file mode 100644
index 0000000..358d465
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/debug_vtproto.pb.go
@@ -0,0 +1,1628 @@
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// protoc-gen-go-vtproto version: v0.6.1-0.20240319094008-0393e58bdf10
+// source: authzed/api/v1/debug.proto
+
+package v1
+
+import (
+ fmt "fmt"
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ durationpb1 "github.com/planetscale/vtprotobuf/types/known/durationpb"
+ structpb1 "github.com/planetscale/vtprotobuf/types/known/structpb"
+ timestamppb1 "github.com/planetscale/vtprotobuf/types/known/timestamppb"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ io "io"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *DebugInformation) CloneVT() *DebugInformation {
+ if m == nil {
+ return (*DebugInformation)(nil)
+ }
+ r := new(DebugInformation)
+ r.Check = m.Check.CloneVT()
+ r.SchemaUsed = m.SchemaUsed
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *DebugInformation) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *CheckDebugTrace_SubProblems) CloneVT() *CheckDebugTrace_SubProblems {
+ if m == nil {
+ return (*CheckDebugTrace_SubProblems)(nil)
+ }
+ r := new(CheckDebugTrace_SubProblems)
+ if rhs := m.Traces; rhs != nil {
+ tmpContainer := make([]*CheckDebugTrace, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Traces = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *CheckDebugTrace_SubProblems) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *CheckDebugTrace) CloneVT() *CheckDebugTrace {
+ if m == nil {
+ return (*CheckDebugTrace)(nil)
+ }
+ r := new(CheckDebugTrace)
+ r.Resource = m.Resource.CloneVT()
+ r.Permission = m.Permission
+ r.PermissionType = m.PermissionType
+ r.Subject = m.Subject.CloneVT()
+ r.Result = m.Result
+ r.CaveatEvaluationInfo = m.CaveatEvaluationInfo.CloneVT()
+ r.Duration = (*durationpb.Duration)((*durationpb1.Duration)(m.Duration).CloneVT())
+ r.OptionalExpiresAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.OptionalExpiresAt).CloneVT())
+ r.TraceOperationId = m.TraceOperationId
+ r.Source = m.Source
+ if m.Resolution != nil {
+ r.Resolution = m.Resolution.(interface {
+ CloneVT() isCheckDebugTrace_Resolution
+ }).CloneVT()
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *CheckDebugTrace) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *CheckDebugTrace_WasCachedResult) CloneVT() isCheckDebugTrace_Resolution {
+ if m == nil {
+ return (*CheckDebugTrace_WasCachedResult)(nil)
+ }
+ r := new(CheckDebugTrace_WasCachedResult)
+ r.WasCachedResult = m.WasCachedResult
+ return r
+}
+
+func (m *CheckDebugTrace_SubProblems_) CloneVT() isCheckDebugTrace_Resolution {
+ if m == nil {
+ return (*CheckDebugTrace_SubProblems_)(nil)
+ }
+ r := new(CheckDebugTrace_SubProblems_)
+ r.SubProblems = m.SubProblems.CloneVT()
+ return r
+}
+
+func (m *CaveatEvalInfo) CloneVT() *CaveatEvalInfo {
+ if m == nil {
+ return (*CaveatEvalInfo)(nil)
+ }
+ r := new(CaveatEvalInfo)
+ r.Expression = m.Expression
+ r.Result = m.Result
+ r.Context = (*structpb.Struct)((*structpb1.Struct)(m.Context).CloneVT())
+ r.PartialCaveatInfo = m.PartialCaveatInfo.CloneVT()
+ r.CaveatName = m.CaveatName
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *CaveatEvalInfo) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (this *DebugInformation) EqualVT(that *DebugInformation) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Check.EqualVT(that.Check) {
+ return false
+ }
+ if this.SchemaUsed != that.SchemaUsed {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *DebugInformation) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*DebugInformation)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *CheckDebugTrace_SubProblems) EqualVT(that *CheckDebugTrace_SubProblems) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if len(this.Traces) != len(that.Traces) {
+ return false
+ }
+ for i, vx := range this.Traces {
+ vy := that.Traces[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &CheckDebugTrace{}
+ }
+ if q == nil {
+ q = &CheckDebugTrace{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *CheckDebugTrace_SubProblems) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*CheckDebugTrace_SubProblems)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *CheckDebugTrace) EqualVT(that *CheckDebugTrace) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Resolution == nil && that.Resolution != nil {
+ return false
+ } else if this.Resolution != nil {
+ if that.Resolution == nil {
+ return false
+ }
+ if !this.Resolution.(interface {
+ EqualVT(isCheckDebugTrace_Resolution) bool
+ }).EqualVT(that.Resolution) {
+ return false
+ }
+ }
+ if !this.Resource.EqualVT(that.Resource) {
+ return false
+ }
+ if this.Permission != that.Permission {
+ return false
+ }
+ if this.PermissionType != that.PermissionType {
+ return false
+ }
+ if !this.Subject.EqualVT(that.Subject) {
+ return false
+ }
+ if this.Result != that.Result {
+ return false
+ }
+ if !this.CaveatEvaluationInfo.EqualVT(that.CaveatEvaluationInfo) {
+ return false
+ }
+ if !(*durationpb1.Duration)(this.Duration).EqualVT((*durationpb1.Duration)(that.Duration)) {
+ return false
+ }
+ if !(*timestamppb1.Timestamp)(this.OptionalExpiresAt).EqualVT((*timestamppb1.Timestamp)(that.OptionalExpiresAt)) {
+ return false
+ }
+ if this.TraceOperationId != that.TraceOperationId {
+ return false
+ }
+ if this.Source != that.Source {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *CheckDebugTrace) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*CheckDebugTrace)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *CheckDebugTrace_WasCachedResult) EqualVT(thatIface isCheckDebugTrace_Resolution) bool {
+ that, ok := thatIface.(*CheckDebugTrace_WasCachedResult)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if this.WasCachedResult != that.WasCachedResult {
+ return false
+ }
+ return true
+}
+
+func (this *CheckDebugTrace_SubProblems_) EqualVT(thatIface isCheckDebugTrace_Resolution) bool {
+ that, ok := thatIface.(*CheckDebugTrace_SubProblems_)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.SubProblems, that.SubProblems; p != q {
+ if p == nil {
+ p = &CheckDebugTrace_SubProblems{}
+ }
+ if q == nil {
+ q = &CheckDebugTrace_SubProblems{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *CaveatEvalInfo) EqualVT(that *CaveatEvalInfo) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Expression != that.Expression {
+ return false
+ }
+ if this.Result != that.Result {
+ return false
+ }
+ if !(*structpb1.Struct)(this.Context).EqualVT((*structpb1.Struct)(that.Context)) {
+ return false
+ }
+ if !this.PartialCaveatInfo.EqualVT(that.PartialCaveatInfo) {
+ return false
+ }
+ if this.CaveatName != that.CaveatName {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *CaveatEvalInfo) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*CaveatEvalInfo)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (m *DebugInformation) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DebugInformation) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *DebugInformation) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.SchemaUsed) > 0 {
+ i -= len(m.SchemaUsed)
+ copy(dAtA[i:], m.SchemaUsed)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SchemaUsed)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Check != nil {
+ size, err := m.Check.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CheckDebugTrace_SubProblems) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CheckDebugTrace_SubProblems) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *CheckDebugTrace_SubProblems) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Traces) > 0 {
+ for iNdEx := len(m.Traces) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Traces[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CheckDebugTrace) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CheckDebugTrace) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *CheckDebugTrace) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if vtmsg, ok := m.Resolution.(interface {
+ MarshalToSizedBufferVT([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if len(m.Source) > 0 {
+ i -= len(m.Source)
+ copy(dAtA[i:], m.Source)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Source)))
+ i--
+ dAtA[i] = 0x62
+ }
+ if len(m.TraceOperationId) > 0 {
+ i -= len(m.TraceOperationId)
+ copy(dAtA[i:], m.TraceOperationId)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TraceOperationId)))
+ i--
+ dAtA[i] = 0x5a
+ }
+ if m.OptionalExpiresAt != nil {
+ size, err := (*timestamppb1.Timestamp)(m.OptionalExpiresAt).MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x52
+ }
+ if m.Duration != nil {
+ size, err := (*durationpb1.Duration)(m.Duration).MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x4a
+ }
+ if m.CaveatEvaluationInfo != nil {
+ size, err := m.CaveatEvaluationInfo.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x42
+ }
+ if m.Result != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Result))
+ i--
+ dAtA[i] = 0x28
+ }
+ if m.Subject != nil {
+ size, err := m.Subject.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.PermissionType != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PermissionType))
+ i--
+ dAtA[i] = 0x18
+ }
+ if len(m.Permission) > 0 {
+ i -= len(m.Permission)
+ copy(dAtA[i:], m.Permission)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Permission)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Resource != nil {
+ size, err := m.Resource.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CheckDebugTrace_WasCachedResult) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *CheckDebugTrace_WasCachedResult) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i--
+ if m.WasCachedResult {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x30
+ return len(dAtA) - i, nil
+}
+func (m *CheckDebugTrace_SubProblems_) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *CheckDebugTrace_SubProblems_) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.SubProblems != nil {
+ size, err := m.SubProblems.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x3a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x3a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *CaveatEvalInfo) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CaveatEvalInfo) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *CaveatEvalInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.CaveatName) > 0 {
+ i -= len(m.CaveatName)
+ copy(dAtA[i:], m.CaveatName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CaveatName)))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.PartialCaveatInfo != nil {
+ size, err := m.PartialCaveatInfo.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.Context != nil {
+ size, err := (*structpb1.Struct)(m.Context).MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Result != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Result))
+ i--
+ dAtA[i] = 0x10
+ }
+ if len(m.Expression) > 0 {
+ i -= len(m.Expression)
+ copy(dAtA[i:], m.Expression)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Expression)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DebugInformation) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Check != nil {
+ l = m.Check.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.SchemaUsed)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CheckDebugTrace_SubProblems) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Traces) > 0 {
+ for _, e := range m.Traces {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CheckDebugTrace) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Resource != nil {
+ l = m.Resource.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Permission)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.PermissionType != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.PermissionType))
+ }
+ if m.Subject != nil {
+ l = m.Subject.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Result != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Result))
+ }
+ if vtmsg, ok := m.Resolution.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ if m.CaveatEvaluationInfo != nil {
+ l = m.CaveatEvaluationInfo.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Duration != nil {
+ l = (*durationpb1.Duration)(m.Duration).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OptionalExpiresAt != nil {
+ l = (*timestamppb1.Timestamp)(m.OptionalExpiresAt).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.TraceOperationId)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Source)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CheckDebugTrace_WasCachedResult) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += 2
+ return n
+}
+func (m *CheckDebugTrace_SubProblems_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.SubProblems != nil {
+ l = m.SubProblems.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *CaveatEvalInfo) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Expression)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Result != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Result))
+ }
+ if m.Context != nil {
+ l = (*structpb1.Struct)(m.Context).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.PartialCaveatInfo != nil {
+ l = m.PartialCaveatInfo.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.CaveatName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DebugInformation) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DebugInformation: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DebugInformation: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Check", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Check == nil {
+ m.Check = &CheckDebugTrace{}
+ }
+ if err := m.Check.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SchemaUsed", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SchemaUsed = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CheckDebugTrace_SubProblems) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CheckDebugTrace_SubProblems: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CheckDebugTrace_SubProblems: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Traces", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Traces = append(m.Traces, &CheckDebugTrace{})
+ if err := m.Traces[len(m.Traces)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CheckDebugTrace) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CheckDebugTrace: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CheckDebugTrace: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resource == nil {
+ m.Resource = &ObjectReference{}
+ }
+ if err := m.Resource.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Permission = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PermissionType", wireType)
+ }
+ m.PermissionType = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.PermissionType |= CheckDebugTrace_PermissionType(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Subject == nil {
+ m.Subject = &SubjectReference{}
+ }
+ if err := m.Subject.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
+ }
+ m.Result = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Result |= CheckDebugTrace_Permissionship(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field WasCachedResult", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Resolution = &CheckDebugTrace_WasCachedResult{WasCachedResult: b}
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SubProblems", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Resolution.(*CheckDebugTrace_SubProblems_); ok {
+ if err := oneof.SubProblems.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &CheckDebugTrace_SubProblems{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Resolution = &CheckDebugTrace_SubProblems_{SubProblems: v}
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatEvaluationInfo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.CaveatEvaluationInfo == nil {
+ m.CaveatEvaluationInfo = &CaveatEvalInfo{}
+ }
+ if err := m.CaveatEvaluationInfo.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Duration == nil {
+ m.Duration = &durationpb.Duration{}
+ }
+ if err := (*durationpb1.Duration)(m.Duration).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalExpiresAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalExpiresAt == nil {
+ m.OptionalExpiresAt = &timestamppb.Timestamp{}
+ }
+ if err := (*timestamppb1.Timestamp)(m.OptionalExpiresAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TraceOperationId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TraceOperationId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 12:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Source = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CaveatEvalInfo) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CaveatEvalInfo: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CaveatEvalInfo: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Expression = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType)
+ }
+ m.Result = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Result |= CaveatEvalInfo_Result(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Context == nil {
+ m.Context = &structpb.Struct{}
+ }
+ if err := (*structpb1.Struct)(m.Context).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PartialCaveatInfo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PartialCaveatInfo == nil {
+ m.PartialCaveatInfo = &PartialCaveatInfo{}
+ }
+ if err := m.PartialCaveatInfo.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CaveatName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/error_reason.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/error_reason.pb.go
new file mode 100644
index 0000000..2058d44
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/error_reason.pb.go
@@ -0,0 +1,588 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.6
+// protoc (unknown)
+// source: authzed/api/v1/error_reason.proto
+
+package v1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Defines the supported values for `google.rpc.ErrorInfo.reason` for the
+// `authzed.com` error domain.
+type ErrorReason int32
+
+const (
+ // Do not use this default value.
+ ErrorReason_ERROR_REASON_UNSPECIFIED ErrorReason = 0
+ // The request gave a schema that could not be parsed.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_SCHEMA_PARSE_ERROR",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "start_line_number": "1",
+ // "start_column_position": "19",
+ // "end_line_number": "1",
+ // "end_column_position": "19",
+ // "source_code": "somedefinition",
+ // }
+ // }
+ //
+ // The line numbers and column positions are 0-indexed and may not be present.
+ ErrorReason_ERROR_REASON_SCHEMA_PARSE_ERROR ErrorReason = 1
+ // The request contains a schema with a type error.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_SCHEMA_TYPE_ERROR",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "definition_name": "somedefinition",
+ // ... additional keys based on the kind of type error ...
+ // }
+ // }
+ ErrorReason_ERROR_REASON_SCHEMA_TYPE_ERROR ErrorReason = 2
+ // The request referenced an unknown object definition in the schema.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_UNKNOWN_DEFINITION",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "definition_name": "somedefinition"
+ // }
+ // }
+ ErrorReason_ERROR_REASON_UNKNOWN_DEFINITION ErrorReason = 3
+ // The request referenced an unknown relation or permission under a definition in the schema.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_UNKNOWN_RELATION_OR_PERMISSION",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "definition_name": "somedefinition",
+ // "relation_or_permission_name": "somepermission"
+ // }
+ // }
+ ErrorReason_ERROR_REASON_UNKNOWN_RELATION_OR_PERMISSION ErrorReason = 4
+ // The WriteRelationships request contained more updates than the maximum configured.
+ //
+ // Example of an ErrorInfo:
+ //
+ // { "reason": "ERROR_REASON_TOO_MANY_UPDATES_IN_REQUEST",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "update_count": "525",
+ // "maximum_updates_allowed": "500",
+ // }
+ // }
+ ErrorReason_ERROR_REASON_TOO_MANY_UPDATES_IN_REQUEST ErrorReason = 5
+ // The request contained more preconditions than the maximum configured.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_TOO_MANY_PRECONDITIONS_IN_REQUEST",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "precondition_count": "525",
+ // "maximum_preconditions_allowed": "500",
+ // }
+ // }
+ ErrorReason_ERROR_REASON_TOO_MANY_PRECONDITIONS_IN_REQUEST ErrorReason = 6
+ // The request contained a precondition that failed.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_WRITE_OR_DELETE_PRECONDITION_FAILURE",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "precondition_resource_type": "document",
+ // ... other fields for the filter ...
+ // "precondition_operation": "MUST_EXIST",
+ // }
+ // }
+ ErrorReason_ERROR_REASON_WRITE_OR_DELETE_PRECONDITION_FAILURE ErrorReason = 7
+ // A write or delete request was made to an instance that is deployed in read-only mode.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_SERVICE_READ_ONLY",
+ // "domain": "authzed.com"
+ // }
+ ErrorReason_ERROR_REASON_SERVICE_READ_ONLY ErrorReason = 8
+ // The request referenced an unknown caveat in the schema.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_UNKNOWN_CAVEAT",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "caveat_name": "somecaveat"
+ // }
+ // }
+ ErrorReason_ERROR_REASON_UNKNOWN_CAVEAT ErrorReason = 9
+ // The request tries to use a subject type that was not valid for a relation.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_INVALID_SUBJECT_TYPE",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "definition_name": "somedefinition",
+ // "relation_name": "somerelation",
+ // "subject_type": "user:*"
+ // }
+ // }
+ ErrorReason_ERROR_REASON_INVALID_SUBJECT_TYPE ErrorReason = 10
+ // The request tries to specify a caveat parameter value with the wrong type.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_CAVEAT_PARAMETER_TYPE_ERROR",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "definition_name": "somedefinition",
+ // "relation_name": "somerelation",
+ // "caveat_name": "somecaveat",
+ // "parameter_name": "someparameter",
+ // "expected_type": "int",
+ // }
+ // }
+ ErrorReason_ERROR_REASON_CAVEAT_PARAMETER_TYPE_ERROR ErrorReason = 11
+ // The request tries to perform two or more updates on the same relationship in the same WriteRelationships call.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_UPDATES_ON_SAME_RELATIONSHIP",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "definition_name": "somedefinition",
+ // "relationship": "somerelationship",
+ // }
+ // }
+ ErrorReason_ERROR_REASON_UPDATES_ON_SAME_RELATIONSHIP ErrorReason = 12
+ // The request tries to write a relationship on a permission instead of a relation.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_CANNOT_UPDATE_PERMISSION",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "definition_name": "somedefinition",
+ // "permission_name": "somerelation",
+ // }
+ // }
+ ErrorReason_ERROR_REASON_CANNOT_UPDATE_PERMISSION ErrorReason = 13
+ // The request failed to evaluate a caveat expression due to an error.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_CAVEAT_EVALUATION_ERROR",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "caveat_name": "somecaveat",
+ // }
+ // }
+ ErrorReason_ERROR_REASON_CAVEAT_EVALUATION_ERROR ErrorReason = 14
+ // The request failed because the provided cursor was invalid in some way.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_INVALID_CURSOR",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // ... additional keys based on the kind of cursor error ...
+ // }
+ // }
+ ErrorReason_ERROR_REASON_INVALID_CURSOR ErrorReason = 15
+ // The request failed because there are too many matching relationships to be
+ // deleted within a single transactional deletion call. To avoid, set
+ // `optional_allow_partial_deletions` to true on the DeleteRelationships call.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_TOO_MANY_RELATIONSHIPS_FOR_TRANSACTIONAL_DELETE",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // ... fields for the filter ...
+ // }
+ // }
+ ErrorReason_ERROR_REASON_TOO_MANY_RELATIONSHIPS_FOR_TRANSACTIONAL_DELETE ErrorReason = 16
+ // The request failed because the client attempted to write a relationship
+ // with a context that exceeded the configured server limit.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_MAX_RELATIONSHIP_CONTEXT_SIZE",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "relationship": "relationship_exceeding_the_limit",
+ // "max_allowed_size": "server_max_allowed_context_size",
+ // "context_size": "actual_relationship_context_size" ,
+ // }
+ // }
+ ErrorReason_ERROR_REASON_MAX_RELATIONSHIP_CONTEXT_SIZE ErrorReason = 17
+ // The request failed because a relationship marked to be CREATEd
+ // was already present within the datastore.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_ATTEMPT_TO_RECREATE_RELATIONSHIP",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "relationship": "relationship_that_already_existed",
+ // "resource_type": "resource type",
+ // "resource_object_id": "resource object id",
+ // ... additional decomposed relationship fields ...
+ // }
+ // }
+ ErrorReason_ERROR_REASON_ATTEMPT_TO_RECREATE_RELATIONSHIP ErrorReason = 18
+ // The request failed because it caused the maximum depth allowed to be
+ // exceeded. This typically indicates that there is a circular data traversal
+ // somewhere in the schema, but can also be raised if the data traversal is simply
+ // too deep.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_MAXIMUM_DEPTH_EXCEEDED",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "maximum_depth_allowed": "50",
+ // ... additional fields based on request type ...
+ // }
+ // }
+ ErrorReason_ERROR_REASON_MAXIMUM_DEPTH_EXCEEDED ErrorReason = 19
+ // The request failed due to a serialization error in the backend database.
+ // This typically indicates that various in flight transactions conflicted with each other
+ // and the database had to abort one or more of them. SpiceDB will retry a few times before returning
+ // the error to the client.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_SERIALIZATION_FAILURE",
+ // "domain": "authzed.com",
+ // "metadata": {}
+ // }
+ ErrorReason_ERROR_REASON_SERIALIZATION_FAILURE ErrorReason = 20
+ // The request contained more check items than the maximum configured.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_TOO_MANY_CHECKS_IN_REQUEST",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "check_count": "525",
+ // "maximum_checks_allowed": "500",
+ // }
+ // }
+ ErrorReason_ERROR_REASON_TOO_MANY_CHECKS_IN_REQUEST ErrorReason = 21
+ // The request's specified limit is too large.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_EXCEEDS_MAXIMUM_ALLOWABLE_LIMIT",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "limit_provided": "525",
+ // "maximum_limit_allowed": "500",
+ // }
+ // }
+ ErrorReason_ERROR_REASON_EXCEEDS_MAXIMUM_ALLOWABLE_LIMIT ErrorReason = 22
+ // The request failed because the provided filter was invalid in some way.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_INVALID_FILTER",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "filter": "...",
+ // }
+ // }
+ ErrorReason_ERROR_REASON_INVALID_FILTER ErrorReason = 23
+ // The request failed because too many concurrent updates were attempted
+ // against the in-memory datastore.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_INMEMORY_TOO_MANY_CONCURRENT_UPDATES",
+ // "domain": "authzed.com",
+ // "metadata": {}
+ // }
+ ErrorReason_ERROR_REASON_INMEMORY_TOO_MANY_CONCURRENT_UPDATES ErrorReason = 24
+ // The request failed because the precondition specified is empty.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_EMPTY_PRECONDITION",
+ // "domain": "authzed.com",
+ // "metadata": {}
+ // }
+ ErrorReason_ERROR_REASON_EMPTY_PRECONDITION ErrorReason = 25
+ // The request failed because the counter was already registered.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_COUNTER_ALREADY_REGISTERED",
+ // "domain": "authzed.com",
+ // "metadata": { "counter_name": "name" }
+ // }
+ ErrorReason_ERROR_REASON_COUNTER_ALREADY_REGISTERED ErrorReason = 26
+ // The request failed because the counter was not registered.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_COUNTER_NOT_REGISTERED",
+ // "domain": "authzed.com",
+ // "metadata": { "counter_name": "name" }
+ // }
+ ErrorReason_ERROR_REASON_COUNTER_NOT_REGISTERED ErrorReason = 27
+ // The request failed because a wildcard was not allowed. For CheckPermission,
+ // this means that the subject or resource ID was a wildcard. For LookupResources,
+ // this means that the subject ID was a wildcard.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_WILDCARD_NOT_ALLOWED",
+ // "domain": "authzed.com",
+ // "metadata": { "disallowed_field": "subject_id" }
+ // }
+ ErrorReason_ERROR_REASON_WILDCARD_NOT_ALLOWED ErrorReason = 28
+ // The request failed because the transaction metadata was too large.
+ //
+ // Example of an ErrorInfo:
+ //
+ // {
+ // "reason": "ERROR_REASON_TRANSACTION_METADATA_TOO_LARGE",
+ // "domain": "authzed.com",
+ // "metadata": {
+ // "metadata_byte_size": "1024",
+ // "maximum_allowed_metadata_byte_size": "512",
+ // }
+ // }
+ ErrorReason_ERROR_REASON_TRANSACTION_METADATA_TOO_LARGE ErrorReason = 29
+)
+
+// Enum value maps for ErrorReason.
+var (
+ ErrorReason_name = map[int32]string{
+ 0: "ERROR_REASON_UNSPECIFIED",
+ 1: "ERROR_REASON_SCHEMA_PARSE_ERROR",
+ 2: "ERROR_REASON_SCHEMA_TYPE_ERROR",
+ 3: "ERROR_REASON_UNKNOWN_DEFINITION",
+ 4: "ERROR_REASON_UNKNOWN_RELATION_OR_PERMISSION",
+ 5: "ERROR_REASON_TOO_MANY_UPDATES_IN_REQUEST",
+ 6: "ERROR_REASON_TOO_MANY_PRECONDITIONS_IN_REQUEST",
+ 7: "ERROR_REASON_WRITE_OR_DELETE_PRECONDITION_FAILURE",
+ 8: "ERROR_REASON_SERVICE_READ_ONLY",
+ 9: "ERROR_REASON_UNKNOWN_CAVEAT",
+ 10: "ERROR_REASON_INVALID_SUBJECT_TYPE",
+ 11: "ERROR_REASON_CAVEAT_PARAMETER_TYPE_ERROR",
+ 12: "ERROR_REASON_UPDATES_ON_SAME_RELATIONSHIP",
+ 13: "ERROR_REASON_CANNOT_UPDATE_PERMISSION",
+ 14: "ERROR_REASON_CAVEAT_EVALUATION_ERROR",
+ 15: "ERROR_REASON_INVALID_CURSOR",
+ 16: "ERROR_REASON_TOO_MANY_RELATIONSHIPS_FOR_TRANSACTIONAL_DELETE",
+ 17: "ERROR_REASON_MAX_RELATIONSHIP_CONTEXT_SIZE",
+ 18: "ERROR_REASON_ATTEMPT_TO_RECREATE_RELATIONSHIP",
+ 19: "ERROR_REASON_MAXIMUM_DEPTH_EXCEEDED",
+ 20: "ERROR_REASON_SERIALIZATION_FAILURE",
+ 21: "ERROR_REASON_TOO_MANY_CHECKS_IN_REQUEST",
+ 22: "ERROR_REASON_EXCEEDS_MAXIMUM_ALLOWABLE_LIMIT",
+ 23: "ERROR_REASON_INVALID_FILTER",
+ 24: "ERROR_REASON_INMEMORY_TOO_MANY_CONCURRENT_UPDATES",
+ 25: "ERROR_REASON_EMPTY_PRECONDITION",
+ 26: "ERROR_REASON_COUNTER_ALREADY_REGISTERED",
+ 27: "ERROR_REASON_COUNTER_NOT_REGISTERED",
+ 28: "ERROR_REASON_WILDCARD_NOT_ALLOWED",
+ 29: "ERROR_REASON_TRANSACTION_METADATA_TOO_LARGE",
+ }
+ ErrorReason_value = map[string]int32{
+ "ERROR_REASON_UNSPECIFIED": 0,
+ "ERROR_REASON_SCHEMA_PARSE_ERROR": 1,
+ "ERROR_REASON_SCHEMA_TYPE_ERROR": 2,
+ "ERROR_REASON_UNKNOWN_DEFINITION": 3,
+ "ERROR_REASON_UNKNOWN_RELATION_OR_PERMISSION": 4,
+ "ERROR_REASON_TOO_MANY_UPDATES_IN_REQUEST": 5,
+ "ERROR_REASON_TOO_MANY_PRECONDITIONS_IN_REQUEST": 6,
+ "ERROR_REASON_WRITE_OR_DELETE_PRECONDITION_FAILURE": 7,
+ "ERROR_REASON_SERVICE_READ_ONLY": 8,
+ "ERROR_REASON_UNKNOWN_CAVEAT": 9,
+ "ERROR_REASON_INVALID_SUBJECT_TYPE": 10,
+ "ERROR_REASON_CAVEAT_PARAMETER_TYPE_ERROR": 11,
+ "ERROR_REASON_UPDATES_ON_SAME_RELATIONSHIP": 12,
+ "ERROR_REASON_CANNOT_UPDATE_PERMISSION": 13,
+ "ERROR_REASON_CAVEAT_EVALUATION_ERROR": 14,
+ "ERROR_REASON_INVALID_CURSOR": 15,
+ "ERROR_REASON_TOO_MANY_RELATIONSHIPS_FOR_TRANSACTIONAL_DELETE": 16,
+ "ERROR_REASON_MAX_RELATIONSHIP_CONTEXT_SIZE": 17,
+ "ERROR_REASON_ATTEMPT_TO_RECREATE_RELATIONSHIP": 18,
+ "ERROR_REASON_MAXIMUM_DEPTH_EXCEEDED": 19,
+ "ERROR_REASON_SERIALIZATION_FAILURE": 20,
+ "ERROR_REASON_TOO_MANY_CHECKS_IN_REQUEST": 21,
+ "ERROR_REASON_EXCEEDS_MAXIMUM_ALLOWABLE_LIMIT": 22,
+ "ERROR_REASON_INVALID_FILTER": 23,
+ "ERROR_REASON_INMEMORY_TOO_MANY_CONCURRENT_UPDATES": 24,
+ "ERROR_REASON_EMPTY_PRECONDITION": 25,
+ "ERROR_REASON_COUNTER_ALREADY_REGISTERED": 26,
+ "ERROR_REASON_COUNTER_NOT_REGISTERED": 27,
+ "ERROR_REASON_WILDCARD_NOT_ALLOWED": 28,
+ "ERROR_REASON_TRANSACTION_METADATA_TOO_LARGE": 29,
+ }
+)
+
+func (x ErrorReason) Enum() *ErrorReason {
+ p := new(ErrorReason)
+ *p = x
+ return p
+}
+
+func (x ErrorReason) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ErrorReason) Descriptor() protoreflect.EnumDescriptor {
+ return file_authzed_api_v1_error_reason_proto_enumTypes[0].Descriptor()
+}
+
+func (ErrorReason) Type() protoreflect.EnumType {
+ return &file_authzed_api_v1_error_reason_proto_enumTypes[0]
+}
+
+func (x ErrorReason) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use ErrorReason.Descriptor instead.
+func (ErrorReason) EnumDescriptor() ([]byte, []int) {
+ return file_authzed_api_v1_error_reason_proto_rawDescGZIP(), []int{0}
+}
+
+var File_authzed_api_v1_error_reason_proto protoreflect.FileDescriptor
+
+const file_authzed_api_v1_error_reason_proto_rawDesc = "" +
+ "\n" +
+ "!authzed/api/v1/error_reason.proto\x12\x0eauthzed.api.v1*\xa2\n" +
+ "\n" +
+ "\vErrorReason\x12\x1c\n" +
+ "\x18ERROR_REASON_UNSPECIFIED\x10\x00\x12#\n" +
+ "\x1fERROR_REASON_SCHEMA_PARSE_ERROR\x10\x01\x12\"\n" +
+ "\x1eERROR_REASON_SCHEMA_TYPE_ERROR\x10\x02\x12#\n" +
+ "\x1fERROR_REASON_UNKNOWN_DEFINITION\x10\x03\x12/\n" +
+ "+ERROR_REASON_UNKNOWN_RELATION_OR_PERMISSION\x10\x04\x12,\n" +
+ "(ERROR_REASON_TOO_MANY_UPDATES_IN_REQUEST\x10\x05\x122\n" +
+ ".ERROR_REASON_TOO_MANY_PRECONDITIONS_IN_REQUEST\x10\x06\x125\n" +
+ "1ERROR_REASON_WRITE_OR_DELETE_PRECONDITION_FAILURE\x10\a\x12\"\n" +
+ "\x1eERROR_REASON_SERVICE_READ_ONLY\x10\b\x12\x1f\n" +
+ "\x1bERROR_REASON_UNKNOWN_CAVEAT\x10\t\x12%\n" +
+ "!ERROR_REASON_INVALID_SUBJECT_TYPE\x10\n" +
+ "\x12,\n" +
+ "(ERROR_REASON_CAVEAT_PARAMETER_TYPE_ERROR\x10\v\x12-\n" +
+ ")ERROR_REASON_UPDATES_ON_SAME_RELATIONSHIP\x10\f\x12)\n" +
+ "%ERROR_REASON_CANNOT_UPDATE_PERMISSION\x10\r\x12(\n" +
+ "$ERROR_REASON_CAVEAT_EVALUATION_ERROR\x10\x0e\x12\x1f\n" +
+ "\x1bERROR_REASON_INVALID_CURSOR\x10\x0f\x12@\n" +
+ "<ERROR_REASON_TOO_MANY_RELATIONSHIPS_FOR_TRANSACTIONAL_DELETE\x10\x10\x12.\n" +
+ "*ERROR_REASON_MAX_RELATIONSHIP_CONTEXT_SIZE\x10\x11\x121\n" +
+ "-ERROR_REASON_ATTEMPT_TO_RECREATE_RELATIONSHIP\x10\x12\x12'\n" +
+ "#ERROR_REASON_MAXIMUM_DEPTH_EXCEEDED\x10\x13\x12&\n" +
+ "\"ERROR_REASON_SERIALIZATION_FAILURE\x10\x14\x12+\n" +
+ "'ERROR_REASON_TOO_MANY_CHECKS_IN_REQUEST\x10\x15\x120\n" +
+ ",ERROR_REASON_EXCEEDS_MAXIMUM_ALLOWABLE_LIMIT\x10\x16\x12\x1f\n" +
+ "\x1bERROR_REASON_INVALID_FILTER\x10\x17\x125\n" +
+ "1ERROR_REASON_INMEMORY_TOO_MANY_CONCURRENT_UPDATES\x10\x18\x12#\n" +
+ "\x1fERROR_REASON_EMPTY_PRECONDITION\x10\x19\x12+\n" +
+ "'ERROR_REASON_COUNTER_ALREADY_REGISTERED\x10\x1a\x12'\n" +
+ "#ERROR_REASON_COUNTER_NOT_REGISTERED\x10\x1b\x12%\n" +
+ "!ERROR_REASON_WILDCARD_NOT_ALLOWED\x10\x1c\x12/\n" +
+ "+ERROR_REASON_TRANSACTION_METADATA_TOO_LARGE\x10\x1dBJ\n" +
+ "\x12com.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
+
+var (
+ file_authzed_api_v1_error_reason_proto_rawDescOnce sync.Once
+ file_authzed_api_v1_error_reason_proto_rawDescData []byte
+)
+
+func file_authzed_api_v1_error_reason_proto_rawDescGZIP() []byte {
+ file_authzed_api_v1_error_reason_proto_rawDescOnce.Do(func() {
+ file_authzed_api_v1_error_reason_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authzed_api_v1_error_reason_proto_rawDesc), len(file_authzed_api_v1_error_reason_proto_rawDesc)))
+ })
+ return file_authzed_api_v1_error_reason_proto_rawDescData
+}
+
+var file_authzed_api_v1_error_reason_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_authzed_api_v1_error_reason_proto_goTypes = []any{
+ (ErrorReason)(0), // 0: authzed.api.v1.ErrorReason
+}
+var file_authzed_api_v1_error_reason_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_authzed_api_v1_error_reason_proto_init() }
+func file_authzed_api_v1_error_reason_proto_init() {
+ if File_authzed_api_v1_error_reason_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_authzed_api_v1_error_reason_proto_rawDesc), len(file_authzed_api_v1_error_reason_proto_rawDesc)),
+ NumEnums: 1,
+ NumMessages: 0,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_authzed_api_v1_error_reason_proto_goTypes,
+ DependencyIndexes: file_authzed_api_v1_error_reason_proto_depIdxs,
+ EnumInfos: file_authzed_api_v1_error_reason_proto_enumTypes,
+ }.Build()
+ File_authzed_api_v1_error_reason_proto = out.File
+ file_authzed_api_v1_error_reason_proto_goTypes = nil
+ file_authzed_api_v1_error_reason_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/error_reason.pb.validate.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/error_reason.pb.validate.go
new file mode 100644
index 0000000..3d67ff9
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/error_reason.pb.validate.go
@@ -0,0 +1,36 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: authzed/api/v1/error_reason.proto
+
+package v1
+
+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
+)
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service.pb.go
new file mode 100644
index 0000000..ea63f7f
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service.pb.go
@@ -0,0 +1,2824 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.6
+// protoc (unknown)
+// source: authzed/api/v1/experimental_service.proto
+
+package v1
+
+import (
+ _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ _ "google.golang.org/genproto/googleapis/api/annotations"
+ status "google.golang.org/genproto/googleapis/rpc/status"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ExperimentalRegisterRelationshipCounterRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // name is the name of the counter being registered.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // relationship_filter defines the filter to be applied to the relationships
+ // to be counted.
+ RelationshipFilter *RelationshipFilter `protobuf:"bytes,2,opt,name=relationship_filter,json=relationshipFilter,proto3" json:"relationship_filter,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExperimentalRegisterRelationshipCounterRequest) Reset() {
+ *x = ExperimentalRegisterRelationshipCounterRequest{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExperimentalRegisterRelationshipCounterRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExperimentalRegisterRelationshipCounterRequest) ProtoMessage() {}
+
+func (x *ExperimentalRegisterRelationshipCounterRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExperimentalRegisterRelationshipCounterRequest.ProtoReflect.Descriptor instead.
+func (*ExperimentalRegisterRelationshipCounterRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ExperimentalRegisterRelationshipCounterRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ExperimentalRegisterRelationshipCounterRequest) GetRelationshipFilter() *RelationshipFilter {
+ if x != nil {
+ return x.RelationshipFilter
+ }
+ return nil
+}
+
+type ExperimentalRegisterRelationshipCounterResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExperimentalRegisterRelationshipCounterResponse) Reset() {
+ *x = ExperimentalRegisterRelationshipCounterResponse{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExperimentalRegisterRelationshipCounterResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExperimentalRegisterRelationshipCounterResponse) ProtoMessage() {}
+
+func (x *ExperimentalRegisterRelationshipCounterResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExperimentalRegisterRelationshipCounterResponse.ProtoReflect.Descriptor instead.
+func (*ExperimentalRegisterRelationshipCounterResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{1}
+}
+
+type ExperimentalCountRelationshipsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // name is the name of the counter whose count is being requested.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExperimentalCountRelationshipsRequest) Reset() {
+ *x = ExperimentalCountRelationshipsRequest{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExperimentalCountRelationshipsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExperimentalCountRelationshipsRequest) ProtoMessage() {}
+
+func (x *ExperimentalCountRelationshipsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExperimentalCountRelationshipsRequest.ProtoReflect.Descriptor instead.
+func (*ExperimentalCountRelationshipsRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ExperimentalCountRelationshipsRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type ExperimentalCountRelationshipsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Types that are valid to be assigned to CounterResult:
+ //
+ // *ExperimentalCountRelationshipsResponse_CounterStillCalculating
+ // *ExperimentalCountRelationshipsResponse_ReadCounterValue
+ CounterResult isExperimentalCountRelationshipsResponse_CounterResult `protobuf_oneof:"counter_result"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExperimentalCountRelationshipsResponse) Reset() {
+ *x = ExperimentalCountRelationshipsResponse{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExperimentalCountRelationshipsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExperimentalCountRelationshipsResponse) ProtoMessage() {}
+
+func (x *ExperimentalCountRelationshipsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExperimentalCountRelationshipsResponse.ProtoReflect.Descriptor instead.
+func (*ExperimentalCountRelationshipsResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *ExperimentalCountRelationshipsResponse) GetCounterResult() isExperimentalCountRelationshipsResponse_CounterResult {
+ if x != nil {
+ return x.CounterResult
+ }
+ return nil
+}
+
+func (x *ExperimentalCountRelationshipsResponse) GetCounterStillCalculating() bool {
+ if x != nil {
+ if x, ok := x.CounterResult.(*ExperimentalCountRelationshipsResponse_CounterStillCalculating); ok {
+ return x.CounterStillCalculating
+ }
+ }
+ return false
+}
+
+func (x *ExperimentalCountRelationshipsResponse) GetReadCounterValue() *ReadCounterValue {
+ if x != nil {
+ if x, ok := x.CounterResult.(*ExperimentalCountRelationshipsResponse_ReadCounterValue); ok {
+ return x.ReadCounterValue
+ }
+ }
+ return nil
+}
+
+type isExperimentalCountRelationshipsResponse_CounterResult interface {
+ isExperimentalCountRelationshipsResponse_CounterResult()
+}
+
+type ExperimentalCountRelationshipsResponse_CounterStillCalculating struct {
+ // counter_still_calculating is true if the counter is still calculating the count.
+ CounterStillCalculating bool `protobuf:"varint,1,opt,name=counter_still_calculating,json=counterStillCalculating,proto3,oneof"`
+}
+
+type ExperimentalCountRelationshipsResponse_ReadCounterValue struct {
+ // read_counter_value is the value of the counter at the time of the read.
+ ReadCounterValue *ReadCounterValue `protobuf:"bytes,2,opt,name=read_counter_value,json=readCounterValue,proto3,oneof"`
+}
+
+func (*ExperimentalCountRelationshipsResponse_CounterStillCalculating) isExperimentalCountRelationshipsResponse_CounterResult() {
+}
+
+func (*ExperimentalCountRelationshipsResponse_ReadCounterValue) isExperimentalCountRelationshipsResponse_CounterResult() {
+}
+
+type ReadCounterValue struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // relationship_count is the count of relationships that match the filter.
+ RelationshipCount uint64 `protobuf:"varint,1,opt,name=relationship_count,json=relationshipCount,proto3" json:"relationship_count,omitempty"`
+ // read_at is the ZedToken at which the relationship count applies.
+ ReadAt *ZedToken `protobuf:"bytes,2,opt,name=read_at,json=readAt,proto3" json:"read_at,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReadCounterValue) Reset() {
+ *x = ReadCounterValue{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReadCounterValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReadCounterValue) ProtoMessage() {}
+
+func (x *ReadCounterValue) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[4]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReadCounterValue.ProtoReflect.Descriptor instead.
+func (*ReadCounterValue) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *ReadCounterValue) GetRelationshipCount() uint64 {
+ if x != nil {
+ return x.RelationshipCount
+ }
+ return 0
+}
+
+func (x *ReadCounterValue) GetReadAt() *ZedToken {
+ if x != nil {
+ return x.ReadAt
+ }
+ return nil
+}
+
+type ExperimentalUnregisterRelationshipCounterRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // name is the name of the counter being unregistered.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExperimentalUnregisterRelationshipCounterRequest) Reset() {
+ *x = ExperimentalUnregisterRelationshipCounterRequest{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExperimentalUnregisterRelationshipCounterRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExperimentalUnregisterRelationshipCounterRequest) ProtoMessage() {}
+
+func (x *ExperimentalUnregisterRelationshipCounterRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[5]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExperimentalUnregisterRelationshipCounterRequest.ProtoReflect.Descriptor instead.
+func (*ExperimentalUnregisterRelationshipCounterRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *ExperimentalUnregisterRelationshipCounterRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type ExperimentalUnregisterRelationshipCounterResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExperimentalUnregisterRelationshipCounterResponse) Reset() {
+ *x = ExperimentalUnregisterRelationshipCounterResponse{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExperimentalUnregisterRelationshipCounterResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExperimentalUnregisterRelationshipCounterResponse) ProtoMessage() {}
+
+func (x *ExperimentalUnregisterRelationshipCounterResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[6]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExperimentalUnregisterRelationshipCounterResponse.ProtoReflect.Descriptor instead.
+func (*ExperimentalUnregisterRelationshipCounterResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{6}
+}
+
+// NOTE: Deprecated now that BulkCheckPermission has been promoted to the stable API as "CheckBulkPermission".
+type BulkCheckPermissionRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ // Deprecated: Marked as deprecated in authzed/api/v1/experimental_service.proto.
+ Items []*BulkCheckPermissionRequestItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BulkCheckPermissionRequest) Reset() {
+ *x = BulkCheckPermissionRequest{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BulkCheckPermissionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BulkCheckPermissionRequest) ProtoMessage() {}
+
+func (x *BulkCheckPermissionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[7]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BulkCheckPermissionRequest.ProtoReflect.Descriptor instead.
+func (*BulkCheckPermissionRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *BulkCheckPermissionRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+// Deprecated: Marked as deprecated in authzed/api/v1/experimental_service.proto.
+func (x *BulkCheckPermissionRequest) GetItems() []*BulkCheckPermissionRequestItem {
+ if x != nil {
+ return x.Items
+ }
+ return nil
+}
+
+type BulkCheckPermissionRequestItem struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Resource *ObjectReference `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
+ Permission string `protobuf:"bytes,2,opt,name=permission,proto3" json:"permission,omitempty"`
+ Subject *SubjectReference `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
+ Context *structpb.Struct `protobuf:"bytes,4,opt,name=context,proto3" json:"context,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BulkCheckPermissionRequestItem) Reset() {
+ *x = BulkCheckPermissionRequestItem{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BulkCheckPermissionRequestItem) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BulkCheckPermissionRequestItem) ProtoMessage() {}
+
+func (x *BulkCheckPermissionRequestItem) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[8]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BulkCheckPermissionRequestItem.ProtoReflect.Descriptor instead.
+func (*BulkCheckPermissionRequestItem) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *BulkCheckPermissionRequestItem) GetResource() *ObjectReference {
+ if x != nil {
+ return x.Resource
+ }
+ return nil
+}
+
+func (x *BulkCheckPermissionRequestItem) GetPermission() string {
+ if x != nil {
+ return x.Permission
+ }
+ return ""
+}
+
+func (x *BulkCheckPermissionRequestItem) GetSubject() *SubjectReference {
+ if x != nil {
+ return x.Subject
+ }
+ return nil
+}
+
+func (x *BulkCheckPermissionRequestItem) GetContext() *structpb.Struct {
+ if x != nil {
+ return x.Context
+ }
+ return nil
+}
+
+type BulkCheckPermissionResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ CheckedAt *ZedToken `protobuf:"bytes,1,opt,name=checked_at,json=checkedAt,proto3" json:"checked_at,omitempty"`
+ Pairs []*BulkCheckPermissionPair `protobuf:"bytes,2,rep,name=pairs,proto3" json:"pairs,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BulkCheckPermissionResponse) Reset() {
+ *x = BulkCheckPermissionResponse{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BulkCheckPermissionResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BulkCheckPermissionResponse) ProtoMessage() {}
+
+func (x *BulkCheckPermissionResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[9]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BulkCheckPermissionResponse.ProtoReflect.Descriptor instead.
+func (*BulkCheckPermissionResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *BulkCheckPermissionResponse) GetCheckedAt() *ZedToken {
+ if x != nil {
+ return x.CheckedAt
+ }
+ return nil
+}
+
+func (x *BulkCheckPermissionResponse) GetPairs() []*BulkCheckPermissionPair {
+ if x != nil {
+ return x.Pairs
+ }
+ return nil
+}
+
+type BulkCheckPermissionPair struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Request *BulkCheckPermissionRequestItem `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
+ // Types that are valid to be assigned to Response:
+ //
+ // *BulkCheckPermissionPair_Item
+ // *BulkCheckPermissionPair_Error
+ Response isBulkCheckPermissionPair_Response `protobuf_oneof:"response"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BulkCheckPermissionPair) Reset() {
+ *x = BulkCheckPermissionPair{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BulkCheckPermissionPair) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BulkCheckPermissionPair) ProtoMessage() {}
+
+func (x *BulkCheckPermissionPair) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[10]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BulkCheckPermissionPair.ProtoReflect.Descriptor instead.
+func (*BulkCheckPermissionPair) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *BulkCheckPermissionPair) GetRequest() *BulkCheckPermissionRequestItem {
+ if x != nil {
+ return x.Request
+ }
+ return nil
+}
+
+func (x *BulkCheckPermissionPair) GetResponse() isBulkCheckPermissionPair_Response {
+ if x != nil {
+ return x.Response
+ }
+ return nil
+}
+
+func (x *BulkCheckPermissionPair) GetItem() *BulkCheckPermissionResponseItem {
+ if x != nil {
+ if x, ok := x.Response.(*BulkCheckPermissionPair_Item); ok {
+ return x.Item
+ }
+ }
+ return nil
+}
+
+func (x *BulkCheckPermissionPair) GetError() *status.Status {
+ if x != nil {
+ if x, ok := x.Response.(*BulkCheckPermissionPair_Error); ok {
+ return x.Error
+ }
+ }
+ return nil
+}
+
+type isBulkCheckPermissionPair_Response interface {
+ isBulkCheckPermissionPair_Response()
+}
+
+type BulkCheckPermissionPair_Item struct {
+ Item *BulkCheckPermissionResponseItem `protobuf:"bytes,2,opt,name=item,proto3,oneof"`
+}
+
+type BulkCheckPermissionPair_Error struct {
+ Error *status.Status `protobuf:"bytes,3,opt,name=error,proto3,oneof"`
+}
+
+func (*BulkCheckPermissionPair_Item) isBulkCheckPermissionPair_Response() {}
+
+func (*BulkCheckPermissionPair_Error) isBulkCheckPermissionPair_Response() {}
+
+type BulkCheckPermissionResponseItem struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Permissionship CheckPermissionResponse_Permissionship `protobuf:"varint,1,opt,name=permissionship,proto3,enum=authzed.api.v1.CheckPermissionResponse_Permissionship" json:"permissionship,omitempty"`
+ PartialCaveatInfo *PartialCaveatInfo `protobuf:"bytes,2,opt,name=partial_caveat_info,json=partialCaveatInfo,proto3" json:"partial_caveat_info,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BulkCheckPermissionResponseItem) Reset() {
+ *x = BulkCheckPermissionResponseItem{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BulkCheckPermissionResponseItem) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BulkCheckPermissionResponseItem) ProtoMessage() {}
+
+func (x *BulkCheckPermissionResponseItem) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[11]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BulkCheckPermissionResponseItem.ProtoReflect.Descriptor instead.
+func (*BulkCheckPermissionResponseItem) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *BulkCheckPermissionResponseItem) GetPermissionship() CheckPermissionResponse_Permissionship {
+ if x != nil {
+ return x.Permissionship
+ }
+ return CheckPermissionResponse_PERMISSIONSHIP_UNSPECIFIED
+}
+
+func (x *BulkCheckPermissionResponseItem) GetPartialCaveatInfo() *PartialCaveatInfo {
+ if x != nil {
+ return x.PartialCaveatInfo
+ }
+ return nil
+}
+
+// BulkImportRelationshipsRequest represents one batch of the streaming
+// BulkImportRelationships API. The maximum size is only limited by the backing
+// datastore, and optimal size should be determined by the calling client
+// experimentally. When BulkImport is invoked and receives its first request message,
+// a transaction is opened to import the relationships. All requests sent to the same
+// invocation are executed under this single transaction. If a relationship already
+// exists within the datastore, the entire transaction will fail with an error.
+type BulkImportRelationshipsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Relationships []*Relationship `protobuf:"bytes,1,rep,name=relationships,proto3" json:"relationships,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BulkImportRelationshipsRequest) Reset() {
+ *x = BulkImportRelationshipsRequest{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BulkImportRelationshipsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BulkImportRelationshipsRequest) ProtoMessage() {}
+
+func (x *BulkImportRelationshipsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[12]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BulkImportRelationshipsRequest.ProtoReflect.Descriptor instead.
+func (*BulkImportRelationshipsRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *BulkImportRelationshipsRequest) GetRelationships() []*Relationship {
+ if x != nil {
+ return x.Relationships
+ }
+ return nil
+}
+
+// BulkImportRelationshipsResponse is returned on successful completion of the
+// bulk load stream, and contains the total number of relationships loaded.
+type BulkImportRelationshipsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ NumLoaded uint64 `protobuf:"varint,1,opt,name=num_loaded,json=numLoaded,proto3" json:"num_loaded,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BulkImportRelationshipsResponse) Reset() {
+ *x = BulkImportRelationshipsResponse{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BulkImportRelationshipsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BulkImportRelationshipsResponse) ProtoMessage() {}
+
+func (x *BulkImportRelationshipsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[13]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BulkImportRelationshipsResponse.ProtoReflect.Descriptor instead.
+func (*BulkImportRelationshipsResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *BulkImportRelationshipsResponse) GetNumLoaded() uint64 {
+ if x != nil {
+ return x.NumLoaded
+ }
+ return 0
+}
+
+// BulkExportRelationshipsRequest represents a resumable request for
+// all relationships from the server.
+type BulkExportRelationshipsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ // optional_limit, if non-zero, specifies the limit on the number of
+ // relationships the server can return in one page. By default, the server
+ // will pick a page size, and the server is free to choose a smaller size
+ // at will.
+ OptionalLimit uint32 `protobuf:"varint,2,opt,name=optional_limit,json=optionalLimit,proto3" json:"optional_limit,omitempty"`
+ // optional_cursor, if specified, indicates the cursor after which results
+ // should resume being returned. The cursor can be found on the
+ // BulkExportRelationshipsResponse object.
+ OptionalCursor *Cursor `protobuf:"bytes,3,opt,name=optional_cursor,json=optionalCursor,proto3" json:"optional_cursor,omitempty"`
+ // optional_relationship_filter, if specified, indicates the
+ // filter to apply to each relationship to be exported.
+ OptionalRelationshipFilter *RelationshipFilter `protobuf:"bytes,4,opt,name=optional_relationship_filter,json=optionalRelationshipFilter,proto3" json:"optional_relationship_filter,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BulkExportRelationshipsRequest) Reset() {
+ *x = BulkExportRelationshipsRequest{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BulkExportRelationshipsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BulkExportRelationshipsRequest) ProtoMessage() {}
+
+func (x *BulkExportRelationshipsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[14]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BulkExportRelationshipsRequest.ProtoReflect.Descriptor instead.
+func (*BulkExportRelationshipsRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *BulkExportRelationshipsRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+func (x *BulkExportRelationshipsRequest) GetOptionalLimit() uint32 {
+ if x != nil {
+ return x.OptionalLimit
+ }
+ return 0
+}
+
+func (x *BulkExportRelationshipsRequest) GetOptionalCursor() *Cursor {
+ if x != nil {
+ return x.OptionalCursor
+ }
+ return nil
+}
+
+func (x *BulkExportRelationshipsRequest) GetOptionalRelationshipFilter() *RelationshipFilter {
+ if x != nil {
+ return x.OptionalRelationshipFilter
+ }
+ return nil
+}
+
+// BulkExportRelationshipsResponse is one page in a stream of relationship
+// groups that meet the criteria specified by the originating request. The
+// server will continue to stream back relationship groups as quickly as it can
+// until all relationships have been transmitted back.
+type BulkExportRelationshipsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ AfterResultCursor *Cursor `protobuf:"bytes,1,opt,name=after_result_cursor,json=afterResultCursor,proto3" json:"after_result_cursor,omitempty"`
+ Relationships []*Relationship `protobuf:"bytes,2,rep,name=relationships,proto3" json:"relationships,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *BulkExportRelationshipsResponse) Reset() {
+ *x = BulkExportRelationshipsResponse{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *BulkExportRelationshipsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BulkExportRelationshipsResponse) ProtoMessage() {}
+
+func (x *BulkExportRelationshipsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[15]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BulkExportRelationshipsResponse.ProtoReflect.Descriptor instead.
+func (*BulkExportRelationshipsResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *BulkExportRelationshipsResponse) GetAfterResultCursor() *Cursor {
+ if x != nil {
+ return x.AfterResultCursor
+ }
+ return nil
+}
+
+func (x *BulkExportRelationshipsResponse) GetRelationships() []*Relationship {
+ if x != nil {
+ return x.Relationships
+ }
+ return nil
+}
+
+type ExperimentalReflectSchemaRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ // optional_filters defines optional filters that are applied in
+ // an OR fashion to the schema, before being returned
+ OptionalFilters []*ExpSchemaFilter `protobuf:"bytes,2,rep,name=optional_filters,json=optionalFilters,proto3" json:"optional_filters,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExperimentalReflectSchemaRequest) Reset() {
+ *x = ExperimentalReflectSchemaRequest{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExperimentalReflectSchemaRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExperimentalReflectSchemaRequest) ProtoMessage() {}
+
+func (x *ExperimentalReflectSchemaRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[16]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExperimentalReflectSchemaRequest.ProtoReflect.Descriptor instead.
+func (*ExperimentalReflectSchemaRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *ExperimentalReflectSchemaRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+func (x *ExperimentalReflectSchemaRequest) GetOptionalFilters() []*ExpSchemaFilter {
+ if x != nil {
+ return x.OptionalFilters
+ }
+ return nil
+}
+
+type ExperimentalReflectSchemaResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // definitions are the definitions defined in the schema.
+ Definitions []*ExpDefinition `protobuf:"bytes,1,rep,name=definitions,proto3" json:"definitions,omitempty"`
+ // caveats are the caveats defined in the schema.
+ Caveats []*ExpCaveat `protobuf:"bytes,2,rep,name=caveats,proto3" json:"caveats,omitempty"`
+ // read_at is the ZedToken at which the schema was read.
+ ReadAt *ZedToken `protobuf:"bytes,3,opt,name=read_at,json=readAt,proto3" json:"read_at,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExperimentalReflectSchemaResponse) Reset() {
+ *x = ExperimentalReflectSchemaResponse{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExperimentalReflectSchemaResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExperimentalReflectSchemaResponse) ProtoMessage() {}
+
+func (x *ExperimentalReflectSchemaResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[17]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExperimentalReflectSchemaResponse.ProtoReflect.Descriptor instead.
+func (*ExperimentalReflectSchemaResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *ExperimentalReflectSchemaResponse) GetDefinitions() []*ExpDefinition {
+ if x != nil {
+ return x.Definitions
+ }
+ return nil
+}
+
+func (x *ExperimentalReflectSchemaResponse) GetCaveats() []*ExpCaveat {
+ if x != nil {
+ return x.Caveats
+ }
+ return nil
+}
+
+func (x *ExperimentalReflectSchemaResponse) GetReadAt() *ZedToken {
+ if x != nil {
+ return x.ReadAt
+ }
+ return nil
+}
+
+// ExpSchemaFilter is a filter that can be applied to the schema on reflection.
+type ExpSchemaFilter struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // optional_definition_name_filter is a prefix that is matched against the definition name.
+ OptionalDefinitionNameFilter string `protobuf:"bytes,1,opt,name=optional_definition_name_filter,json=optionalDefinitionNameFilter,proto3" json:"optional_definition_name_filter,omitempty"`
+ // optional_caveat_name_filter is a prefix that is matched against the caveat name.
+ OptionalCaveatNameFilter string `protobuf:"bytes,2,opt,name=optional_caveat_name_filter,json=optionalCaveatNameFilter,proto3" json:"optional_caveat_name_filter,omitempty"`
+ // optional_relation_name_filter is a prefix that is matched against the relation name.
+ OptionalRelationNameFilter string `protobuf:"bytes,3,opt,name=optional_relation_name_filter,json=optionalRelationNameFilter,proto3" json:"optional_relation_name_filter,omitempty"`
+ // optional_permission_name_filter is a prefix that is matched against the permission name.
+ OptionalPermissionNameFilter string `protobuf:"bytes,4,opt,name=optional_permission_name_filter,json=optionalPermissionNameFilter,proto3" json:"optional_permission_name_filter,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExpSchemaFilter) Reset() {
+ *x = ExpSchemaFilter{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExpSchemaFilter) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExpSchemaFilter) ProtoMessage() {}
+
+func (x *ExpSchemaFilter) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[18]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExpSchemaFilter.ProtoReflect.Descriptor instead.
+func (*ExpSchemaFilter) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *ExpSchemaFilter) GetOptionalDefinitionNameFilter() string {
+ if x != nil {
+ return x.OptionalDefinitionNameFilter
+ }
+ return ""
+}
+
+func (x *ExpSchemaFilter) GetOptionalCaveatNameFilter() string {
+ if x != nil {
+ return x.OptionalCaveatNameFilter
+ }
+ return ""
+}
+
+func (x *ExpSchemaFilter) GetOptionalRelationNameFilter() string {
+ if x != nil {
+ return x.OptionalRelationNameFilter
+ }
+ return ""
+}
+
+func (x *ExpSchemaFilter) GetOptionalPermissionNameFilter() string {
+ if x != nil {
+ return x.OptionalPermissionNameFilter
+ }
+ return ""
+}
+
+// ExpDefinition is the representation of a definition in the schema.
+type ExpDefinition struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // comment is a human-readable comments on the definition. Will include
+ // delimiter characters.
+ Comment string `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"`
+ Relations []*ExpRelation `protobuf:"bytes,3,rep,name=relations,proto3" json:"relations,omitempty"`
+ Permissions []*ExpPermission `protobuf:"bytes,4,rep,name=permissions,proto3" json:"permissions,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExpDefinition) Reset() {
+ *x = ExpDefinition{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExpDefinition) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExpDefinition) ProtoMessage() {}
+
+func (x *ExpDefinition) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[19]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExpDefinition.ProtoReflect.Descriptor instead.
+func (*ExpDefinition) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *ExpDefinition) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ExpDefinition) GetComment() string {
+ if x != nil {
+ return x.Comment
+ }
+ return ""
+}
+
+func (x *ExpDefinition) GetRelations() []*ExpRelation {
+ if x != nil {
+ return x.Relations
+ }
+ return nil
+}
+
+func (x *ExpDefinition) GetPermissions() []*ExpPermission {
+ if x != nil {
+ return x.Permissions
+ }
+ return nil
+}
+
+// ExpCaveat is the representation of a caveat in the schema.
+type ExpCaveat struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // comment is a human-readable comments on the caveat. Will include
+ // delimiter characters.
+ Comment string `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"`
+ Parameters []*ExpCaveatParameter `protobuf:"bytes,3,rep,name=parameters,proto3" json:"parameters,omitempty"`
+ Expression string `protobuf:"bytes,4,opt,name=expression,proto3" json:"expression,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExpCaveat) Reset() {
+ *x = ExpCaveat{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExpCaveat) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExpCaveat) ProtoMessage() {}
+
+func (x *ExpCaveat) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[20]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExpCaveat.ProtoReflect.Descriptor instead.
+func (*ExpCaveat) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *ExpCaveat) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ExpCaveat) GetComment() string {
+ if x != nil {
+ return x.Comment
+ }
+ return ""
+}
+
+func (x *ExpCaveat) GetParameters() []*ExpCaveatParameter {
+ if x != nil {
+ return x.Parameters
+ }
+ return nil
+}
+
+func (x *ExpCaveat) GetExpression() string {
+ if x != nil {
+ return x.Expression
+ }
+ return ""
+}
+
+// ExpCaveatParameter is the representation of a parameter in a caveat.
+type ExpCaveatParameter struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // type is the type of the parameter. Will be a string representing the
+ // type, e.g. `int` or `list<string>`
+ Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
+ ParentCaveatName string `protobuf:"bytes,3,opt,name=parent_caveat_name,json=parentCaveatName,proto3" json:"parent_caveat_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExpCaveatParameter) Reset() {
+ *x = ExpCaveatParameter{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExpCaveatParameter) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExpCaveatParameter) ProtoMessage() {}
+
+func (x *ExpCaveatParameter) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[21]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExpCaveatParameter.ProtoReflect.Descriptor instead.
+func (*ExpCaveatParameter) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *ExpCaveatParameter) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ExpCaveatParameter) GetType() string {
+ if x != nil {
+ return x.Type
+ }
+ return ""
+}
+
+func (x *ExpCaveatParameter) GetParentCaveatName() string {
+ if x != nil {
+ return x.ParentCaveatName
+ }
+ return ""
+}
+
+// ExpRelation is the representation of a relation in the schema.
+type ExpRelation struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Comment string `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"`
+ ParentDefinitionName string `protobuf:"bytes,3,opt,name=parent_definition_name,json=parentDefinitionName,proto3" json:"parent_definition_name,omitempty"`
+ SubjectTypes []*ExpTypeReference `protobuf:"bytes,4,rep,name=subject_types,json=subjectTypes,proto3" json:"subject_types,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExpRelation) Reset() {
+ *x = ExpRelation{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExpRelation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExpRelation) ProtoMessage() {}
+
+func (x *ExpRelation) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[22]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExpRelation.ProtoReflect.Descriptor instead.
+func (*ExpRelation) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *ExpRelation) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ExpRelation) GetComment() string {
+ if x != nil {
+ return x.Comment
+ }
+ return ""
+}
+
+func (x *ExpRelation) GetParentDefinitionName() string {
+ if x != nil {
+ return x.ParentDefinitionName
+ }
+ return ""
+}
+
+func (x *ExpRelation) GetSubjectTypes() []*ExpTypeReference {
+ if x != nil {
+ return x.SubjectTypes
+ }
+ return nil
+}
+
+// ExpTypeReference is the representation of a type reference in the schema.
+type ExpTypeReference struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // subject_definition_name is the name of the subject's definition.
+ SubjectDefinitionName string `protobuf:"bytes,1,opt,name=subject_definition_name,json=subjectDefinitionName,proto3" json:"subject_definition_name,omitempty"`
+ // optional_caveat_name is the name of the caveat that is applied to the subject, if any.
+ OptionalCaveatName string `protobuf:"bytes,2,opt,name=optional_caveat_name,json=optionalCaveatName,proto3" json:"optional_caveat_name,omitempty"`
+ // Types that are valid to be assigned to Typeref:
+ //
+ // *ExpTypeReference_IsTerminalSubject
+ // *ExpTypeReference_OptionalRelationName
+ // *ExpTypeReference_IsPublicWildcard
+ Typeref isExpTypeReference_Typeref `protobuf_oneof:"typeref"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExpTypeReference) Reset() {
+ *x = ExpTypeReference{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExpTypeReference) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExpTypeReference) ProtoMessage() {}
+
+func (x *ExpTypeReference) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[23]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExpTypeReference.ProtoReflect.Descriptor instead.
+func (*ExpTypeReference) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *ExpTypeReference) GetSubjectDefinitionName() string {
+ if x != nil {
+ return x.SubjectDefinitionName
+ }
+ return ""
+}
+
+func (x *ExpTypeReference) GetOptionalCaveatName() string {
+ if x != nil {
+ return x.OptionalCaveatName
+ }
+ return ""
+}
+
+func (x *ExpTypeReference) GetTyperef() isExpTypeReference_Typeref {
+ if x != nil {
+ return x.Typeref
+ }
+ return nil
+}
+
+func (x *ExpTypeReference) GetIsTerminalSubject() bool {
+ if x != nil {
+ if x, ok := x.Typeref.(*ExpTypeReference_IsTerminalSubject); ok {
+ return x.IsTerminalSubject
+ }
+ }
+ return false
+}
+
+func (x *ExpTypeReference) GetOptionalRelationName() string {
+ if x != nil {
+ if x, ok := x.Typeref.(*ExpTypeReference_OptionalRelationName); ok {
+ return x.OptionalRelationName
+ }
+ }
+ return ""
+}
+
+func (x *ExpTypeReference) GetIsPublicWildcard() bool {
+ if x != nil {
+ if x, ok := x.Typeref.(*ExpTypeReference_IsPublicWildcard); ok {
+ return x.IsPublicWildcard
+ }
+ }
+ return false
+}
+
+type isExpTypeReference_Typeref interface {
+ isExpTypeReference_Typeref()
+}
+
+type ExpTypeReference_IsTerminalSubject struct {
+ // is_terminal_subject is true if the subject is terminal, meaning it is referenced directly vs a sub-relation.
+ IsTerminalSubject bool `protobuf:"varint,3,opt,name=is_terminal_subject,json=isTerminalSubject,proto3,oneof"`
+}
+
+type ExpTypeReference_OptionalRelationName struct {
+ // optional_relation_name is the name of the relation that is applied to the subject, if any.
+ OptionalRelationName string `protobuf:"bytes,4,opt,name=optional_relation_name,json=optionalRelationName,proto3,oneof"`
+}
+
+type ExpTypeReference_IsPublicWildcard struct {
+ // is_public_wildcard is true if the subject is a public wildcard.
+ IsPublicWildcard bool `protobuf:"varint,5,opt,name=is_public_wildcard,json=isPublicWildcard,proto3,oneof"`
+}
+
+func (*ExpTypeReference_IsTerminalSubject) isExpTypeReference_Typeref() {}
+
+func (*ExpTypeReference_OptionalRelationName) isExpTypeReference_Typeref() {}
+
+func (*ExpTypeReference_IsPublicWildcard) isExpTypeReference_Typeref() {}
+
+// ExpPermission is the representation of a permission in the schema.
+type ExpPermission struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // comment is a human-readable comments on the permission. Will include
+ // delimiter characters.
+ Comment string `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"`
+ ParentDefinitionName string `protobuf:"bytes,3,opt,name=parent_definition_name,json=parentDefinitionName,proto3" json:"parent_definition_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExpPermission) Reset() {
+ *x = ExpPermission{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExpPermission) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExpPermission) ProtoMessage() {}
+
+func (x *ExpPermission) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[24]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExpPermission.ProtoReflect.Descriptor instead.
+func (*ExpPermission) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *ExpPermission) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ExpPermission) GetComment() string {
+ if x != nil {
+ return x.Comment
+ }
+ return ""
+}
+
+func (x *ExpPermission) GetParentDefinitionName() string {
+ if x != nil {
+ return x.ParentDefinitionName
+ }
+ return ""
+}
+
+type ExperimentalComputablePermissionsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ DefinitionName string `protobuf:"bytes,2,opt,name=definition_name,json=definitionName,proto3" json:"definition_name,omitempty"`
+ RelationName string `protobuf:"bytes,3,opt,name=relation_name,json=relationName,proto3" json:"relation_name,omitempty"`
+ // optional_definition_name_match is a prefix that is matched against the definition name(s)
+ // for the permissions returned.
+ // If not specified, will be ignored.
+ OptionalDefinitionNameFilter string `protobuf:"bytes,4,opt,name=optional_definition_name_filter,json=optionalDefinitionNameFilter,proto3" json:"optional_definition_name_filter,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExperimentalComputablePermissionsRequest) Reset() {
+ *x = ExperimentalComputablePermissionsRequest{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExperimentalComputablePermissionsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExperimentalComputablePermissionsRequest) ProtoMessage() {}
+
+func (x *ExperimentalComputablePermissionsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[25]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExperimentalComputablePermissionsRequest.ProtoReflect.Descriptor instead.
+func (*ExperimentalComputablePermissionsRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{25}
+}
+
+func (x *ExperimentalComputablePermissionsRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+func (x *ExperimentalComputablePermissionsRequest) GetDefinitionName() string {
+ if x != nil {
+ return x.DefinitionName
+ }
+ return ""
+}
+
+func (x *ExperimentalComputablePermissionsRequest) GetRelationName() string {
+ if x != nil {
+ return x.RelationName
+ }
+ return ""
+}
+
+func (x *ExperimentalComputablePermissionsRequest) GetOptionalDefinitionNameFilter() string {
+ if x != nil {
+ return x.OptionalDefinitionNameFilter
+ }
+ return ""
+}
+
+// ExpRelationReference is a reference to a relation or permission in the schema.
+type ExpRelationReference struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ DefinitionName string `protobuf:"bytes,1,opt,name=definition_name,json=definitionName,proto3" json:"definition_name,omitempty"`
+ RelationName string `protobuf:"bytes,2,opt,name=relation_name,json=relationName,proto3" json:"relation_name,omitempty"`
+ IsPermission bool `protobuf:"varint,3,opt,name=is_permission,json=isPermission,proto3" json:"is_permission,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExpRelationReference) Reset() {
+ *x = ExpRelationReference{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExpRelationReference) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExpRelationReference) ProtoMessage() {}
+
+func (x *ExpRelationReference) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[26]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExpRelationReference.ProtoReflect.Descriptor instead.
+func (*ExpRelationReference) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{26}
+}
+
+func (x *ExpRelationReference) GetDefinitionName() string {
+ if x != nil {
+ return x.DefinitionName
+ }
+ return ""
+}
+
+func (x *ExpRelationReference) GetRelationName() string {
+ if x != nil {
+ return x.RelationName
+ }
+ return ""
+}
+
+func (x *ExpRelationReference) GetIsPermission() bool {
+ if x != nil {
+ return x.IsPermission
+ }
+ return false
+}
+
+type ExperimentalComputablePermissionsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Permissions []*ExpRelationReference `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"`
+ // read_at is the ZedToken at which the schema was read.
+ ReadAt *ZedToken `protobuf:"bytes,2,opt,name=read_at,json=readAt,proto3" json:"read_at,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExperimentalComputablePermissionsResponse) Reset() {
+ *x = ExperimentalComputablePermissionsResponse{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExperimentalComputablePermissionsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExperimentalComputablePermissionsResponse) ProtoMessage() {}
+
+func (x *ExperimentalComputablePermissionsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[27]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExperimentalComputablePermissionsResponse.ProtoReflect.Descriptor instead.
+func (*ExperimentalComputablePermissionsResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{27}
+}
+
+func (x *ExperimentalComputablePermissionsResponse) GetPermissions() []*ExpRelationReference {
+ if x != nil {
+ return x.Permissions
+ }
+ return nil
+}
+
+func (x *ExperimentalComputablePermissionsResponse) GetReadAt() *ZedToken {
+ if x != nil {
+ return x.ReadAt
+ }
+ return nil
+}
+
+type ExperimentalDependentRelationsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ DefinitionName string `protobuf:"bytes,2,opt,name=definition_name,json=definitionName,proto3" json:"definition_name,omitempty"`
+ PermissionName string `protobuf:"bytes,3,opt,name=permission_name,json=permissionName,proto3" json:"permission_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExperimentalDependentRelationsRequest) Reset() {
+ *x = ExperimentalDependentRelationsRequest{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExperimentalDependentRelationsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExperimentalDependentRelationsRequest) ProtoMessage() {}
+
+func (x *ExperimentalDependentRelationsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[28]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExperimentalDependentRelationsRequest.ProtoReflect.Descriptor instead.
+func (*ExperimentalDependentRelationsRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{28}
+}
+
+func (x *ExperimentalDependentRelationsRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+func (x *ExperimentalDependentRelationsRequest) GetDefinitionName() string {
+ if x != nil {
+ return x.DefinitionName
+ }
+ return ""
+}
+
+func (x *ExperimentalDependentRelationsRequest) GetPermissionName() string {
+ if x != nil {
+ return x.PermissionName
+ }
+ return ""
+}
+
+type ExperimentalDependentRelationsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Relations []*ExpRelationReference `protobuf:"bytes,1,rep,name=relations,proto3" json:"relations,omitempty"`
+ // read_at is the ZedToken at which the schema was read.
+ ReadAt *ZedToken `protobuf:"bytes,2,opt,name=read_at,json=readAt,proto3" json:"read_at,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExperimentalDependentRelationsResponse) Reset() {
+ *x = ExperimentalDependentRelationsResponse{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExperimentalDependentRelationsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExperimentalDependentRelationsResponse) ProtoMessage() {}
+
+func (x *ExperimentalDependentRelationsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[29]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExperimentalDependentRelationsResponse.ProtoReflect.Descriptor instead.
+func (*ExperimentalDependentRelationsResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{29}
+}
+
+func (x *ExperimentalDependentRelationsResponse) GetRelations() []*ExpRelationReference {
+ if x != nil {
+ return x.Relations
+ }
+ return nil
+}
+
+func (x *ExperimentalDependentRelationsResponse) GetReadAt() *ZedToken {
+ if x != nil {
+ return x.ReadAt
+ }
+ return nil
+}
+
+type ExperimentalDiffSchemaRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ ComparisonSchema string `protobuf:"bytes,2,opt,name=comparison_schema,json=comparisonSchema,proto3" json:"comparison_schema,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExperimentalDiffSchemaRequest) Reset() {
+ *x = ExperimentalDiffSchemaRequest{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[30]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExperimentalDiffSchemaRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExperimentalDiffSchemaRequest) ProtoMessage() {}
+
+func (x *ExperimentalDiffSchemaRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[30]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExperimentalDiffSchemaRequest.ProtoReflect.Descriptor instead.
+func (*ExperimentalDiffSchemaRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{30}
+}
+
+func (x *ExperimentalDiffSchemaRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+func (x *ExperimentalDiffSchemaRequest) GetComparisonSchema() string {
+ if x != nil {
+ return x.ComparisonSchema
+ }
+ return ""
+}
+
+type ExperimentalDiffSchemaResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diffs []*ExpSchemaDiff `protobuf:"bytes,1,rep,name=diffs,proto3" json:"diffs,omitempty"`
+ // read_at is the ZedToken at which the schema was read.
+ ReadAt *ZedToken `protobuf:"bytes,2,opt,name=read_at,json=readAt,proto3" json:"read_at,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExperimentalDiffSchemaResponse) Reset() {
+ *x = ExperimentalDiffSchemaResponse{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[31]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExperimentalDiffSchemaResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExperimentalDiffSchemaResponse) ProtoMessage() {}
+
+func (x *ExperimentalDiffSchemaResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[31]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExperimentalDiffSchemaResponse.ProtoReflect.Descriptor instead.
+func (*ExperimentalDiffSchemaResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{31}
+}
+
+func (x *ExperimentalDiffSchemaResponse) GetDiffs() []*ExpSchemaDiff {
+ if x != nil {
+ return x.Diffs
+ }
+ return nil
+}
+
+func (x *ExperimentalDiffSchemaResponse) GetReadAt() *ZedToken {
+ if x != nil {
+ return x.ReadAt
+ }
+ return nil
+}
+
+type ExpRelationSubjectTypeChange struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Relation *ExpRelation `protobuf:"bytes,1,opt,name=relation,proto3" json:"relation,omitempty"`
+ ChangedSubjectType *ExpTypeReference `protobuf:"bytes,2,opt,name=changed_subject_type,json=changedSubjectType,proto3" json:"changed_subject_type,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExpRelationSubjectTypeChange) Reset() {
+ *x = ExpRelationSubjectTypeChange{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[32]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExpRelationSubjectTypeChange) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExpRelationSubjectTypeChange) ProtoMessage() {}
+
+func (x *ExpRelationSubjectTypeChange) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[32]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExpRelationSubjectTypeChange.ProtoReflect.Descriptor instead.
+func (*ExpRelationSubjectTypeChange) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{32}
+}
+
+func (x *ExpRelationSubjectTypeChange) GetRelation() *ExpRelation {
+ if x != nil {
+ return x.Relation
+ }
+ return nil
+}
+
+func (x *ExpRelationSubjectTypeChange) GetChangedSubjectType() *ExpTypeReference {
+ if x != nil {
+ return x.ChangedSubjectType
+ }
+ return nil
+}
+
+type ExpCaveatParameterTypeChange struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Parameter *ExpCaveatParameter `protobuf:"bytes,1,opt,name=parameter,proto3" json:"parameter,omitempty"`
+ PreviousType string `protobuf:"bytes,2,opt,name=previous_type,json=previousType,proto3" json:"previous_type,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExpCaveatParameterTypeChange) Reset() {
+ *x = ExpCaveatParameterTypeChange{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[33]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExpCaveatParameterTypeChange) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExpCaveatParameterTypeChange) ProtoMessage() {}
+
+func (x *ExpCaveatParameterTypeChange) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[33]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExpCaveatParameterTypeChange.ProtoReflect.Descriptor instead.
+func (*ExpCaveatParameterTypeChange) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{33}
+}
+
+func (x *ExpCaveatParameterTypeChange) GetParameter() *ExpCaveatParameter {
+ if x != nil {
+ return x.Parameter
+ }
+ return nil
+}
+
+func (x *ExpCaveatParameterTypeChange) GetPreviousType() string {
+ if x != nil {
+ return x.PreviousType
+ }
+ return ""
+}
+
+// ExpSchemaDiff is the representation of a diff between two schemas.
+type ExpSchemaDiff struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Types that are valid to be assigned to Diff:
+ //
+ // *ExpSchemaDiff_DefinitionAdded
+ // *ExpSchemaDiff_DefinitionRemoved
+ // *ExpSchemaDiff_DefinitionDocCommentChanged
+ // *ExpSchemaDiff_RelationAdded
+ // *ExpSchemaDiff_RelationRemoved
+ // *ExpSchemaDiff_RelationDocCommentChanged
+ // *ExpSchemaDiff_RelationSubjectTypeAdded
+ // *ExpSchemaDiff_RelationSubjectTypeRemoved
+ // *ExpSchemaDiff_PermissionAdded
+ // *ExpSchemaDiff_PermissionRemoved
+ // *ExpSchemaDiff_PermissionDocCommentChanged
+ // *ExpSchemaDiff_PermissionExprChanged
+ // *ExpSchemaDiff_CaveatAdded
+ // *ExpSchemaDiff_CaveatRemoved
+ // *ExpSchemaDiff_CaveatDocCommentChanged
+ // *ExpSchemaDiff_CaveatExprChanged
+ // *ExpSchemaDiff_CaveatParameterAdded
+ // *ExpSchemaDiff_CaveatParameterRemoved
+ // *ExpSchemaDiff_CaveatParameterTypeChanged
+ Diff isExpSchemaDiff_Diff `protobuf_oneof:"diff"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExpSchemaDiff) Reset() {
+ *x = ExpSchemaDiff{}
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[34]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExpSchemaDiff) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExpSchemaDiff) ProtoMessage() {}
+
+func (x *ExpSchemaDiff) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_experimental_service_proto_msgTypes[34]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExpSchemaDiff.ProtoReflect.Descriptor instead.
+func (*ExpSchemaDiff) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_experimental_service_proto_rawDescGZIP(), []int{34}
+}
+
+func (x *ExpSchemaDiff) GetDiff() isExpSchemaDiff_Diff {
+ if x != nil {
+ return x.Diff
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetDefinitionAdded() *ExpDefinition {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_DefinitionAdded); ok {
+ return x.DefinitionAdded
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetDefinitionRemoved() *ExpDefinition {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_DefinitionRemoved); ok {
+ return x.DefinitionRemoved
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetDefinitionDocCommentChanged() *ExpDefinition {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_DefinitionDocCommentChanged); ok {
+ return x.DefinitionDocCommentChanged
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetRelationAdded() *ExpRelation {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_RelationAdded); ok {
+ return x.RelationAdded
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetRelationRemoved() *ExpRelation {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_RelationRemoved); ok {
+ return x.RelationRemoved
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetRelationDocCommentChanged() *ExpRelation {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_RelationDocCommentChanged); ok {
+ return x.RelationDocCommentChanged
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetRelationSubjectTypeAdded() *ExpRelationSubjectTypeChange {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_RelationSubjectTypeAdded); ok {
+ return x.RelationSubjectTypeAdded
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetRelationSubjectTypeRemoved() *ExpRelationSubjectTypeChange {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_RelationSubjectTypeRemoved); ok {
+ return x.RelationSubjectTypeRemoved
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetPermissionAdded() *ExpPermission {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_PermissionAdded); ok {
+ return x.PermissionAdded
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetPermissionRemoved() *ExpPermission {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_PermissionRemoved); ok {
+ return x.PermissionRemoved
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetPermissionDocCommentChanged() *ExpPermission {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_PermissionDocCommentChanged); ok {
+ return x.PermissionDocCommentChanged
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetPermissionExprChanged() *ExpPermission {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_PermissionExprChanged); ok {
+ return x.PermissionExprChanged
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetCaveatAdded() *ExpCaveat {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_CaveatAdded); ok {
+ return x.CaveatAdded
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetCaveatRemoved() *ExpCaveat {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_CaveatRemoved); ok {
+ return x.CaveatRemoved
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetCaveatDocCommentChanged() *ExpCaveat {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_CaveatDocCommentChanged); ok {
+ return x.CaveatDocCommentChanged
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetCaveatExprChanged() *ExpCaveat {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_CaveatExprChanged); ok {
+ return x.CaveatExprChanged
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetCaveatParameterAdded() *ExpCaveatParameter {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_CaveatParameterAdded); ok {
+ return x.CaveatParameterAdded
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetCaveatParameterRemoved() *ExpCaveatParameter {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_CaveatParameterRemoved); ok {
+ return x.CaveatParameterRemoved
+ }
+ }
+ return nil
+}
+
+func (x *ExpSchemaDiff) GetCaveatParameterTypeChanged() *ExpCaveatParameterTypeChange {
+ if x != nil {
+ if x, ok := x.Diff.(*ExpSchemaDiff_CaveatParameterTypeChanged); ok {
+ return x.CaveatParameterTypeChanged
+ }
+ }
+ return nil
+}
+
+type isExpSchemaDiff_Diff interface {
+ isExpSchemaDiff_Diff()
+}
+
+type ExpSchemaDiff_DefinitionAdded struct {
+ DefinitionAdded *ExpDefinition `protobuf:"bytes,1,opt,name=definition_added,json=definitionAdded,proto3,oneof"`
+}
+
+type ExpSchemaDiff_DefinitionRemoved struct {
+ DefinitionRemoved *ExpDefinition `protobuf:"bytes,2,opt,name=definition_removed,json=definitionRemoved,proto3,oneof"`
+}
+
+type ExpSchemaDiff_DefinitionDocCommentChanged struct {
+ DefinitionDocCommentChanged *ExpDefinition `protobuf:"bytes,3,opt,name=definition_doc_comment_changed,json=definitionDocCommentChanged,proto3,oneof"`
+}
+
+type ExpSchemaDiff_RelationAdded struct {
+ RelationAdded *ExpRelation `protobuf:"bytes,4,opt,name=relation_added,json=relationAdded,proto3,oneof"`
+}
+
+type ExpSchemaDiff_RelationRemoved struct {
+ RelationRemoved *ExpRelation `protobuf:"bytes,5,opt,name=relation_removed,json=relationRemoved,proto3,oneof"`
+}
+
+type ExpSchemaDiff_RelationDocCommentChanged struct {
+ RelationDocCommentChanged *ExpRelation `protobuf:"bytes,6,opt,name=relation_doc_comment_changed,json=relationDocCommentChanged,proto3,oneof"`
+}
+
+type ExpSchemaDiff_RelationSubjectTypeAdded struct {
+ RelationSubjectTypeAdded *ExpRelationSubjectTypeChange `protobuf:"bytes,7,opt,name=relation_subject_type_added,json=relationSubjectTypeAdded,proto3,oneof"`
+}
+
+type ExpSchemaDiff_RelationSubjectTypeRemoved struct {
+ RelationSubjectTypeRemoved *ExpRelationSubjectTypeChange `protobuf:"bytes,8,opt,name=relation_subject_type_removed,json=relationSubjectTypeRemoved,proto3,oneof"`
+}
+
+type ExpSchemaDiff_PermissionAdded struct {
+ PermissionAdded *ExpPermission `protobuf:"bytes,9,opt,name=permission_added,json=permissionAdded,proto3,oneof"`
+}
+
+type ExpSchemaDiff_PermissionRemoved struct {
+ PermissionRemoved *ExpPermission `protobuf:"bytes,10,opt,name=permission_removed,json=permissionRemoved,proto3,oneof"`
+}
+
+type ExpSchemaDiff_PermissionDocCommentChanged struct {
+ PermissionDocCommentChanged *ExpPermission `protobuf:"bytes,11,opt,name=permission_doc_comment_changed,json=permissionDocCommentChanged,proto3,oneof"`
+}
+
+type ExpSchemaDiff_PermissionExprChanged struct {
+ PermissionExprChanged *ExpPermission `protobuf:"bytes,12,opt,name=permission_expr_changed,json=permissionExprChanged,proto3,oneof"`
+}
+
+type ExpSchemaDiff_CaveatAdded struct {
+ CaveatAdded *ExpCaveat `protobuf:"bytes,13,opt,name=caveat_added,json=caveatAdded,proto3,oneof"`
+}
+
+type ExpSchemaDiff_CaveatRemoved struct {
+ CaveatRemoved *ExpCaveat `protobuf:"bytes,14,opt,name=caveat_removed,json=caveatRemoved,proto3,oneof"`
+}
+
+type ExpSchemaDiff_CaveatDocCommentChanged struct {
+ CaveatDocCommentChanged *ExpCaveat `protobuf:"bytes,15,opt,name=caveat_doc_comment_changed,json=caveatDocCommentChanged,proto3,oneof"`
+}
+
+type ExpSchemaDiff_CaveatExprChanged struct {
+ CaveatExprChanged *ExpCaveat `protobuf:"bytes,16,opt,name=caveat_expr_changed,json=caveatExprChanged,proto3,oneof"`
+}
+
+type ExpSchemaDiff_CaveatParameterAdded struct {
+ CaveatParameterAdded *ExpCaveatParameter `protobuf:"bytes,17,opt,name=caveat_parameter_added,json=caveatParameterAdded,proto3,oneof"`
+}
+
+type ExpSchemaDiff_CaveatParameterRemoved struct {
+ CaveatParameterRemoved *ExpCaveatParameter `protobuf:"bytes,18,opt,name=caveat_parameter_removed,json=caveatParameterRemoved,proto3,oneof"`
+}
+
+type ExpSchemaDiff_CaveatParameterTypeChanged struct {
+ CaveatParameterTypeChanged *ExpCaveatParameterTypeChange `protobuf:"bytes,19,opt,name=caveat_parameter_type_changed,json=caveatParameterTypeChanged,proto3,oneof"`
+}
+
+func (*ExpSchemaDiff_DefinitionAdded) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_DefinitionRemoved) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_DefinitionDocCommentChanged) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_RelationAdded) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_RelationRemoved) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_RelationDocCommentChanged) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_RelationSubjectTypeAdded) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_RelationSubjectTypeRemoved) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_PermissionAdded) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_PermissionRemoved) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_PermissionDocCommentChanged) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_PermissionExprChanged) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_CaveatAdded) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_CaveatRemoved) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_CaveatDocCommentChanged) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_CaveatExprChanged) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_CaveatParameterAdded) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_CaveatParameterRemoved) isExpSchemaDiff_Diff() {}
+
+func (*ExpSchemaDiff_CaveatParameterTypeChanged) isExpSchemaDiff_Diff() {}
+
+var File_authzed_api_v1_experimental_service_proto protoreflect.FileDescriptor
+
+const file_authzed_api_v1_experimental_service_proto_rawDesc = "" +
+ "\n" +
+ ")authzed/api/v1/experimental_service.proto\x12\x0eauthzed.api.v1\x1a\x19authzed/api/v1/core.proto\x1a'authzed/api/v1/permission_service.proto\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x17validate/validate.proto\"\xff\x01\n" +
+ ".ExperimentalRegisterRelationshipCounterRequest\x12h\n" +
+ "\x04name\x18\x01 \x01(\tBT\xfaB'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\xbaH'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x04name\x12c\n" +
+ "\x13relationship_filter\x18\x02 \x01(\v2\".authzed.api.v1.RelationshipFilterB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\x12relationshipFilter\"1\n" +
+ "/ExperimentalRegisterRelationshipCounterResponse\"\x91\x01\n" +
+ "%ExperimentalCountRelationshipsRequest\x12h\n" +
+ "\x04name\x18\x01 \x01(\tBT\xfaB'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\xbaH'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x04name\"\xca\x01\n" +
+ "&ExperimentalCountRelationshipsResponse\x12<\n" +
+ "\x19counter_still_calculating\x18\x01 \x01(\bH\x00R\x17counterStillCalculating\x12P\n" +
+ "\x12read_counter_value\x18\x02 \x01(\v2 .authzed.api.v1.ReadCounterValueH\x00R\x10readCounterValueB\x10\n" +
+ "\x0ecounter_result\"\x84\x01\n" +
+ "\x10ReadCounterValue\x12-\n" +
+ "\x12relationship_count\x18\x01 \x01(\x04R\x11relationshipCount\x12A\n" +
+ "\aread_at\x18\x02 \x01(\v2\x18.authzed.api.v1.ZedTokenB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\x06readAt\"\x9c\x01\n" +
+ "0ExperimentalUnregisterRelationshipCounterRequest\x12h\n" +
+ "\x04name\x18\x01 \x01(\tBT\xfaB'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\xbaH'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x04name\"3\n" +
+ "1ExperimentalUnregisterRelationshipCounterResponse\"\xbd\x01\n" +
+ "\x1aBulkCheckPermissionRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x12`\n" +
+ "\x05items\x18\x02 \x03(\v2..authzed.api.v1.BulkCheckPermissionRequestItemB\x1a\xfaB\n" +
+ "\x92\x01\a\"\x05\x8a\x01\x02\x10\x01\xbaH\b\x92\x01\x05\"\x03\xc8\x01\x01\x18\x01R\x05items\"\xf2\x02\n" +
+ "\x1eBulkCheckPermissionRequestItem\x12K\n" +
+ "\bresource\x18\x01 \x01(\v2\x1f.authzed.api.v1.ObjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\bresource\x12t\n" +
+ "\n" +
+ "permission\x18\x02 \x01(\tBT\xfaB'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\xbaH'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\n" +
+ "permission\x12J\n" +
+ "\asubject\x18\x03 \x01(\v2 .authzed.api.v1.SubjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\asubject\x12A\n" +
+ "\acontext\x18\x04 \x01(\v2\x17.google.protobuf.StructB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\acontext\"\xbf\x01\n" +
+ "\x1bBulkCheckPermissionResponse\x12G\n" +
+ "\n" +
+ "checked_at\x18\x01 \x01(\v2\x18.authzed.api.v1.ZedTokenB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\tcheckedAt\x12W\n" +
+ "\x05pairs\x18\x02 \x03(\v2'.authzed.api.v1.BulkCheckPermissionPairB\x18\xfaB\n" +
+ "\x92\x01\a\"\x05\x8a\x01\x02\x10\x01\xbaH\b\x92\x01\x05\"\x03\xc8\x01\x01R\x05pairs\"\xe2\x01\n" +
+ "\x17BulkCheckPermissionPair\x12H\n" +
+ "\arequest\x18\x01 \x01(\v2..authzed.api.v1.BulkCheckPermissionRequestItemR\arequest\x12E\n" +
+ "\x04item\x18\x02 \x01(\v2/.authzed.api.v1.BulkCheckPermissionResponseItemH\x00R\x04item\x12*\n" +
+ "\x05error\x18\x03 \x01(\v2\x12.google.rpc.StatusH\x00R\x05errorB\n" +
+ "\n" +
+ "\bresponse\"\xfa\x01\n" +
+ "\x1fBulkCheckPermissionResponseItem\x12t\n" +
+ "\x0epermissionship\x18\x01 \x01(\x0e26.authzed.api.v1.CheckPermissionResponse.PermissionshipB\x14\xfaB\a\x82\x01\x04\x10\x01 \x00\xbaH\a\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12a\n" +
+ "\x13partial_caveat_info\x18\x02 \x01(\v2!.authzed.api.v1.PartialCaveatInfoB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\x11partialCaveatInfo\"~\n" +
+ "\x1eBulkImportRelationshipsRequest\x12\\\n" +
+ "\rrelationships\x18\x01 \x03(\v2\x1c.authzed.api.v1.RelationshipB\x18\xfaB\n" +
+ "\x92\x01\a\"\x05\x8a\x01\x02\x10\x01\xbaH\b\x92\x01\x05\"\x03\xc8\x01\x01R\rrelationships\"@\n" +
+ "\x1fBulkImportRelationshipsResponse\x12\x1d\n" +
+ "\n" +
+ "num_loaded\x18\x01 \x01(\x04R\tnumLoaded\"\xbd\x02\n" +
+ "\x1eBulkExportRelationshipsRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x125\n" +
+ "\x0eoptional_limit\x18\x02 \x01(\rB\x0e\xfaB\x04*\x02(\x00\xbaH\x04*\x02(\x00R\roptionalLimit\x12?\n" +
+ "\x0foptional_cursor\x18\x03 \x01(\v2\x16.authzed.api.v1.CursorR\x0eoptionalCursor\x12d\n" +
+ "\x1coptional_relationship_filter\x18\x04 \x01(\v2\".authzed.api.v1.RelationshipFilterR\x1aoptionalRelationshipFilter\"\xad\x01\n" +
+ "\x1fBulkExportRelationshipsResponse\x12F\n" +
+ "\x13after_result_cursor\x18\x01 \x01(\v2\x16.authzed.api.v1.CursorR\x11afterResultCursor\x12B\n" +
+ "\rrelationships\x18\x02 \x03(\v2\x1c.authzed.api.v1.RelationshipR\rrelationships\"\xad\x01\n" +
+ " ExperimentalReflectSchemaRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x12J\n" +
+ "\x10optional_filters\x18\x02 \x03(\v2\x1f.authzed.api.v1.ExpSchemaFilterR\x0foptionalFilters\"\xcc\x01\n" +
+ "!ExperimentalReflectSchemaResponse\x12?\n" +
+ "\vdefinitions\x18\x01 \x03(\v2\x1d.authzed.api.v1.ExpDefinitionR\vdefinitions\x123\n" +
+ "\acaveats\x18\x02 \x03(\v2\x19.authzed.api.v1.ExpCaveatR\acaveats\x121\n" +
+ "\aread_at\x18\x03 \x01(\v2\x18.authzed.api.v1.ZedTokenR\x06readAt\"\xa1\x02\n" +
+ "\x0fExpSchemaFilter\x12E\n" +
+ "\x1foptional_definition_name_filter\x18\x01 \x01(\tR\x1coptionalDefinitionNameFilter\x12=\n" +
+ "\x1boptional_caveat_name_filter\x18\x02 \x01(\tR\x18optionalCaveatNameFilter\x12A\n" +
+ "\x1doptional_relation_name_filter\x18\x03 \x01(\tR\x1aoptionalRelationNameFilter\x12E\n" +
+ "\x1foptional_permission_name_filter\x18\x04 \x01(\tR\x1coptionalPermissionNameFilter\"\xb9\x01\n" +
+ "\rExpDefinition\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" +
+ "\acomment\x18\x02 \x01(\tR\acomment\x129\n" +
+ "\trelations\x18\x03 \x03(\v2\x1b.authzed.api.v1.ExpRelationR\trelations\x12?\n" +
+ "\vpermissions\x18\x04 \x03(\v2\x1d.authzed.api.v1.ExpPermissionR\vpermissions\"\x9d\x01\n" +
+ "\tExpCaveat\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" +
+ "\acomment\x18\x02 \x01(\tR\acomment\x12B\n" +
+ "\n" +
+ "parameters\x18\x03 \x03(\v2\".authzed.api.v1.ExpCaveatParameterR\n" +
+ "parameters\x12\x1e\n" +
+ "\n" +
+ "expression\x18\x04 \x01(\tR\n" +
+ "expression\"j\n" +
+ "\x12ExpCaveatParameter\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
+ "\x04type\x18\x02 \x01(\tR\x04type\x12,\n" +
+ "\x12parent_caveat_name\x18\x03 \x01(\tR\x10parentCaveatName\"\xb8\x01\n" +
+ "\vExpRelation\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" +
+ "\acomment\x18\x02 \x01(\tR\acomment\x124\n" +
+ "\x16parent_definition_name\x18\x03 \x01(\tR\x14parentDefinitionName\x12E\n" +
+ "\rsubject_types\x18\x04 \x03(\v2 .authzed.api.v1.ExpTypeReferenceR\fsubjectTypes\"\xa1\x02\n" +
+ "\x10ExpTypeReference\x126\n" +
+ "\x17subject_definition_name\x18\x01 \x01(\tR\x15subjectDefinitionName\x120\n" +
+ "\x14optional_caveat_name\x18\x02 \x01(\tR\x12optionalCaveatName\x120\n" +
+ "\x13is_terminal_subject\x18\x03 \x01(\bH\x00R\x11isTerminalSubject\x126\n" +
+ "\x16optional_relation_name\x18\x04 \x01(\tH\x00R\x14optionalRelationName\x12.\n" +
+ "\x12is_public_wildcard\x18\x05 \x01(\bH\x00R\x10isPublicWildcardB\t\n" +
+ "\atyperef\"s\n" +
+ "\rExpPermission\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" +
+ "\acomment\x18\x02 \x01(\tR\acomment\x124\n" +
+ "\x16parent_definition_name\x18\x03 \x01(\tR\x14parentDefinitionName\"\xfe\x01\n" +
+ "(ExperimentalComputablePermissionsRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x12'\n" +
+ "\x0fdefinition_name\x18\x02 \x01(\tR\x0edefinitionName\x12#\n" +
+ "\rrelation_name\x18\x03 \x01(\tR\frelationName\x12E\n" +
+ "\x1foptional_definition_name_filter\x18\x04 \x01(\tR\x1coptionalDefinitionNameFilter\"\x89\x01\n" +
+ "\x14ExpRelationReference\x12'\n" +
+ "\x0fdefinition_name\x18\x01 \x01(\tR\x0edefinitionName\x12#\n" +
+ "\rrelation_name\x18\x02 \x01(\tR\frelationName\x12#\n" +
+ "\ris_permission\x18\x03 \x01(\bR\fisPermission\"\xa6\x01\n" +
+ ")ExperimentalComputablePermissionsResponse\x12F\n" +
+ "\vpermissions\x18\x01 \x03(\v2$.authzed.api.v1.ExpRelationReferenceR\vpermissions\x121\n" +
+ "\aread_at\x18\x02 \x01(\v2\x18.authzed.api.v1.ZedTokenR\x06readAt\"\xb8\x01\n" +
+ "%ExperimentalDependentRelationsRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x12'\n" +
+ "\x0fdefinition_name\x18\x02 \x01(\tR\x0edefinitionName\x12'\n" +
+ "\x0fpermission_name\x18\x03 \x01(\tR\x0epermissionName\"\x9f\x01\n" +
+ "&ExperimentalDependentRelationsResponse\x12B\n" +
+ "\trelations\x18\x01 \x03(\v2$.authzed.api.v1.ExpRelationReferenceR\trelations\x121\n" +
+ "\aread_at\x18\x02 \x01(\v2\x18.authzed.api.v1.ZedTokenR\x06readAt\"\x8b\x01\n" +
+ "\x1dExperimentalDiffSchemaRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x12+\n" +
+ "\x11comparison_schema\x18\x02 \x01(\tR\x10comparisonSchema\"\x88\x01\n" +
+ "\x1eExperimentalDiffSchemaResponse\x123\n" +
+ "\x05diffs\x18\x01 \x03(\v2\x1d.authzed.api.v1.ExpSchemaDiffR\x05diffs\x121\n" +
+ "\aread_at\x18\x02 \x01(\v2\x18.authzed.api.v1.ZedTokenR\x06readAt\"\xab\x01\n" +
+ "\x1cExpRelationSubjectTypeChange\x127\n" +
+ "\brelation\x18\x01 \x01(\v2\x1b.authzed.api.v1.ExpRelationR\brelation\x12R\n" +
+ "\x14changed_subject_type\x18\x02 \x01(\v2 .authzed.api.v1.ExpTypeReferenceR\x12changedSubjectType\"\x85\x01\n" +
+ "\x1cExpCaveatParameterTypeChange\x12@\n" +
+ "\tparameter\x18\x01 \x01(\v2\".authzed.api.v1.ExpCaveatParameterR\tparameter\x12#\n" +
+ "\rprevious_type\x18\x02 \x01(\tR\fpreviousType\"\xa0\r\n" +
+ "\rExpSchemaDiff\x12J\n" +
+ "\x10definition_added\x18\x01 \x01(\v2\x1d.authzed.api.v1.ExpDefinitionH\x00R\x0fdefinitionAdded\x12N\n" +
+ "\x12definition_removed\x18\x02 \x01(\v2\x1d.authzed.api.v1.ExpDefinitionH\x00R\x11definitionRemoved\x12d\n" +
+ "\x1edefinition_doc_comment_changed\x18\x03 \x01(\v2\x1d.authzed.api.v1.ExpDefinitionH\x00R\x1bdefinitionDocCommentChanged\x12D\n" +
+ "\x0erelation_added\x18\x04 \x01(\v2\x1b.authzed.api.v1.ExpRelationH\x00R\rrelationAdded\x12H\n" +
+ "\x10relation_removed\x18\x05 \x01(\v2\x1b.authzed.api.v1.ExpRelationH\x00R\x0frelationRemoved\x12^\n" +
+ "\x1crelation_doc_comment_changed\x18\x06 \x01(\v2\x1b.authzed.api.v1.ExpRelationH\x00R\x19relationDocCommentChanged\x12m\n" +
+ "\x1brelation_subject_type_added\x18\a \x01(\v2,.authzed.api.v1.ExpRelationSubjectTypeChangeH\x00R\x18relationSubjectTypeAdded\x12q\n" +
+ "\x1drelation_subject_type_removed\x18\b \x01(\v2,.authzed.api.v1.ExpRelationSubjectTypeChangeH\x00R\x1arelationSubjectTypeRemoved\x12J\n" +
+ "\x10permission_added\x18\t \x01(\v2\x1d.authzed.api.v1.ExpPermissionH\x00R\x0fpermissionAdded\x12N\n" +
+ "\x12permission_removed\x18\n" +
+ " \x01(\v2\x1d.authzed.api.v1.ExpPermissionH\x00R\x11permissionRemoved\x12d\n" +
+ "\x1epermission_doc_comment_changed\x18\v \x01(\v2\x1d.authzed.api.v1.ExpPermissionH\x00R\x1bpermissionDocCommentChanged\x12W\n" +
+ "\x17permission_expr_changed\x18\f \x01(\v2\x1d.authzed.api.v1.ExpPermissionH\x00R\x15permissionExprChanged\x12>\n" +
+ "\fcaveat_added\x18\r \x01(\v2\x19.authzed.api.v1.ExpCaveatH\x00R\vcaveatAdded\x12B\n" +
+ "\x0ecaveat_removed\x18\x0e \x01(\v2\x19.authzed.api.v1.ExpCaveatH\x00R\rcaveatRemoved\x12X\n" +
+ "\x1acaveat_doc_comment_changed\x18\x0f \x01(\v2\x19.authzed.api.v1.ExpCaveatH\x00R\x17caveatDocCommentChanged\x12K\n" +
+ "\x13caveat_expr_changed\x18\x10 \x01(\v2\x19.authzed.api.v1.ExpCaveatH\x00R\x11caveatExprChanged\x12Z\n" +
+ "\x16caveat_parameter_added\x18\x11 \x01(\v2\".authzed.api.v1.ExpCaveatParameterH\x00R\x14caveatParameterAdded\x12^\n" +
+ "\x18caveat_parameter_removed\x18\x12 \x01(\v2\".authzed.api.v1.ExpCaveatParameterH\x00R\x16caveatParameterRemoved\x12q\n" +
+ "\x1dcaveat_parameter_type_changed\x18\x13 \x01(\v2,.authzed.api.v1.ExpCaveatParameterTypeChangeH\x00R\x1acaveatParameterTypeChangedB\x06\n" +
+ "\x04diff2\xb6\x0f\n" +
+ "\x13ExperimentalService\x12\xb2\x01\n" +
+ "\x17BulkImportRelationships\x12..authzed.api.v1.BulkImportRelationshipsRequest\x1a/.authzed.api.v1.BulkImportRelationshipsResponse\"4\x82\xd3\xe4\x93\x02.:\x01*\")/v1/experimental/relationships/bulkimport(\x01\x12\xb2\x01\n" +
+ "\x17BulkExportRelationships\x12..authzed.api.v1.BulkExportRelationshipsRequest\x1a/.authzed.api.v1.BulkExportRelationshipsResponse\"4\x82\xd3\xe4\x93\x02.:\x01*\")/v1/experimental/relationships/bulkexport0\x01\x12\xae\x01\n" +
+ "\x13BulkCheckPermission\x12*.authzed.api.v1.BulkCheckPermissionRequest\x1a+.authzed.api.v1.BulkCheckPermissionResponse\">\x82\xd3\xe4\x93\x025:\x01*\"0/v1/experimental/permissions/bulkcheckpermission\x88\x02\x01\x12\xae\x01\n" +
+ "\x19ExperimentalReflectSchema\x120.authzed.api.v1.ExperimentalReflectSchemaRequest\x1a1.authzed.api.v1.ExperimentalReflectSchemaResponse\",\x82\xd3\xe4\x93\x02#:\x01*\"\x1e/v1/experimental/reflectschema\x88\x02\x01\x12\xcf\x01\n" +
+ "!ExperimentalComputablePermissions\x128.authzed.api.v1.ExperimentalComputablePermissionsRequest\x1a9.authzed.api.v1.ExperimentalComputablePermissionsResponse\"5\x82\xd3\xe4\x93\x02,:\x01*\"'/v1/experimental/permissions/computable\x88\x02\x01\x12\xc5\x01\n" +
+ "\x1eExperimentalDependentRelations\x125.authzed.api.v1.ExperimentalDependentRelationsRequest\x1a6.authzed.api.v1.ExperimentalDependentRelationsResponse\"4\x82\xd3\xe4\x93\x02+:\x01*\"&/v1/experimental/permissions/dependent\x88\x02\x01\x12\xa2\x01\n" +
+ "\x16ExperimentalDiffSchema\x12-.authzed.api.v1.ExperimentalDiffSchemaRequest\x1a..authzed.api.v1.ExperimentalDiffSchemaResponse\")\x82\xd3\xe4\x93\x02 :\x01*\"\x1b/v1/experimental/diffschema\x88\x02\x01\x12\xe3\x01\n" +
+ "'ExperimentalRegisterRelationshipCounter\x12>.authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest\x1a?.authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse\"7\x82\xd3\xe4\x93\x021:\x01*\",/v1/experimental/registerrelationshipcounter\x12\xbf\x01\n" +
+ "\x1eExperimentalCountRelationships\x125.authzed.api.v1.ExperimentalCountRelationshipsRequest\x1a6.authzed.api.v1.ExperimentalCountRelationshipsResponse\".\x82\xd3\xe4\x93\x02(:\x01*\"#/v1/experimental/countrelationships\x12\xeb\x01\n" +
+ ")ExperimentalUnregisterRelationshipCounter\x12@.authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest\x1aA.authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse\"9\x82\xd3\xe4\x93\x023:\x01*\"./v1/experimental/unregisterrelationshipcounterBJ\n" +
+ "\x12com.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
+
+var (
+ file_authzed_api_v1_experimental_service_proto_rawDescOnce sync.Once
+ file_authzed_api_v1_experimental_service_proto_rawDescData []byte
+)
+
+func file_authzed_api_v1_experimental_service_proto_rawDescGZIP() []byte {
+ file_authzed_api_v1_experimental_service_proto_rawDescOnce.Do(func() {
+ file_authzed_api_v1_experimental_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authzed_api_v1_experimental_service_proto_rawDesc), len(file_authzed_api_v1_experimental_service_proto_rawDesc)))
+ })
+ return file_authzed_api_v1_experimental_service_proto_rawDescData
+}
+
+var file_authzed_api_v1_experimental_service_proto_msgTypes = make([]protoimpl.MessageInfo, 35)
+var file_authzed_api_v1_experimental_service_proto_goTypes = []any{
+ (*ExperimentalRegisterRelationshipCounterRequest)(nil), // 0: authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest
+ (*ExperimentalRegisterRelationshipCounterResponse)(nil), // 1: authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse
+ (*ExperimentalCountRelationshipsRequest)(nil), // 2: authzed.api.v1.ExperimentalCountRelationshipsRequest
+ (*ExperimentalCountRelationshipsResponse)(nil), // 3: authzed.api.v1.ExperimentalCountRelationshipsResponse
+ (*ReadCounterValue)(nil), // 4: authzed.api.v1.ReadCounterValue
+ (*ExperimentalUnregisterRelationshipCounterRequest)(nil), // 5: authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest
+ (*ExperimentalUnregisterRelationshipCounterResponse)(nil), // 6: authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse
+ (*BulkCheckPermissionRequest)(nil), // 7: authzed.api.v1.BulkCheckPermissionRequest
+ (*BulkCheckPermissionRequestItem)(nil), // 8: authzed.api.v1.BulkCheckPermissionRequestItem
+ (*BulkCheckPermissionResponse)(nil), // 9: authzed.api.v1.BulkCheckPermissionResponse
+ (*BulkCheckPermissionPair)(nil), // 10: authzed.api.v1.BulkCheckPermissionPair
+ (*BulkCheckPermissionResponseItem)(nil), // 11: authzed.api.v1.BulkCheckPermissionResponseItem
+ (*BulkImportRelationshipsRequest)(nil), // 12: authzed.api.v1.BulkImportRelationshipsRequest
+ (*BulkImportRelationshipsResponse)(nil), // 13: authzed.api.v1.BulkImportRelationshipsResponse
+ (*BulkExportRelationshipsRequest)(nil), // 14: authzed.api.v1.BulkExportRelationshipsRequest
+ (*BulkExportRelationshipsResponse)(nil), // 15: authzed.api.v1.BulkExportRelationshipsResponse
+ (*ExperimentalReflectSchemaRequest)(nil), // 16: authzed.api.v1.ExperimentalReflectSchemaRequest
+ (*ExperimentalReflectSchemaResponse)(nil), // 17: authzed.api.v1.ExperimentalReflectSchemaResponse
+ (*ExpSchemaFilter)(nil), // 18: authzed.api.v1.ExpSchemaFilter
+ (*ExpDefinition)(nil), // 19: authzed.api.v1.ExpDefinition
+ (*ExpCaveat)(nil), // 20: authzed.api.v1.ExpCaveat
+ (*ExpCaveatParameter)(nil), // 21: authzed.api.v1.ExpCaveatParameter
+ (*ExpRelation)(nil), // 22: authzed.api.v1.ExpRelation
+ (*ExpTypeReference)(nil), // 23: authzed.api.v1.ExpTypeReference
+ (*ExpPermission)(nil), // 24: authzed.api.v1.ExpPermission
+ (*ExperimentalComputablePermissionsRequest)(nil), // 25: authzed.api.v1.ExperimentalComputablePermissionsRequest
+ (*ExpRelationReference)(nil), // 26: authzed.api.v1.ExpRelationReference
+ (*ExperimentalComputablePermissionsResponse)(nil), // 27: authzed.api.v1.ExperimentalComputablePermissionsResponse
+ (*ExperimentalDependentRelationsRequest)(nil), // 28: authzed.api.v1.ExperimentalDependentRelationsRequest
+ (*ExperimentalDependentRelationsResponse)(nil), // 29: authzed.api.v1.ExperimentalDependentRelationsResponse
+ (*ExperimentalDiffSchemaRequest)(nil), // 30: authzed.api.v1.ExperimentalDiffSchemaRequest
+ (*ExperimentalDiffSchemaResponse)(nil), // 31: authzed.api.v1.ExperimentalDiffSchemaResponse
+ (*ExpRelationSubjectTypeChange)(nil), // 32: authzed.api.v1.ExpRelationSubjectTypeChange
+ (*ExpCaveatParameterTypeChange)(nil), // 33: authzed.api.v1.ExpCaveatParameterTypeChange
+ (*ExpSchemaDiff)(nil), // 34: authzed.api.v1.ExpSchemaDiff
+ (*RelationshipFilter)(nil), // 35: authzed.api.v1.RelationshipFilter
+ (*ZedToken)(nil), // 36: authzed.api.v1.ZedToken
+ (*Consistency)(nil), // 37: authzed.api.v1.Consistency
+ (*ObjectReference)(nil), // 38: authzed.api.v1.ObjectReference
+ (*SubjectReference)(nil), // 39: authzed.api.v1.SubjectReference
+ (*structpb.Struct)(nil), // 40: google.protobuf.Struct
+ (*status.Status)(nil), // 41: google.rpc.Status
+ (CheckPermissionResponse_Permissionship)(0), // 42: authzed.api.v1.CheckPermissionResponse.Permissionship
+ (*PartialCaveatInfo)(nil), // 43: authzed.api.v1.PartialCaveatInfo
+ (*Relationship)(nil), // 44: authzed.api.v1.Relationship
+ (*Cursor)(nil), // 45: authzed.api.v1.Cursor
+}
+var file_authzed_api_v1_experimental_service_proto_depIdxs = []int32{
+ 35, // 0: authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest.relationship_filter:type_name -> authzed.api.v1.RelationshipFilter
+ 4, // 1: authzed.api.v1.ExperimentalCountRelationshipsResponse.read_counter_value:type_name -> authzed.api.v1.ReadCounterValue
+ 36, // 2: authzed.api.v1.ReadCounterValue.read_at:type_name -> authzed.api.v1.ZedToken
+ 37, // 3: authzed.api.v1.BulkCheckPermissionRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 8, // 4: authzed.api.v1.BulkCheckPermissionRequest.items:type_name -> authzed.api.v1.BulkCheckPermissionRequestItem
+ 38, // 5: authzed.api.v1.BulkCheckPermissionRequestItem.resource:type_name -> authzed.api.v1.ObjectReference
+ 39, // 6: authzed.api.v1.BulkCheckPermissionRequestItem.subject:type_name -> authzed.api.v1.SubjectReference
+ 40, // 7: authzed.api.v1.BulkCheckPermissionRequestItem.context:type_name -> google.protobuf.Struct
+ 36, // 8: authzed.api.v1.BulkCheckPermissionResponse.checked_at:type_name -> authzed.api.v1.ZedToken
+ 10, // 9: authzed.api.v1.BulkCheckPermissionResponse.pairs:type_name -> authzed.api.v1.BulkCheckPermissionPair
+ 8, // 10: authzed.api.v1.BulkCheckPermissionPair.request:type_name -> authzed.api.v1.BulkCheckPermissionRequestItem
+ 11, // 11: authzed.api.v1.BulkCheckPermissionPair.item:type_name -> authzed.api.v1.BulkCheckPermissionResponseItem
+ 41, // 12: authzed.api.v1.BulkCheckPermissionPair.error:type_name -> google.rpc.Status
+ 42, // 13: authzed.api.v1.BulkCheckPermissionResponseItem.permissionship:type_name -> authzed.api.v1.CheckPermissionResponse.Permissionship
+ 43, // 14: authzed.api.v1.BulkCheckPermissionResponseItem.partial_caveat_info:type_name -> authzed.api.v1.PartialCaveatInfo
+ 44, // 15: authzed.api.v1.BulkImportRelationshipsRequest.relationships:type_name -> authzed.api.v1.Relationship
+ 37, // 16: authzed.api.v1.BulkExportRelationshipsRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 45, // 17: authzed.api.v1.BulkExportRelationshipsRequest.optional_cursor:type_name -> authzed.api.v1.Cursor
+ 35, // 18: authzed.api.v1.BulkExportRelationshipsRequest.optional_relationship_filter:type_name -> authzed.api.v1.RelationshipFilter
+ 45, // 19: authzed.api.v1.BulkExportRelationshipsResponse.after_result_cursor:type_name -> authzed.api.v1.Cursor
+ 44, // 20: authzed.api.v1.BulkExportRelationshipsResponse.relationships:type_name -> authzed.api.v1.Relationship
+ 37, // 21: authzed.api.v1.ExperimentalReflectSchemaRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 18, // 22: authzed.api.v1.ExperimentalReflectSchemaRequest.optional_filters:type_name -> authzed.api.v1.ExpSchemaFilter
+ 19, // 23: authzed.api.v1.ExperimentalReflectSchemaResponse.definitions:type_name -> authzed.api.v1.ExpDefinition
+ 20, // 24: authzed.api.v1.ExperimentalReflectSchemaResponse.caveats:type_name -> authzed.api.v1.ExpCaveat
+ 36, // 25: authzed.api.v1.ExperimentalReflectSchemaResponse.read_at:type_name -> authzed.api.v1.ZedToken
+ 22, // 26: authzed.api.v1.ExpDefinition.relations:type_name -> authzed.api.v1.ExpRelation
+ 24, // 27: authzed.api.v1.ExpDefinition.permissions:type_name -> authzed.api.v1.ExpPermission
+ 21, // 28: authzed.api.v1.ExpCaveat.parameters:type_name -> authzed.api.v1.ExpCaveatParameter
+ 23, // 29: authzed.api.v1.ExpRelation.subject_types:type_name -> authzed.api.v1.ExpTypeReference
+ 37, // 30: authzed.api.v1.ExperimentalComputablePermissionsRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 26, // 31: authzed.api.v1.ExperimentalComputablePermissionsResponse.permissions:type_name -> authzed.api.v1.ExpRelationReference
+ 36, // 32: authzed.api.v1.ExperimentalComputablePermissionsResponse.read_at:type_name -> authzed.api.v1.ZedToken
+ 37, // 33: authzed.api.v1.ExperimentalDependentRelationsRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 26, // 34: authzed.api.v1.ExperimentalDependentRelationsResponse.relations:type_name -> authzed.api.v1.ExpRelationReference
+ 36, // 35: authzed.api.v1.ExperimentalDependentRelationsResponse.read_at:type_name -> authzed.api.v1.ZedToken
+ 37, // 36: authzed.api.v1.ExperimentalDiffSchemaRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 34, // 37: authzed.api.v1.ExperimentalDiffSchemaResponse.diffs:type_name -> authzed.api.v1.ExpSchemaDiff
+ 36, // 38: authzed.api.v1.ExperimentalDiffSchemaResponse.read_at:type_name -> authzed.api.v1.ZedToken
+ 22, // 39: authzed.api.v1.ExpRelationSubjectTypeChange.relation:type_name -> authzed.api.v1.ExpRelation
+ 23, // 40: authzed.api.v1.ExpRelationSubjectTypeChange.changed_subject_type:type_name -> authzed.api.v1.ExpTypeReference
+ 21, // 41: authzed.api.v1.ExpCaveatParameterTypeChange.parameter:type_name -> authzed.api.v1.ExpCaveatParameter
+ 19, // 42: authzed.api.v1.ExpSchemaDiff.definition_added:type_name -> authzed.api.v1.ExpDefinition
+ 19, // 43: authzed.api.v1.ExpSchemaDiff.definition_removed:type_name -> authzed.api.v1.ExpDefinition
+ 19, // 44: authzed.api.v1.ExpSchemaDiff.definition_doc_comment_changed:type_name -> authzed.api.v1.ExpDefinition
+ 22, // 45: authzed.api.v1.ExpSchemaDiff.relation_added:type_name -> authzed.api.v1.ExpRelation
+ 22, // 46: authzed.api.v1.ExpSchemaDiff.relation_removed:type_name -> authzed.api.v1.ExpRelation
+ 22, // 47: authzed.api.v1.ExpSchemaDiff.relation_doc_comment_changed:type_name -> authzed.api.v1.ExpRelation
+ 32, // 48: authzed.api.v1.ExpSchemaDiff.relation_subject_type_added:type_name -> authzed.api.v1.ExpRelationSubjectTypeChange
+ 32, // 49: authzed.api.v1.ExpSchemaDiff.relation_subject_type_removed:type_name -> authzed.api.v1.ExpRelationSubjectTypeChange
+ 24, // 50: authzed.api.v1.ExpSchemaDiff.permission_added:type_name -> authzed.api.v1.ExpPermission
+ 24, // 51: authzed.api.v1.ExpSchemaDiff.permission_removed:type_name -> authzed.api.v1.ExpPermission
+ 24, // 52: authzed.api.v1.ExpSchemaDiff.permission_doc_comment_changed:type_name -> authzed.api.v1.ExpPermission
+ 24, // 53: authzed.api.v1.ExpSchemaDiff.permission_expr_changed:type_name -> authzed.api.v1.ExpPermission
+ 20, // 54: authzed.api.v1.ExpSchemaDiff.caveat_added:type_name -> authzed.api.v1.ExpCaveat
+ 20, // 55: authzed.api.v1.ExpSchemaDiff.caveat_removed:type_name -> authzed.api.v1.ExpCaveat
+ 20, // 56: authzed.api.v1.ExpSchemaDiff.caveat_doc_comment_changed:type_name -> authzed.api.v1.ExpCaveat
+ 20, // 57: authzed.api.v1.ExpSchemaDiff.caveat_expr_changed:type_name -> authzed.api.v1.ExpCaveat
+ 21, // 58: authzed.api.v1.ExpSchemaDiff.caveat_parameter_added:type_name -> authzed.api.v1.ExpCaveatParameter
+ 21, // 59: authzed.api.v1.ExpSchemaDiff.caveat_parameter_removed:type_name -> authzed.api.v1.ExpCaveatParameter
+ 33, // 60: authzed.api.v1.ExpSchemaDiff.caveat_parameter_type_changed:type_name -> authzed.api.v1.ExpCaveatParameterTypeChange
+ 12, // 61: authzed.api.v1.ExperimentalService.BulkImportRelationships:input_type -> authzed.api.v1.BulkImportRelationshipsRequest
+ 14, // 62: authzed.api.v1.ExperimentalService.BulkExportRelationships:input_type -> authzed.api.v1.BulkExportRelationshipsRequest
+ 7, // 63: authzed.api.v1.ExperimentalService.BulkCheckPermission:input_type -> authzed.api.v1.BulkCheckPermissionRequest
+ 16, // 64: authzed.api.v1.ExperimentalService.ExperimentalReflectSchema:input_type -> authzed.api.v1.ExperimentalReflectSchemaRequest
+ 25, // 65: authzed.api.v1.ExperimentalService.ExperimentalComputablePermissions:input_type -> authzed.api.v1.ExperimentalComputablePermissionsRequest
+ 28, // 66: authzed.api.v1.ExperimentalService.ExperimentalDependentRelations:input_type -> authzed.api.v1.ExperimentalDependentRelationsRequest
+ 30, // 67: authzed.api.v1.ExperimentalService.ExperimentalDiffSchema:input_type -> authzed.api.v1.ExperimentalDiffSchemaRequest
+ 0, // 68: authzed.api.v1.ExperimentalService.ExperimentalRegisterRelationshipCounter:input_type -> authzed.api.v1.ExperimentalRegisterRelationshipCounterRequest
+ 2, // 69: authzed.api.v1.ExperimentalService.ExperimentalCountRelationships:input_type -> authzed.api.v1.ExperimentalCountRelationshipsRequest
+ 5, // 70: authzed.api.v1.ExperimentalService.ExperimentalUnregisterRelationshipCounter:input_type -> authzed.api.v1.ExperimentalUnregisterRelationshipCounterRequest
+ 13, // 71: authzed.api.v1.ExperimentalService.BulkImportRelationships:output_type -> authzed.api.v1.BulkImportRelationshipsResponse
+ 15, // 72: authzed.api.v1.ExperimentalService.BulkExportRelationships:output_type -> authzed.api.v1.BulkExportRelationshipsResponse
+ 9, // 73: authzed.api.v1.ExperimentalService.BulkCheckPermission:output_type -> authzed.api.v1.BulkCheckPermissionResponse
+ 17, // 74: authzed.api.v1.ExperimentalService.ExperimentalReflectSchema:output_type -> authzed.api.v1.ExperimentalReflectSchemaResponse
+ 27, // 75: authzed.api.v1.ExperimentalService.ExperimentalComputablePermissions:output_type -> authzed.api.v1.ExperimentalComputablePermissionsResponse
+ 29, // 76: authzed.api.v1.ExperimentalService.ExperimentalDependentRelations:output_type -> authzed.api.v1.ExperimentalDependentRelationsResponse
+ 31, // 77: authzed.api.v1.ExperimentalService.ExperimentalDiffSchema:output_type -> authzed.api.v1.ExperimentalDiffSchemaResponse
+ 1, // 78: authzed.api.v1.ExperimentalService.ExperimentalRegisterRelationshipCounter:output_type -> authzed.api.v1.ExperimentalRegisterRelationshipCounterResponse
+ 3, // 79: authzed.api.v1.ExperimentalService.ExperimentalCountRelationships:output_type -> authzed.api.v1.ExperimentalCountRelationshipsResponse
+ 6, // 80: authzed.api.v1.ExperimentalService.ExperimentalUnregisterRelationshipCounter:output_type -> authzed.api.v1.ExperimentalUnregisterRelationshipCounterResponse
+ 71, // [71:81] is the sub-list for method output_type
+ 61, // [61:71] is the sub-list for method input_type
+ 61, // [61:61] is the sub-list for extension type_name
+ 61, // [61:61] is the sub-list for extension extendee
+ 0, // [0:61] is the sub-list for field type_name
+}
+
+func init() { file_authzed_api_v1_experimental_service_proto_init() }
+func file_authzed_api_v1_experimental_service_proto_init() {
+ if File_authzed_api_v1_experimental_service_proto != nil {
+ return
+ }
+ file_authzed_api_v1_core_proto_init()
+ file_authzed_api_v1_permission_service_proto_init()
+ file_authzed_api_v1_experimental_service_proto_msgTypes[3].OneofWrappers = []any{
+ (*ExperimentalCountRelationshipsResponse_CounterStillCalculating)(nil),
+ (*ExperimentalCountRelationshipsResponse_ReadCounterValue)(nil),
+ }
+ file_authzed_api_v1_experimental_service_proto_msgTypes[10].OneofWrappers = []any{
+ (*BulkCheckPermissionPair_Item)(nil),
+ (*BulkCheckPermissionPair_Error)(nil),
+ }
+ file_authzed_api_v1_experimental_service_proto_msgTypes[23].OneofWrappers = []any{
+ (*ExpTypeReference_IsTerminalSubject)(nil),
+ (*ExpTypeReference_OptionalRelationName)(nil),
+ (*ExpTypeReference_IsPublicWildcard)(nil),
+ }
+ file_authzed_api_v1_experimental_service_proto_msgTypes[34].OneofWrappers = []any{
+ (*ExpSchemaDiff_DefinitionAdded)(nil),
+ (*ExpSchemaDiff_DefinitionRemoved)(nil),
+ (*ExpSchemaDiff_DefinitionDocCommentChanged)(nil),
+ (*ExpSchemaDiff_RelationAdded)(nil),
+ (*ExpSchemaDiff_RelationRemoved)(nil),
+ (*ExpSchemaDiff_RelationDocCommentChanged)(nil),
+ (*ExpSchemaDiff_RelationSubjectTypeAdded)(nil),
+ (*ExpSchemaDiff_RelationSubjectTypeRemoved)(nil),
+ (*ExpSchemaDiff_PermissionAdded)(nil),
+ (*ExpSchemaDiff_PermissionRemoved)(nil),
+ (*ExpSchemaDiff_PermissionDocCommentChanged)(nil),
+ (*ExpSchemaDiff_PermissionExprChanged)(nil),
+ (*ExpSchemaDiff_CaveatAdded)(nil),
+ (*ExpSchemaDiff_CaveatRemoved)(nil),
+ (*ExpSchemaDiff_CaveatDocCommentChanged)(nil),
+ (*ExpSchemaDiff_CaveatExprChanged)(nil),
+ (*ExpSchemaDiff_CaveatParameterAdded)(nil),
+ (*ExpSchemaDiff_CaveatParameterRemoved)(nil),
+ (*ExpSchemaDiff_CaveatParameterTypeChanged)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_authzed_api_v1_experimental_service_proto_rawDesc), len(file_authzed_api_v1_experimental_service_proto_rawDesc)),
+ NumEnums: 0,
+ NumMessages: 35,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_authzed_api_v1_experimental_service_proto_goTypes,
+ DependencyIndexes: file_authzed_api_v1_experimental_service_proto_depIdxs,
+ MessageInfos: file_authzed_api_v1_experimental_service_proto_msgTypes,
+ }.Build()
+ File_authzed_api_v1_experimental_service_proto = out.File
+ file_authzed_api_v1_experimental_service_proto_goTypes = nil
+ file_authzed_api_v1_experimental_service_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service.pb.gw.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service.pb.gw.go
new file mode 100644
index 0000000..c3e4707
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service.pb.gw.go
@@ -0,0 +1,707 @@
+// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
+// source: authzed/api/v1/experimental_service.proto
+
+/*
+Package v1 is a reverse proxy.
+
+It translates gRPC into RESTful JSON APIs.
+*/
+package v1
+
+import (
+ "context"
+ "errors"
+ "io"
+ "net/http"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+)
+
+// Suppress "imported and not used" errors
+var (
+ _ codes.Code
+ _ io.Reader
+ _ status.Status
+ _ = errors.New
+ _ = runtime.String
+ _ = utilities.NewDoubleArray
+ _ = metadata.Join
+)
+
+func request_ExperimentalService_BulkImportRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var metadata runtime.ServerMetadata
+ stream, err := client.BulkImportRelationships(ctx)
+ if err != nil {
+ grpclog.Errorf("Failed to start streaming: %v", err)
+ return nil, metadata, err
+ }
+ dec := marshaler.NewDecoder(req.Body)
+ for {
+ var protoReq BulkImportRelationshipsRequest
+ err = dec.Decode(&protoReq)
+ if errors.Is(err, io.EOF) {
+ break
+ }
+ if err != nil {
+ grpclog.Errorf("Failed to decode request: %v", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err = stream.Send(&protoReq); err != nil {
+ if errors.Is(err, io.EOF) {
+ break
+ }
+ grpclog.Errorf("Failed to send request: %v", err)
+ return nil, metadata, err
+ }
+ }
+ if err := stream.CloseSend(); err != nil {
+ grpclog.Errorf("Failed to terminate client stream: %v", err)
+ return nil, metadata, err
+ }
+ header, err := stream.Header()
+ if err != nil {
+ grpclog.Errorf("Failed to get header from client: %v", err)
+ return nil, metadata, err
+ }
+ metadata.HeaderMD = header
+ msg, err := stream.CloseAndRecv()
+ metadata.TrailerMD = stream.Trailer()
+ return msg, metadata, err
+}
+
+func request_ExperimentalService_BulkExportRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentalServiceClient, req *http.Request, pathParams map[string]string) (ExperimentalService_BulkExportRelationshipsClient, runtime.ServerMetadata, error) {
+ var (
+ protoReq BulkExportRelationshipsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ stream, err := client.BulkExportRelationships(ctx, &protoReq)
+ if err != nil {
+ return nil, metadata, err
+ }
+ header, err := stream.Header()
+ if err != nil {
+ return nil, metadata, err
+ }
+ metadata.HeaderMD = header
+ return stream, metadata, nil
+}
+
+func request_ExperimentalService_BulkCheckPermission_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq BulkCheckPermissionRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.BulkCheckPermission(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_ExperimentalService_BulkCheckPermission_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentalServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq BulkCheckPermissionRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.BulkCheckPermission(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_ExperimentalService_ExperimentalReflectSchema_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExperimentalReflectSchemaRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.ExperimentalReflectSchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_ExperimentalService_ExperimentalReflectSchema_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentalServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExperimentalReflectSchemaRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.ExperimentalReflectSchema(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_ExperimentalService_ExperimentalComputablePermissions_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExperimentalComputablePermissionsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.ExperimentalComputablePermissions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_ExperimentalService_ExperimentalComputablePermissions_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentalServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExperimentalComputablePermissionsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.ExperimentalComputablePermissions(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_ExperimentalService_ExperimentalDependentRelations_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExperimentalDependentRelationsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.ExperimentalDependentRelations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_ExperimentalService_ExperimentalDependentRelations_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentalServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExperimentalDependentRelationsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.ExperimentalDependentRelations(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_ExperimentalService_ExperimentalDiffSchema_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExperimentalDiffSchemaRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.ExperimentalDiffSchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_ExperimentalService_ExperimentalDiffSchema_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentalServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExperimentalDiffSchemaRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.ExperimentalDiffSchema(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_ExperimentalService_ExperimentalRegisterRelationshipCounter_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExperimentalRegisterRelationshipCounterRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.ExperimentalRegisterRelationshipCounter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_ExperimentalService_ExperimentalRegisterRelationshipCounter_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentalServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExperimentalRegisterRelationshipCounterRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.ExperimentalRegisterRelationshipCounter(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_ExperimentalService_ExperimentalCountRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExperimentalCountRelationshipsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.ExperimentalCountRelationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_ExperimentalService_ExperimentalCountRelationships_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentalServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExperimentalCountRelationshipsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.ExperimentalCountRelationships(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_ExperimentalService_ExperimentalUnregisterRelationshipCounter_0(ctx context.Context, marshaler runtime.Marshaler, client ExperimentalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExperimentalUnregisterRelationshipCounterRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.ExperimentalUnregisterRelationshipCounter(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_ExperimentalService_ExperimentalUnregisterRelationshipCounter_0(ctx context.Context, marshaler runtime.Marshaler, server ExperimentalServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExperimentalUnregisterRelationshipCounterRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.ExperimentalUnregisterRelationshipCounter(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+// RegisterExperimentalServiceHandlerServer registers the http handlers for service ExperimentalService to "mux".
+// UnaryRPC :call ExperimentalServiceServer directly.
+// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterExperimentalServiceHandlerFromEndpoint instead.
+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
+func RegisterExperimentalServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExperimentalServiceServer) error {
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_BulkImportRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
+ _, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ })
+
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_BulkExportRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
+ _, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_BulkCheckPermission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/BulkCheckPermission", runtime.WithHTTPPathPattern("/v1/experimental/permissions/bulkcheckpermission"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ExperimentalService_BulkCheckPermission_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_BulkCheckPermission_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_ExperimentalReflectSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/ExperimentalReflectSchema", runtime.WithHTTPPathPattern("/v1/experimental/reflectschema"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ExperimentalService_ExperimentalReflectSchema_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_ExperimentalReflectSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_ExperimentalComputablePermissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/ExperimentalComputablePermissions", runtime.WithHTTPPathPattern("/v1/experimental/permissions/computable"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ExperimentalService_ExperimentalComputablePermissions_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_ExperimentalComputablePermissions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_ExperimentalDependentRelations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/ExperimentalDependentRelations", runtime.WithHTTPPathPattern("/v1/experimental/permissions/dependent"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ExperimentalService_ExperimentalDependentRelations_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_ExperimentalDependentRelations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_ExperimentalDiffSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/ExperimentalDiffSchema", runtime.WithHTTPPathPattern("/v1/experimental/diffschema"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ExperimentalService_ExperimentalDiffSchema_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_ExperimentalDiffSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_ExperimentalRegisterRelationshipCounter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/ExperimentalRegisterRelationshipCounter", runtime.WithHTTPPathPattern("/v1/experimental/registerrelationshipcounter"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ExperimentalService_ExperimentalRegisterRelationshipCounter_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_ExperimentalRegisterRelationshipCounter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_ExperimentalCountRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/ExperimentalCountRelationships", runtime.WithHTTPPathPattern("/v1/experimental/countrelationships"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ExperimentalService_ExperimentalCountRelationships_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_ExperimentalCountRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_ExperimentalUnregisterRelationshipCounter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/ExperimentalUnregisterRelationshipCounter", runtime.WithHTTPPathPattern("/v1/experimental/unregisterrelationshipcounter"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ExperimentalService_ExperimentalUnregisterRelationshipCounter_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_ExperimentalUnregisterRelationshipCounter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+
+ return nil
+}
+
+// RegisterExperimentalServiceHandlerFromEndpoint is same as RegisterExperimentalServiceHandler but
+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
+func RegisterExperimentalServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
+ conn, err := grpc.NewClient(endpoint, opts...)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err != nil {
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ return
+ }
+ go func() {
+ <-ctx.Done()
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ }()
+ }()
+ return RegisterExperimentalServiceHandler(ctx, mux, conn)
+}
+
+// RegisterExperimentalServiceHandler registers the http handlers for service ExperimentalService to "mux".
+// The handlers forward requests to the grpc endpoint over "conn".
+func RegisterExperimentalServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterExperimentalServiceHandlerClient(ctx, mux, NewExperimentalServiceClient(conn))
+}
+
+// RegisterExperimentalServiceHandlerClient registers the http handlers for service ExperimentalService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ExperimentalServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ExperimentalServiceClient"
+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
+// "ExperimentalServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
+func RegisterExperimentalServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExperimentalServiceClient) error {
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_BulkImportRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/BulkImportRelationships", runtime.WithHTTPPathPattern("/v1/experimental/relationships/bulkimport"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ExperimentalService_BulkImportRelationships_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_BulkImportRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_BulkExportRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/BulkExportRelationships", runtime.WithHTTPPathPattern("/v1/experimental/relationships/bulkexport"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ExperimentalService_BulkExportRelationships_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_BulkExportRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_BulkCheckPermission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/BulkCheckPermission", runtime.WithHTTPPathPattern("/v1/experimental/permissions/bulkcheckpermission"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ExperimentalService_BulkCheckPermission_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_BulkCheckPermission_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_ExperimentalReflectSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/ExperimentalReflectSchema", runtime.WithHTTPPathPattern("/v1/experimental/reflectschema"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ExperimentalService_ExperimentalReflectSchema_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_ExperimentalReflectSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_ExperimentalComputablePermissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/ExperimentalComputablePermissions", runtime.WithHTTPPathPattern("/v1/experimental/permissions/computable"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ExperimentalService_ExperimentalComputablePermissions_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_ExperimentalComputablePermissions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_ExperimentalDependentRelations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/ExperimentalDependentRelations", runtime.WithHTTPPathPattern("/v1/experimental/permissions/dependent"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ExperimentalService_ExperimentalDependentRelations_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_ExperimentalDependentRelations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_ExperimentalDiffSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/ExperimentalDiffSchema", runtime.WithHTTPPathPattern("/v1/experimental/diffschema"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ExperimentalService_ExperimentalDiffSchema_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_ExperimentalDiffSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_ExperimentalRegisterRelationshipCounter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/ExperimentalRegisterRelationshipCounter", runtime.WithHTTPPathPattern("/v1/experimental/registerrelationshipcounter"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ExperimentalService_ExperimentalRegisterRelationshipCounter_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_ExperimentalRegisterRelationshipCounter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_ExperimentalCountRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/ExperimentalCountRelationships", runtime.WithHTTPPathPattern("/v1/experimental/countrelationships"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ExperimentalService_ExperimentalCountRelationships_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_ExperimentalCountRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_ExperimentalService_ExperimentalUnregisterRelationshipCounter_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.ExperimentalService/ExperimentalUnregisterRelationshipCounter", runtime.WithHTTPPathPattern("/v1/experimental/unregisterrelationshipcounter"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ExperimentalService_ExperimentalUnregisterRelationshipCounter_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_ExperimentalService_ExperimentalUnregisterRelationshipCounter_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ return nil
+}
+
+var (
+ pattern_ExperimentalService_BulkImportRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "experimental", "relationships", "bulkimport"}, ""))
+ pattern_ExperimentalService_BulkExportRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "experimental", "relationships", "bulkexport"}, ""))
+ pattern_ExperimentalService_BulkCheckPermission_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "experimental", "permissions", "bulkcheckpermission"}, ""))
+ pattern_ExperimentalService_ExperimentalReflectSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "experimental", "reflectschema"}, ""))
+ pattern_ExperimentalService_ExperimentalComputablePermissions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "experimental", "permissions", "computable"}, ""))
+ pattern_ExperimentalService_ExperimentalDependentRelations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "experimental", "permissions", "dependent"}, ""))
+ pattern_ExperimentalService_ExperimentalDiffSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "experimental", "diffschema"}, ""))
+ pattern_ExperimentalService_ExperimentalRegisterRelationshipCounter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "experimental", "registerrelationshipcounter"}, ""))
+ pattern_ExperimentalService_ExperimentalCountRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "experimental", "countrelationships"}, ""))
+ pattern_ExperimentalService_ExperimentalUnregisterRelationshipCounter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "experimental", "unregisterrelationshipcounter"}, ""))
+)
+
+var (
+ forward_ExperimentalService_BulkImportRelationships_0 = runtime.ForwardResponseMessage
+ forward_ExperimentalService_BulkExportRelationships_0 = runtime.ForwardResponseStream
+ forward_ExperimentalService_BulkCheckPermission_0 = runtime.ForwardResponseMessage
+ forward_ExperimentalService_ExperimentalReflectSchema_0 = runtime.ForwardResponseMessage
+ forward_ExperimentalService_ExperimentalComputablePermissions_0 = runtime.ForwardResponseMessage
+ forward_ExperimentalService_ExperimentalDependentRelations_0 = runtime.ForwardResponseMessage
+ forward_ExperimentalService_ExperimentalDiffSchema_0 = runtime.ForwardResponseMessage
+ forward_ExperimentalService_ExperimentalRegisterRelationshipCounter_0 = runtime.ForwardResponseMessage
+ forward_ExperimentalService_ExperimentalCountRelationships_0 = runtime.ForwardResponseMessage
+ forward_ExperimentalService_ExperimentalUnregisterRelationshipCounter_0 = runtime.ForwardResponseMessage
+)
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service.pb.validate.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service.pb.validate.go
new file mode 100644
index 0000000..468e570
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service.pb.validate.go
@@ -0,0 +1,6081 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: authzed/api/v1/experimental_service.proto
+
+package v1
+
+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
+// ExperimentalRegisterRelationshipCounterRequest 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 *ExperimentalRegisterRelationshipCounterRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// ExperimentalRegisterRelationshipCounterRequest 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
+// ExperimentalRegisterRelationshipCounterRequestMultiError, or nil if none found.
+func (m *ExperimentalRegisterRelationshipCounterRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExperimentalRegisterRelationshipCounterRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetName()) > 64 {
+ err := ExperimentalRegisterRelationshipCounterRequestValidationError{
+ field: "Name",
+ reason: "value length must be at most 64 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_ExperimentalRegisterRelationshipCounterRequest_Name_Pattern.MatchString(m.GetName()) {
+ err := ExperimentalRegisterRelationshipCounterRequestValidationError{
+ field: "Name",
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if m.GetRelationshipFilter() == nil {
+ err := ExperimentalRegisterRelationshipCounterRequestValidationError{
+ field: "RelationshipFilter",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRelationshipFilter()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExperimentalRegisterRelationshipCounterRequestValidationError{
+ field: "RelationshipFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExperimentalRegisterRelationshipCounterRequestValidationError{
+ field: "RelationshipFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelationshipFilter()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExperimentalRegisterRelationshipCounterRequestValidationError{
+ field: "RelationshipFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ExperimentalRegisterRelationshipCounterRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExperimentalRegisterRelationshipCounterRequestMultiError is an error
+// wrapping multiple validation errors returned by
+// ExperimentalRegisterRelationshipCounterRequest.ValidateAll() if the
+// designated constraints aren't met.
+type ExperimentalRegisterRelationshipCounterRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExperimentalRegisterRelationshipCounterRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExperimentalRegisterRelationshipCounterRequestMultiError) AllErrors() []error { return m }
+
+// ExperimentalRegisterRelationshipCounterRequestValidationError is the
+// validation error returned by
+// ExperimentalRegisterRelationshipCounterRequest.Validate if the designated
+// constraints aren't met.
+type ExperimentalRegisterRelationshipCounterRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExperimentalRegisterRelationshipCounterRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExperimentalRegisterRelationshipCounterRequestValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e ExperimentalRegisterRelationshipCounterRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExperimentalRegisterRelationshipCounterRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExperimentalRegisterRelationshipCounterRequestValidationError) ErrorName() string {
+ return "ExperimentalRegisterRelationshipCounterRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExperimentalRegisterRelationshipCounterRequestValidationError) 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 %sExperimentalRegisterRelationshipCounterRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExperimentalRegisterRelationshipCounterRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExperimentalRegisterRelationshipCounterRequestValidationError{}
+
+var _ExperimentalRegisterRelationshipCounterRequest_Name_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])?$")
+
+// Validate checks the field values on
+// ExperimentalRegisterRelationshipCounterResponse 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 *ExperimentalRegisterRelationshipCounterResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// ExperimentalRegisterRelationshipCounterResponse 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
+// ExperimentalRegisterRelationshipCounterResponseMultiError, or nil if none found.
+func (m *ExperimentalRegisterRelationshipCounterResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExperimentalRegisterRelationshipCounterResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return ExperimentalRegisterRelationshipCounterResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExperimentalRegisterRelationshipCounterResponseMultiError is an error
+// wrapping multiple validation errors returned by
+// ExperimentalRegisterRelationshipCounterResponse.ValidateAll() if the
+// designated constraints aren't met.
+type ExperimentalRegisterRelationshipCounterResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExperimentalRegisterRelationshipCounterResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExperimentalRegisterRelationshipCounterResponseMultiError) AllErrors() []error { return m }
+
+// ExperimentalRegisterRelationshipCounterResponseValidationError is the
+// validation error returned by
+// ExperimentalRegisterRelationshipCounterResponse.Validate if the designated
+// constraints aren't met.
+type ExperimentalRegisterRelationshipCounterResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExperimentalRegisterRelationshipCounterResponseValidationError) Field() string {
+ return e.field
+}
+
+// Reason function returns reason value.
+func (e ExperimentalRegisterRelationshipCounterResponseValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e ExperimentalRegisterRelationshipCounterResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExperimentalRegisterRelationshipCounterResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExperimentalRegisterRelationshipCounterResponseValidationError) ErrorName() string {
+ return "ExperimentalRegisterRelationshipCounterResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExperimentalRegisterRelationshipCounterResponseValidationError) 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 %sExperimentalRegisterRelationshipCounterResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExperimentalRegisterRelationshipCounterResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExperimentalRegisterRelationshipCounterResponseValidationError{}
+
+// Validate checks the field values on ExperimentalCountRelationshipsRequest
+// 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 *ExperimentalCountRelationshipsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExperimentalCountRelationshipsRequest
+// 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
+// ExperimentalCountRelationshipsRequestMultiError, or nil if none found.
+func (m *ExperimentalCountRelationshipsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExperimentalCountRelationshipsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetName()) > 64 {
+ err := ExperimentalCountRelationshipsRequestValidationError{
+ field: "Name",
+ reason: "value length must be at most 64 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_ExperimentalCountRelationshipsRequest_Name_Pattern.MatchString(m.GetName()) {
+ err := ExperimentalCountRelationshipsRequestValidationError{
+ field: "Name",
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return ExperimentalCountRelationshipsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExperimentalCountRelationshipsRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// ExperimentalCountRelationshipsRequest.ValidateAll() if the designated
+// constraints aren't met.
+type ExperimentalCountRelationshipsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExperimentalCountRelationshipsRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExperimentalCountRelationshipsRequestMultiError) AllErrors() []error { return m }
+
+// ExperimentalCountRelationshipsRequestValidationError is the validation error
+// returned by ExperimentalCountRelationshipsRequest.Validate if the
+// designated constraints aren't met.
+type ExperimentalCountRelationshipsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExperimentalCountRelationshipsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExperimentalCountRelationshipsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExperimentalCountRelationshipsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExperimentalCountRelationshipsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExperimentalCountRelationshipsRequestValidationError) ErrorName() string {
+ return "ExperimentalCountRelationshipsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExperimentalCountRelationshipsRequestValidationError) 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 %sExperimentalCountRelationshipsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExperimentalCountRelationshipsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExperimentalCountRelationshipsRequestValidationError{}
+
+var _ExperimentalCountRelationshipsRequest_Name_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])?$")
+
+// Validate checks the field values on ExperimentalCountRelationshipsResponse
+// 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 *ExperimentalCountRelationshipsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// ExperimentalCountRelationshipsResponse 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
+// ExperimentalCountRelationshipsResponseMultiError, or nil if none found.
+func (m *ExperimentalCountRelationshipsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExperimentalCountRelationshipsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ switch v := m.CounterResult.(type) {
+ case *ExperimentalCountRelationshipsResponse_CounterStillCalculating:
+ if v == nil {
+ err := ExperimentalCountRelationshipsResponseValidationError{
+ field: "CounterResult",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ // no validation rules for CounterStillCalculating
+ case *ExperimentalCountRelationshipsResponse_ReadCounterValue:
+ if v == nil {
+ err := ExperimentalCountRelationshipsResponseValidationError{
+ field: "CounterResult",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetReadCounterValue()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExperimentalCountRelationshipsResponseValidationError{
+ field: "ReadCounterValue",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExperimentalCountRelationshipsResponseValidationError{
+ field: "ReadCounterValue",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetReadCounterValue()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExperimentalCountRelationshipsResponseValidationError{
+ field: "ReadCounterValue",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return ExperimentalCountRelationshipsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExperimentalCountRelationshipsResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// ExperimentalCountRelationshipsResponse.ValidateAll() if the designated
+// constraints aren't met.
+type ExperimentalCountRelationshipsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExperimentalCountRelationshipsResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExperimentalCountRelationshipsResponseMultiError) AllErrors() []error { return m }
+
+// ExperimentalCountRelationshipsResponseValidationError is the validation
+// error returned by ExperimentalCountRelationshipsResponse.Validate if the
+// designated constraints aren't met.
+type ExperimentalCountRelationshipsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExperimentalCountRelationshipsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExperimentalCountRelationshipsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExperimentalCountRelationshipsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExperimentalCountRelationshipsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExperimentalCountRelationshipsResponseValidationError) ErrorName() string {
+ return "ExperimentalCountRelationshipsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExperimentalCountRelationshipsResponseValidationError) 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 %sExperimentalCountRelationshipsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExperimentalCountRelationshipsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExperimentalCountRelationshipsResponseValidationError{}
+
+// Validate checks the field values on ReadCounterValue 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 *ReadCounterValue) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReadCounterValue 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
+// ReadCounterValueMultiError, or nil if none found.
+func (m *ReadCounterValue) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReadCounterValue) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for RelationshipCount
+
+ if m.GetReadAt() == nil {
+ err := ReadCounterValueValidationError{
+ field: "ReadAt",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetReadAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReadCounterValueValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReadCounterValueValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetReadAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReadCounterValueValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ReadCounterValueMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReadCounterValueMultiError is an error wrapping multiple validation errors
+// returned by ReadCounterValue.ValidateAll() if the designated constraints
+// aren't met.
+type ReadCounterValueMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReadCounterValueMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReadCounterValueMultiError) AllErrors() []error { return m }
+
+// ReadCounterValueValidationError is the validation error returned by
+// ReadCounterValue.Validate if the designated constraints aren't met.
+type ReadCounterValueValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReadCounterValueValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReadCounterValueValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReadCounterValueValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReadCounterValueValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReadCounterValueValidationError) ErrorName() string { return "ReadCounterValueValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ReadCounterValueValidationError) 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 %sReadCounterValue.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReadCounterValueValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReadCounterValueValidationError{}
+
+// Validate checks the field values on
+// ExperimentalUnregisterRelationshipCounterRequest 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 *ExperimentalUnregisterRelationshipCounterRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// ExperimentalUnregisterRelationshipCounterRequest 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
+// ExperimentalUnregisterRelationshipCounterRequestMultiError, or nil if none found.
+func (m *ExperimentalUnregisterRelationshipCounterRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExperimentalUnregisterRelationshipCounterRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetName()) > 64 {
+ err := ExperimentalUnregisterRelationshipCounterRequestValidationError{
+ field: "Name",
+ reason: "value length must be at most 64 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_ExperimentalUnregisterRelationshipCounterRequest_Name_Pattern.MatchString(m.GetName()) {
+ err := ExperimentalUnregisterRelationshipCounterRequestValidationError{
+ field: "Name",
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return ExperimentalUnregisterRelationshipCounterRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExperimentalUnregisterRelationshipCounterRequestMultiError is an error
+// wrapping multiple validation errors returned by
+// ExperimentalUnregisterRelationshipCounterRequest.ValidateAll() if the
+// designated constraints aren't met.
+type ExperimentalUnregisterRelationshipCounterRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExperimentalUnregisterRelationshipCounterRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExperimentalUnregisterRelationshipCounterRequestMultiError) AllErrors() []error { return m }
+
+// ExperimentalUnregisterRelationshipCounterRequestValidationError is the
+// validation error returned by
+// ExperimentalUnregisterRelationshipCounterRequest.Validate if the designated
+// constraints aren't met.
+type ExperimentalUnregisterRelationshipCounterRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExperimentalUnregisterRelationshipCounterRequestValidationError) Field() string {
+ return e.field
+}
+
+// Reason function returns reason value.
+func (e ExperimentalUnregisterRelationshipCounterRequestValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e ExperimentalUnregisterRelationshipCounterRequestValidationError) Cause() error {
+ return e.cause
+}
+
+// Key function returns key value.
+func (e ExperimentalUnregisterRelationshipCounterRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExperimentalUnregisterRelationshipCounterRequestValidationError) ErrorName() string {
+ return "ExperimentalUnregisterRelationshipCounterRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExperimentalUnregisterRelationshipCounterRequestValidationError) 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 %sExperimentalUnregisterRelationshipCounterRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExperimentalUnregisterRelationshipCounterRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExperimentalUnregisterRelationshipCounterRequestValidationError{}
+
+var _ExperimentalUnregisterRelationshipCounterRequest_Name_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])?$")
+
+// Validate checks the field values on
+// ExperimentalUnregisterRelationshipCounterResponse 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 *ExperimentalUnregisterRelationshipCounterResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// ExperimentalUnregisterRelationshipCounterResponse 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
+// ExperimentalUnregisterRelationshipCounterResponseMultiError, or nil if none found.
+func (m *ExperimentalUnregisterRelationshipCounterResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExperimentalUnregisterRelationshipCounterResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return ExperimentalUnregisterRelationshipCounterResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExperimentalUnregisterRelationshipCounterResponseMultiError is an error
+// wrapping multiple validation errors returned by
+// ExperimentalUnregisterRelationshipCounterResponse.ValidateAll() if the
+// designated constraints aren't met.
+type ExperimentalUnregisterRelationshipCounterResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExperimentalUnregisterRelationshipCounterResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExperimentalUnregisterRelationshipCounterResponseMultiError) AllErrors() []error { return m }
+
+// ExperimentalUnregisterRelationshipCounterResponseValidationError is the
+// validation error returned by
+// ExperimentalUnregisterRelationshipCounterResponse.Validate if the
+// designated constraints aren't met.
+type ExperimentalUnregisterRelationshipCounterResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExperimentalUnregisterRelationshipCounterResponseValidationError) Field() string {
+ return e.field
+}
+
+// Reason function returns reason value.
+func (e ExperimentalUnregisterRelationshipCounterResponseValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e ExperimentalUnregisterRelationshipCounterResponseValidationError) Cause() error {
+ return e.cause
+}
+
+// Key function returns key value.
+func (e ExperimentalUnregisterRelationshipCounterResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExperimentalUnregisterRelationshipCounterResponseValidationError) ErrorName() string {
+ return "ExperimentalUnregisterRelationshipCounterResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExperimentalUnregisterRelationshipCounterResponseValidationError) 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 %sExperimentalUnregisterRelationshipCounterResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExperimentalUnregisterRelationshipCounterResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExperimentalUnregisterRelationshipCounterResponseValidationError{}
+
+// Validate checks the field values on BulkCheckPermissionRequest 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 *BulkCheckPermissionRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on BulkCheckPermissionRequest 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
+// BulkCheckPermissionRequestMultiError, or nil if none found.
+func (m *BulkCheckPermissionRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *BulkCheckPermissionRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BulkCheckPermissionRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BulkCheckPermissionRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return BulkCheckPermissionRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetItems() {
+ _, _ = idx, item
+
+ if item == nil {
+ err := BulkCheckPermissionRequestValidationError{
+ field: fmt.Sprintf("Items[%v]", idx),
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BulkCheckPermissionRequestValidationError{
+ field: fmt.Sprintf("Items[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BulkCheckPermissionRequestValidationError{
+ field: fmt.Sprintf("Items[%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 BulkCheckPermissionRequestValidationError{
+ field: fmt.Sprintf("Items[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return BulkCheckPermissionRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// BulkCheckPermissionRequestMultiError is an error wrapping multiple
+// validation errors returned by BulkCheckPermissionRequest.ValidateAll() if
+// the designated constraints aren't met.
+type BulkCheckPermissionRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m BulkCheckPermissionRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m BulkCheckPermissionRequestMultiError) AllErrors() []error { return m }
+
+// BulkCheckPermissionRequestValidationError is the validation error returned
+// by BulkCheckPermissionRequest.Validate if the designated constraints aren't met.
+type BulkCheckPermissionRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e BulkCheckPermissionRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e BulkCheckPermissionRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e BulkCheckPermissionRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e BulkCheckPermissionRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e BulkCheckPermissionRequestValidationError) ErrorName() string {
+ return "BulkCheckPermissionRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e BulkCheckPermissionRequestValidationError) 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 %sBulkCheckPermissionRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = BulkCheckPermissionRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = BulkCheckPermissionRequestValidationError{}
+
+// Validate checks the field values on BulkCheckPermissionRequestItem 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 *BulkCheckPermissionRequestItem) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on BulkCheckPermissionRequestItem 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
+// BulkCheckPermissionRequestItemMultiError, or nil if none found.
+func (m *BulkCheckPermissionRequestItem) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *BulkCheckPermissionRequestItem) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetResource() == nil {
+ err := BulkCheckPermissionRequestItemValidationError{
+ field: "Resource",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetResource()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BulkCheckPermissionRequestItemValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BulkCheckPermissionRequestItemValidationError{
+ 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 BulkCheckPermissionRequestItemValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(m.GetPermission()) > 64 {
+ err := BulkCheckPermissionRequestItemValidationError{
+ field: "Permission",
+ reason: "value length must be at most 64 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_BulkCheckPermissionRequestItem_Permission_Pattern.MatchString(m.GetPermission()) {
+ err := BulkCheckPermissionRequestItemValidationError{
+ field: "Permission",
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if m.GetSubject() == nil {
+ err := BulkCheckPermissionRequestItemValidationError{
+ field: "Subject",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetSubject()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BulkCheckPermissionRequestItemValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BulkCheckPermissionRequestItemValidationError{
+ 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 BulkCheckPermissionRequestItemValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetContext()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BulkCheckPermissionRequestItemValidationError{
+ field: "Context",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BulkCheckPermissionRequestItemValidationError{
+ 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 BulkCheckPermissionRequestItemValidationError{
+ field: "Context",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return BulkCheckPermissionRequestItemMultiError(errors)
+ }
+
+ return nil
+}
+
+// BulkCheckPermissionRequestItemMultiError is an error wrapping multiple
+// validation errors returned by BulkCheckPermissionRequestItem.ValidateAll()
+// if the designated constraints aren't met.
+type BulkCheckPermissionRequestItemMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m BulkCheckPermissionRequestItemMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m BulkCheckPermissionRequestItemMultiError) AllErrors() []error { return m }
+
+// BulkCheckPermissionRequestItemValidationError is the validation error
+// returned by BulkCheckPermissionRequestItem.Validate if the designated
+// constraints aren't met.
+type BulkCheckPermissionRequestItemValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e BulkCheckPermissionRequestItemValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e BulkCheckPermissionRequestItemValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e BulkCheckPermissionRequestItemValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e BulkCheckPermissionRequestItemValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e BulkCheckPermissionRequestItemValidationError) ErrorName() string {
+ return "BulkCheckPermissionRequestItemValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e BulkCheckPermissionRequestItemValidationError) 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 %sBulkCheckPermissionRequestItem.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = BulkCheckPermissionRequestItemValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = BulkCheckPermissionRequestItemValidationError{}
+
+var _BulkCheckPermissionRequestItem_Permission_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])?$")
+
+// Validate checks the field values on BulkCheckPermissionResponse 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 *BulkCheckPermissionResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on BulkCheckPermissionResponse 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
+// BulkCheckPermissionResponseMultiError, or nil if none found.
+func (m *BulkCheckPermissionResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *BulkCheckPermissionResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetCheckedAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BulkCheckPermissionResponseValidationError{
+ field: "CheckedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BulkCheckPermissionResponseValidationError{
+ field: "CheckedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCheckedAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return BulkCheckPermissionResponseValidationError{
+ field: "CheckedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetPairs() {
+ _, _ = idx, item
+
+ if item == nil {
+ err := BulkCheckPermissionResponseValidationError{
+ field: fmt.Sprintf("Pairs[%v]", idx),
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BulkCheckPermissionResponseValidationError{
+ field: fmt.Sprintf("Pairs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BulkCheckPermissionResponseValidationError{
+ field: fmt.Sprintf("Pairs[%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 BulkCheckPermissionResponseValidationError{
+ field: fmt.Sprintf("Pairs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return BulkCheckPermissionResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// BulkCheckPermissionResponseMultiError is an error wrapping multiple
+// validation errors returned by BulkCheckPermissionResponse.ValidateAll() if
+// the designated constraints aren't met.
+type BulkCheckPermissionResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m BulkCheckPermissionResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m BulkCheckPermissionResponseMultiError) AllErrors() []error { return m }
+
+// BulkCheckPermissionResponseValidationError is the validation error returned
+// by BulkCheckPermissionResponse.Validate if the designated constraints
+// aren't met.
+type BulkCheckPermissionResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e BulkCheckPermissionResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e BulkCheckPermissionResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e BulkCheckPermissionResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e BulkCheckPermissionResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e BulkCheckPermissionResponseValidationError) ErrorName() string {
+ return "BulkCheckPermissionResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e BulkCheckPermissionResponseValidationError) 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 %sBulkCheckPermissionResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = BulkCheckPermissionResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = BulkCheckPermissionResponseValidationError{}
+
+// Validate checks the field values on BulkCheckPermissionPair 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 *BulkCheckPermissionPair) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on BulkCheckPermissionPair 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
+// BulkCheckPermissionPairMultiError, or nil if none found.
+func (m *BulkCheckPermissionPair) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *BulkCheckPermissionPair) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetRequest()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BulkCheckPermissionPairValidationError{
+ field: "Request",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BulkCheckPermissionPairValidationError{
+ field: "Request",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return BulkCheckPermissionPairValidationError{
+ field: "Request",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ switch v := m.Response.(type) {
+ case *BulkCheckPermissionPair_Item:
+ if v == nil {
+ err := BulkCheckPermissionPairValidationError{
+ field: "Response",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetItem()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BulkCheckPermissionPairValidationError{
+ field: "Item",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BulkCheckPermissionPairValidationError{
+ field: "Item",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetItem()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return BulkCheckPermissionPairValidationError{
+ field: "Item",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *BulkCheckPermissionPair_Error:
+ if v == nil {
+ err := BulkCheckPermissionPairValidationError{
+ field: "Response",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetError()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BulkCheckPermissionPairValidationError{
+ field: "Error",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BulkCheckPermissionPairValidationError{
+ field: "Error",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return BulkCheckPermissionPairValidationError{
+ field: "Error",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return BulkCheckPermissionPairMultiError(errors)
+ }
+
+ return nil
+}
+
+// BulkCheckPermissionPairMultiError is an error wrapping multiple validation
+// errors returned by BulkCheckPermissionPair.ValidateAll() if the designated
+// constraints aren't met.
+type BulkCheckPermissionPairMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m BulkCheckPermissionPairMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m BulkCheckPermissionPairMultiError) AllErrors() []error { return m }
+
+// BulkCheckPermissionPairValidationError is the validation error returned by
+// BulkCheckPermissionPair.Validate if the designated constraints aren't met.
+type BulkCheckPermissionPairValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e BulkCheckPermissionPairValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e BulkCheckPermissionPairValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e BulkCheckPermissionPairValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e BulkCheckPermissionPairValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e BulkCheckPermissionPairValidationError) ErrorName() string {
+ return "BulkCheckPermissionPairValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e BulkCheckPermissionPairValidationError) 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 %sBulkCheckPermissionPair.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = BulkCheckPermissionPairValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = BulkCheckPermissionPairValidationError{}
+
+// Validate checks the field values on BulkCheckPermissionResponseItem 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 *BulkCheckPermissionResponseItem) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on BulkCheckPermissionResponseItem 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
+// BulkCheckPermissionResponseItemMultiError, or nil if none found.
+func (m *BulkCheckPermissionResponseItem) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *BulkCheckPermissionResponseItem) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if _, ok := _BulkCheckPermissionResponseItem_Permissionship_NotInLookup[m.GetPermissionship()]; ok {
+ err := BulkCheckPermissionResponseItemValidationError{
+ field: "Permissionship",
+ reason: "value must not be in list [PERMISSIONSHIP_UNSPECIFIED]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if _, ok := CheckPermissionResponse_Permissionship_name[int32(m.GetPermissionship())]; !ok {
+ err := BulkCheckPermissionResponseItemValidationError{
+ field: "Permissionship",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPartialCaveatInfo()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BulkCheckPermissionResponseItemValidationError{
+ field: "PartialCaveatInfo",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BulkCheckPermissionResponseItemValidationError{
+ 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 BulkCheckPermissionResponseItemValidationError{
+ field: "PartialCaveatInfo",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return BulkCheckPermissionResponseItemMultiError(errors)
+ }
+
+ return nil
+}
+
+// BulkCheckPermissionResponseItemMultiError is an error wrapping multiple
+// validation errors returned by BulkCheckPermissionResponseItem.ValidateAll()
+// if the designated constraints aren't met.
+type BulkCheckPermissionResponseItemMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m BulkCheckPermissionResponseItemMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m BulkCheckPermissionResponseItemMultiError) AllErrors() []error { return m }
+
+// BulkCheckPermissionResponseItemValidationError is the validation error
+// returned by BulkCheckPermissionResponseItem.Validate if the designated
+// constraints aren't met.
+type BulkCheckPermissionResponseItemValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e BulkCheckPermissionResponseItemValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e BulkCheckPermissionResponseItemValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e BulkCheckPermissionResponseItemValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e BulkCheckPermissionResponseItemValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e BulkCheckPermissionResponseItemValidationError) ErrorName() string {
+ return "BulkCheckPermissionResponseItemValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e BulkCheckPermissionResponseItemValidationError) 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 %sBulkCheckPermissionResponseItem.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = BulkCheckPermissionResponseItemValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = BulkCheckPermissionResponseItemValidationError{}
+
+var _BulkCheckPermissionResponseItem_Permissionship_NotInLookup = map[CheckPermissionResponse_Permissionship]struct{}{
+ 0: {},
+}
+
+// Validate checks the field values on BulkImportRelationshipsRequest 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 *BulkImportRelationshipsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on BulkImportRelationshipsRequest 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
+// BulkImportRelationshipsRequestMultiError, or nil if none found.
+func (m *BulkImportRelationshipsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *BulkImportRelationshipsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetRelationships() {
+ _, _ = idx, item
+
+ if item == nil {
+ err := BulkImportRelationshipsRequestValidationError{
+ field: fmt.Sprintf("Relationships[%v]", idx),
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BulkImportRelationshipsRequestValidationError{
+ 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, BulkImportRelationshipsRequestValidationError{
+ 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 BulkImportRelationshipsRequestValidationError{
+ field: fmt.Sprintf("Relationships[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return BulkImportRelationshipsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// BulkImportRelationshipsRequestMultiError is an error wrapping multiple
+// validation errors returned by BulkImportRelationshipsRequest.ValidateAll()
+// if the designated constraints aren't met.
+type BulkImportRelationshipsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m BulkImportRelationshipsRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m BulkImportRelationshipsRequestMultiError) AllErrors() []error { return m }
+
+// BulkImportRelationshipsRequestValidationError is the validation error
+// returned by BulkImportRelationshipsRequest.Validate if the designated
+// constraints aren't met.
+type BulkImportRelationshipsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e BulkImportRelationshipsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e BulkImportRelationshipsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e BulkImportRelationshipsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e BulkImportRelationshipsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e BulkImportRelationshipsRequestValidationError) ErrorName() string {
+ return "BulkImportRelationshipsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e BulkImportRelationshipsRequestValidationError) 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 %sBulkImportRelationshipsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = BulkImportRelationshipsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = BulkImportRelationshipsRequestValidationError{}
+
+// Validate checks the field values on BulkImportRelationshipsResponse 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 *BulkImportRelationshipsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on BulkImportRelationshipsResponse 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
+// BulkImportRelationshipsResponseMultiError, or nil if none found.
+func (m *BulkImportRelationshipsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *BulkImportRelationshipsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for NumLoaded
+
+ if len(errors) > 0 {
+ return BulkImportRelationshipsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// BulkImportRelationshipsResponseMultiError is an error wrapping multiple
+// validation errors returned by BulkImportRelationshipsResponse.ValidateAll()
+// if the designated constraints aren't met.
+type BulkImportRelationshipsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m BulkImportRelationshipsResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m BulkImportRelationshipsResponseMultiError) AllErrors() []error { return m }
+
+// BulkImportRelationshipsResponseValidationError is the validation error
+// returned by BulkImportRelationshipsResponse.Validate if the designated
+// constraints aren't met.
+type BulkImportRelationshipsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e BulkImportRelationshipsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e BulkImportRelationshipsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e BulkImportRelationshipsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e BulkImportRelationshipsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e BulkImportRelationshipsResponseValidationError) ErrorName() string {
+ return "BulkImportRelationshipsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e BulkImportRelationshipsResponseValidationError) 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 %sBulkImportRelationshipsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = BulkImportRelationshipsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = BulkImportRelationshipsResponseValidationError{}
+
+// Validate checks the field values on BulkExportRelationshipsRequest 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 *BulkExportRelationshipsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on BulkExportRelationshipsRequest 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
+// BulkExportRelationshipsRequestMultiError, or nil if none found.
+func (m *BulkExportRelationshipsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *BulkExportRelationshipsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BulkExportRelationshipsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BulkExportRelationshipsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return BulkExportRelationshipsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if m.GetOptionalLimit() < 0 {
+ err := BulkExportRelationshipsRequestValidationError{
+ field: "OptionalLimit",
+ reason: "value must be greater than or equal to 0",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetOptionalCursor()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BulkExportRelationshipsRequestValidationError{
+ field: "OptionalCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BulkExportRelationshipsRequestValidationError{
+ field: "OptionalCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalCursor()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return BulkExportRelationshipsRequestValidationError{
+ field: "OptionalCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetOptionalRelationshipFilter()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BulkExportRelationshipsRequestValidationError{
+ field: "OptionalRelationshipFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BulkExportRelationshipsRequestValidationError{
+ field: "OptionalRelationshipFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalRelationshipFilter()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return BulkExportRelationshipsRequestValidationError{
+ field: "OptionalRelationshipFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return BulkExportRelationshipsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// BulkExportRelationshipsRequestMultiError is an error wrapping multiple
+// validation errors returned by BulkExportRelationshipsRequest.ValidateAll()
+// if the designated constraints aren't met.
+type BulkExportRelationshipsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m BulkExportRelationshipsRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m BulkExportRelationshipsRequestMultiError) AllErrors() []error { return m }
+
+// BulkExportRelationshipsRequestValidationError is the validation error
+// returned by BulkExportRelationshipsRequest.Validate if the designated
+// constraints aren't met.
+type BulkExportRelationshipsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e BulkExportRelationshipsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e BulkExportRelationshipsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e BulkExportRelationshipsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e BulkExportRelationshipsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e BulkExportRelationshipsRequestValidationError) ErrorName() string {
+ return "BulkExportRelationshipsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e BulkExportRelationshipsRequestValidationError) 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 %sBulkExportRelationshipsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = BulkExportRelationshipsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = BulkExportRelationshipsRequestValidationError{}
+
+// Validate checks the field values on BulkExportRelationshipsResponse 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 *BulkExportRelationshipsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on BulkExportRelationshipsResponse 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
+// BulkExportRelationshipsResponseMultiError, or nil if none found.
+func (m *BulkExportRelationshipsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *BulkExportRelationshipsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetAfterResultCursor()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, BulkExportRelationshipsResponseValidationError{
+ field: "AfterResultCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, BulkExportRelationshipsResponseValidationError{
+ field: "AfterResultCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetAfterResultCursor()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return BulkExportRelationshipsResponseValidationError{
+ field: "AfterResultCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ 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, BulkExportRelationshipsResponseValidationError{
+ 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, BulkExportRelationshipsResponseValidationError{
+ 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 BulkExportRelationshipsResponseValidationError{
+ field: fmt.Sprintf("Relationships[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return BulkExportRelationshipsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// BulkExportRelationshipsResponseMultiError is an error wrapping multiple
+// validation errors returned by BulkExportRelationshipsResponse.ValidateAll()
+// if the designated constraints aren't met.
+type BulkExportRelationshipsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m BulkExportRelationshipsResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m BulkExportRelationshipsResponseMultiError) AllErrors() []error { return m }
+
+// BulkExportRelationshipsResponseValidationError is the validation error
+// returned by BulkExportRelationshipsResponse.Validate if the designated
+// constraints aren't met.
+type BulkExportRelationshipsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e BulkExportRelationshipsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e BulkExportRelationshipsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e BulkExportRelationshipsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e BulkExportRelationshipsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e BulkExportRelationshipsResponseValidationError) ErrorName() string {
+ return "BulkExportRelationshipsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e BulkExportRelationshipsResponseValidationError) 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 %sBulkExportRelationshipsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = BulkExportRelationshipsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = BulkExportRelationshipsResponseValidationError{}
+
+// Validate checks the field values on ExperimentalReflectSchemaRequest 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 *ExperimentalReflectSchemaRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExperimentalReflectSchemaRequest 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
+// ExperimentalReflectSchemaRequestMultiError, or nil if none found.
+func (m *ExperimentalReflectSchemaRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExperimentalReflectSchemaRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExperimentalReflectSchemaRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExperimentalReflectSchemaRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExperimentalReflectSchemaRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetOptionalFilters() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExperimentalReflectSchemaRequestValidationError{
+ field: fmt.Sprintf("OptionalFilters[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExperimentalReflectSchemaRequestValidationError{
+ field: fmt.Sprintf("OptionalFilters[%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 ExperimentalReflectSchemaRequestValidationError{
+ field: fmt.Sprintf("OptionalFilters[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ExperimentalReflectSchemaRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExperimentalReflectSchemaRequestMultiError is an error wrapping multiple
+// validation errors returned by
+// ExperimentalReflectSchemaRequest.ValidateAll() if the designated
+// constraints aren't met.
+type ExperimentalReflectSchemaRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExperimentalReflectSchemaRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExperimentalReflectSchemaRequestMultiError) AllErrors() []error { return m }
+
+// ExperimentalReflectSchemaRequestValidationError is the validation error
+// returned by ExperimentalReflectSchemaRequest.Validate if the designated
+// constraints aren't met.
+type ExperimentalReflectSchemaRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExperimentalReflectSchemaRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExperimentalReflectSchemaRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExperimentalReflectSchemaRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExperimentalReflectSchemaRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExperimentalReflectSchemaRequestValidationError) ErrorName() string {
+ return "ExperimentalReflectSchemaRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExperimentalReflectSchemaRequestValidationError) 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 %sExperimentalReflectSchemaRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExperimentalReflectSchemaRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExperimentalReflectSchemaRequestValidationError{}
+
+// Validate checks the field values on ExperimentalReflectSchemaResponse 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 *ExperimentalReflectSchemaResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExperimentalReflectSchemaResponse
+// 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
+// ExperimentalReflectSchemaResponseMultiError, or nil if none found.
+func (m *ExperimentalReflectSchemaResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExperimentalReflectSchemaResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetDefinitions() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExperimentalReflectSchemaResponseValidationError{
+ field: fmt.Sprintf("Definitions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExperimentalReflectSchemaResponseValidationError{
+ field: fmt.Sprintf("Definitions[%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 ExperimentalReflectSchemaResponseValidationError{
+ field: fmt.Sprintf("Definitions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ for idx, item := range m.GetCaveats() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExperimentalReflectSchemaResponseValidationError{
+ field: fmt.Sprintf("Caveats[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExperimentalReflectSchemaResponseValidationError{
+ field: fmt.Sprintf("Caveats[%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 ExperimentalReflectSchemaResponseValidationError{
+ field: fmt.Sprintf("Caveats[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetReadAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExperimentalReflectSchemaResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExperimentalReflectSchemaResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetReadAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExperimentalReflectSchemaResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ExperimentalReflectSchemaResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExperimentalReflectSchemaResponseMultiError is an error wrapping multiple
+// validation errors returned by
+// ExperimentalReflectSchemaResponse.ValidateAll() if the designated
+// constraints aren't met.
+type ExperimentalReflectSchemaResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExperimentalReflectSchemaResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExperimentalReflectSchemaResponseMultiError) AllErrors() []error { return m }
+
+// ExperimentalReflectSchemaResponseValidationError is the validation error
+// returned by ExperimentalReflectSchemaResponse.Validate if the designated
+// constraints aren't met.
+type ExperimentalReflectSchemaResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExperimentalReflectSchemaResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExperimentalReflectSchemaResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExperimentalReflectSchemaResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExperimentalReflectSchemaResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExperimentalReflectSchemaResponseValidationError) ErrorName() string {
+ return "ExperimentalReflectSchemaResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExperimentalReflectSchemaResponseValidationError) 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 %sExperimentalReflectSchemaResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExperimentalReflectSchemaResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExperimentalReflectSchemaResponseValidationError{}
+
+// Validate checks the field values on ExpSchemaFilter 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 *ExpSchemaFilter) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExpSchemaFilter 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
+// ExpSchemaFilterMultiError, or nil if none found.
+func (m *ExpSchemaFilter) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExpSchemaFilter) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for OptionalDefinitionNameFilter
+
+ // no validation rules for OptionalCaveatNameFilter
+
+ // no validation rules for OptionalRelationNameFilter
+
+ // no validation rules for OptionalPermissionNameFilter
+
+ if len(errors) > 0 {
+ return ExpSchemaFilterMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExpSchemaFilterMultiError is an error wrapping multiple validation errors
+// returned by ExpSchemaFilter.ValidateAll() if the designated constraints
+// aren't met.
+type ExpSchemaFilterMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExpSchemaFilterMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExpSchemaFilterMultiError) AllErrors() []error { return m }
+
+// ExpSchemaFilterValidationError is the validation error returned by
+// ExpSchemaFilter.Validate if the designated constraints aren't met.
+type ExpSchemaFilterValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExpSchemaFilterValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExpSchemaFilterValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExpSchemaFilterValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExpSchemaFilterValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExpSchemaFilterValidationError) ErrorName() string { return "ExpSchemaFilterValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ExpSchemaFilterValidationError) 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 %sExpSchemaFilter.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExpSchemaFilterValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExpSchemaFilterValidationError{}
+
+// Validate checks the field values on ExpDefinition 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 *ExpDefinition) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExpDefinition 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 ExpDefinitionMultiError, or
+// nil if none found.
+func (m *ExpDefinition) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExpDefinition) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for Comment
+
+ for idx, item := range m.GetRelations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpDefinitionValidationError{
+ field: fmt.Sprintf("Relations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpDefinitionValidationError{
+ field: fmt.Sprintf("Relations[%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 ExpDefinitionValidationError{
+ field: fmt.Sprintf("Relations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ for idx, item := range m.GetPermissions() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpDefinitionValidationError{
+ field: fmt.Sprintf("Permissions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpDefinitionValidationError{
+ field: fmt.Sprintf("Permissions[%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 ExpDefinitionValidationError{
+ field: fmt.Sprintf("Permissions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ExpDefinitionMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExpDefinitionMultiError is an error wrapping multiple validation errors
+// returned by ExpDefinition.ValidateAll() if the designated constraints
+// aren't met.
+type ExpDefinitionMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExpDefinitionMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExpDefinitionMultiError) AllErrors() []error { return m }
+
+// ExpDefinitionValidationError is the validation error returned by
+// ExpDefinition.Validate if the designated constraints aren't met.
+type ExpDefinitionValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExpDefinitionValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExpDefinitionValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExpDefinitionValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExpDefinitionValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExpDefinitionValidationError) ErrorName() string { return "ExpDefinitionValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ExpDefinitionValidationError) 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 %sExpDefinition.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExpDefinitionValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExpDefinitionValidationError{}
+
+// Validate checks the field values on ExpCaveat 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 *ExpCaveat) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExpCaveat 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 ExpCaveatMultiError, or nil
+// if none found.
+func (m *ExpCaveat) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExpCaveat) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for Comment
+
+ for idx, item := range m.GetParameters() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpCaveatValidationError{
+ field: fmt.Sprintf("Parameters[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpCaveatValidationError{
+ field: fmt.Sprintf("Parameters[%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 ExpCaveatValidationError{
+ field: fmt.Sprintf("Parameters[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ // no validation rules for Expression
+
+ if len(errors) > 0 {
+ return ExpCaveatMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExpCaveatMultiError is an error wrapping multiple validation errors returned
+// by ExpCaveat.ValidateAll() if the designated constraints aren't met.
+type ExpCaveatMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExpCaveatMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExpCaveatMultiError) AllErrors() []error { return m }
+
+// ExpCaveatValidationError is the validation error returned by
+// ExpCaveat.Validate if the designated constraints aren't met.
+type ExpCaveatValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExpCaveatValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExpCaveatValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExpCaveatValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExpCaveatValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExpCaveatValidationError) ErrorName() string { return "ExpCaveatValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ExpCaveatValidationError) 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 %sExpCaveat.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExpCaveatValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExpCaveatValidationError{}
+
+// Validate checks the field values on ExpCaveatParameter 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 *ExpCaveatParameter) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExpCaveatParameter 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
+// ExpCaveatParameterMultiError, or nil if none found.
+func (m *ExpCaveatParameter) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExpCaveatParameter) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for Type
+
+ // no validation rules for ParentCaveatName
+
+ if len(errors) > 0 {
+ return ExpCaveatParameterMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExpCaveatParameterMultiError is an error wrapping multiple validation errors
+// returned by ExpCaveatParameter.ValidateAll() if the designated constraints
+// aren't met.
+type ExpCaveatParameterMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExpCaveatParameterMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExpCaveatParameterMultiError) AllErrors() []error { return m }
+
+// ExpCaveatParameterValidationError is the validation error returned by
+// ExpCaveatParameter.Validate if the designated constraints aren't met.
+type ExpCaveatParameterValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExpCaveatParameterValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExpCaveatParameterValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExpCaveatParameterValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExpCaveatParameterValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExpCaveatParameterValidationError) ErrorName() string {
+ return "ExpCaveatParameterValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExpCaveatParameterValidationError) 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 %sExpCaveatParameter.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExpCaveatParameterValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExpCaveatParameterValidationError{}
+
+// Validate checks the field values on ExpRelation 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 *ExpRelation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExpRelation 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 ExpRelationMultiError, or
+// nil if none found.
+func (m *ExpRelation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExpRelation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for Comment
+
+ // no validation rules for ParentDefinitionName
+
+ for idx, item := range m.GetSubjectTypes() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpRelationValidationError{
+ field: fmt.Sprintf("SubjectTypes[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpRelationValidationError{
+ field: fmt.Sprintf("SubjectTypes[%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 ExpRelationValidationError{
+ field: fmt.Sprintf("SubjectTypes[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ExpRelationMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExpRelationMultiError is an error wrapping multiple validation errors
+// returned by ExpRelation.ValidateAll() if the designated constraints aren't met.
+type ExpRelationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExpRelationMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExpRelationMultiError) AllErrors() []error { return m }
+
+// ExpRelationValidationError is the validation error returned by
+// ExpRelation.Validate if the designated constraints aren't met.
+type ExpRelationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExpRelationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExpRelationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExpRelationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExpRelationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExpRelationValidationError) ErrorName() string { return "ExpRelationValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ExpRelationValidationError) 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 %sExpRelation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExpRelationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExpRelationValidationError{}
+
+// Validate checks the field values on ExpTypeReference 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 *ExpTypeReference) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExpTypeReference 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
+// ExpTypeReferenceMultiError, or nil if none found.
+func (m *ExpTypeReference) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExpTypeReference) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for SubjectDefinitionName
+
+ // no validation rules for OptionalCaveatName
+
+ switch v := m.Typeref.(type) {
+ case *ExpTypeReference_IsTerminalSubject:
+ if v == nil {
+ err := ExpTypeReferenceValidationError{
+ field: "Typeref",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ // no validation rules for IsTerminalSubject
+ case *ExpTypeReference_OptionalRelationName:
+ if v == nil {
+ err := ExpTypeReferenceValidationError{
+ field: "Typeref",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ // no validation rules for OptionalRelationName
+ case *ExpTypeReference_IsPublicWildcard:
+ if v == nil {
+ err := ExpTypeReferenceValidationError{
+ field: "Typeref",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ // no validation rules for IsPublicWildcard
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return ExpTypeReferenceMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExpTypeReferenceMultiError is an error wrapping multiple validation errors
+// returned by ExpTypeReference.ValidateAll() if the designated constraints
+// aren't met.
+type ExpTypeReferenceMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExpTypeReferenceMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExpTypeReferenceMultiError) AllErrors() []error { return m }
+
+// ExpTypeReferenceValidationError is the validation error returned by
+// ExpTypeReference.Validate if the designated constraints aren't met.
+type ExpTypeReferenceValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExpTypeReferenceValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExpTypeReferenceValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExpTypeReferenceValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExpTypeReferenceValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExpTypeReferenceValidationError) ErrorName() string { return "ExpTypeReferenceValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ExpTypeReferenceValidationError) 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 %sExpTypeReference.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExpTypeReferenceValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExpTypeReferenceValidationError{}
+
+// Validate checks the field values on ExpPermission 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 *ExpPermission) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExpPermission 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 ExpPermissionMultiError, or
+// nil if none found.
+func (m *ExpPermission) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExpPermission) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for Comment
+
+ // no validation rules for ParentDefinitionName
+
+ if len(errors) > 0 {
+ return ExpPermissionMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExpPermissionMultiError is an error wrapping multiple validation errors
+// returned by ExpPermission.ValidateAll() if the designated constraints
+// aren't met.
+type ExpPermissionMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExpPermissionMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExpPermissionMultiError) AllErrors() []error { return m }
+
+// ExpPermissionValidationError is the validation error returned by
+// ExpPermission.Validate if the designated constraints aren't met.
+type ExpPermissionValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExpPermissionValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExpPermissionValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExpPermissionValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExpPermissionValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExpPermissionValidationError) ErrorName() string { return "ExpPermissionValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ExpPermissionValidationError) 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 %sExpPermission.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExpPermissionValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExpPermissionValidationError{}
+
+// Validate checks the field values on ExperimentalComputablePermissionsRequest
+// 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 *ExperimentalComputablePermissionsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// ExperimentalComputablePermissionsRequest 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
+// ExperimentalComputablePermissionsRequestMultiError, or nil if none found.
+func (m *ExperimentalComputablePermissionsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExperimentalComputablePermissionsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExperimentalComputablePermissionsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExperimentalComputablePermissionsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExperimentalComputablePermissionsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for DefinitionName
+
+ // no validation rules for RelationName
+
+ // no validation rules for OptionalDefinitionNameFilter
+
+ if len(errors) > 0 {
+ return ExperimentalComputablePermissionsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExperimentalComputablePermissionsRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// ExperimentalComputablePermissionsRequest.ValidateAll() if the designated
+// constraints aren't met.
+type ExperimentalComputablePermissionsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExperimentalComputablePermissionsRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExperimentalComputablePermissionsRequestMultiError) AllErrors() []error { return m }
+
+// ExperimentalComputablePermissionsRequestValidationError is the validation
+// error returned by ExperimentalComputablePermissionsRequest.Validate if the
+// designated constraints aren't met.
+type ExperimentalComputablePermissionsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExperimentalComputablePermissionsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExperimentalComputablePermissionsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExperimentalComputablePermissionsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExperimentalComputablePermissionsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExperimentalComputablePermissionsRequestValidationError) ErrorName() string {
+ return "ExperimentalComputablePermissionsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExperimentalComputablePermissionsRequestValidationError) 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 %sExperimentalComputablePermissionsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExperimentalComputablePermissionsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExperimentalComputablePermissionsRequestValidationError{}
+
+// Validate checks the field values on ExpRelationReference 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 *ExpRelationReference) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExpRelationReference 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
+// ExpRelationReferenceMultiError, or nil if none found.
+func (m *ExpRelationReference) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExpRelationReference) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for DefinitionName
+
+ // no validation rules for RelationName
+
+ // no validation rules for IsPermission
+
+ if len(errors) > 0 {
+ return ExpRelationReferenceMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExpRelationReferenceMultiError is an error wrapping multiple validation
+// errors returned by ExpRelationReference.ValidateAll() if the designated
+// constraints aren't met.
+type ExpRelationReferenceMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExpRelationReferenceMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExpRelationReferenceMultiError) AllErrors() []error { return m }
+
+// ExpRelationReferenceValidationError is the validation error returned by
+// ExpRelationReference.Validate if the designated constraints aren't met.
+type ExpRelationReferenceValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExpRelationReferenceValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExpRelationReferenceValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExpRelationReferenceValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExpRelationReferenceValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExpRelationReferenceValidationError) ErrorName() string {
+ return "ExpRelationReferenceValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExpRelationReferenceValidationError) 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 %sExpRelationReference.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExpRelationReferenceValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExpRelationReferenceValidationError{}
+
+// Validate checks the field values on
+// ExperimentalComputablePermissionsResponse 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 *ExperimentalComputablePermissionsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// ExperimentalComputablePermissionsResponse 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
+// ExperimentalComputablePermissionsResponseMultiError, or nil if none found.
+func (m *ExperimentalComputablePermissionsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExperimentalComputablePermissionsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetPermissions() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExperimentalComputablePermissionsResponseValidationError{
+ field: fmt.Sprintf("Permissions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExperimentalComputablePermissionsResponseValidationError{
+ field: fmt.Sprintf("Permissions[%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 ExperimentalComputablePermissionsResponseValidationError{
+ field: fmt.Sprintf("Permissions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetReadAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExperimentalComputablePermissionsResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExperimentalComputablePermissionsResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetReadAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExperimentalComputablePermissionsResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ExperimentalComputablePermissionsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExperimentalComputablePermissionsResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// ExperimentalComputablePermissionsResponse.ValidateAll() if the designated
+// constraints aren't met.
+type ExperimentalComputablePermissionsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExperimentalComputablePermissionsResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExperimentalComputablePermissionsResponseMultiError) AllErrors() []error { return m }
+
+// ExperimentalComputablePermissionsResponseValidationError is the validation
+// error returned by ExperimentalComputablePermissionsResponse.Validate if the
+// designated constraints aren't met.
+type ExperimentalComputablePermissionsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExperimentalComputablePermissionsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExperimentalComputablePermissionsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExperimentalComputablePermissionsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExperimentalComputablePermissionsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExperimentalComputablePermissionsResponseValidationError) ErrorName() string {
+ return "ExperimentalComputablePermissionsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExperimentalComputablePermissionsResponseValidationError) 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 %sExperimentalComputablePermissionsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExperimentalComputablePermissionsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExperimentalComputablePermissionsResponseValidationError{}
+
+// Validate checks the field values on ExperimentalDependentRelationsRequest
+// 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 *ExperimentalDependentRelationsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExperimentalDependentRelationsRequest
+// 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
+// ExperimentalDependentRelationsRequestMultiError, or nil if none found.
+func (m *ExperimentalDependentRelationsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExperimentalDependentRelationsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExperimentalDependentRelationsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExperimentalDependentRelationsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExperimentalDependentRelationsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for DefinitionName
+
+ // no validation rules for PermissionName
+
+ if len(errors) > 0 {
+ return ExperimentalDependentRelationsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExperimentalDependentRelationsRequestMultiError is an error wrapping
+// multiple validation errors returned by
+// ExperimentalDependentRelationsRequest.ValidateAll() if the designated
+// constraints aren't met.
+type ExperimentalDependentRelationsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExperimentalDependentRelationsRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExperimentalDependentRelationsRequestMultiError) AllErrors() []error { return m }
+
+// ExperimentalDependentRelationsRequestValidationError is the validation error
+// returned by ExperimentalDependentRelationsRequest.Validate if the
+// designated constraints aren't met.
+type ExperimentalDependentRelationsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExperimentalDependentRelationsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExperimentalDependentRelationsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExperimentalDependentRelationsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExperimentalDependentRelationsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExperimentalDependentRelationsRequestValidationError) ErrorName() string {
+ return "ExperimentalDependentRelationsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExperimentalDependentRelationsRequestValidationError) 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 %sExperimentalDependentRelationsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExperimentalDependentRelationsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExperimentalDependentRelationsRequestValidationError{}
+
+// Validate checks the field values on ExperimentalDependentRelationsResponse
+// 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 *ExperimentalDependentRelationsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// ExperimentalDependentRelationsResponse 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
+// ExperimentalDependentRelationsResponseMultiError, or nil if none found.
+func (m *ExperimentalDependentRelationsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExperimentalDependentRelationsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetRelations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExperimentalDependentRelationsResponseValidationError{
+ field: fmt.Sprintf("Relations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExperimentalDependentRelationsResponseValidationError{
+ field: fmt.Sprintf("Relations[%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 ExperimentalDependentRelationsResponseValidationError{
+ field: fmt.Sprintf("Relations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetReadAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExperimentalDependentRelationsResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExperimentalDependentRelationsResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetReadAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExperimentalDependentRelationsResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ExperimentalDependentRelationsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExperimentalDependentRelationsResponseMultiError is an error wrapping
+// multiple validation errors returned by
+// ExperimentalDependentRelationsResponse.ValidateAll() if the designated
+// constraints aren't met.
+type ExperimentalDependentRelationsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExperimentalDependentRelationsResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExperimentalDependentRelationsResponseMultiError) AllErrors() []error { return m }
+
+// ExperimentalDependentRelationsResponseValidationError is the validation
+// error returned by ExperimentalDependentRelationsResponse.Validate if the
+// designated constraints aren't met.
+type ExperimentalDependentRelationsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExperimentalDependentRelationsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExperimentalDependentRelationsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExperimentalDependentRelationsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExperimentalDependentRelationsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExperimentalDependentRelationsResponseValidationError) ErrorName() string {
+ return "ExperimentalDependentRelationsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExperimentalDependentRelationsResponseValidationError) 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 %sExperimentalDependentRelationsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExperimentalDependentRelationsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExperimentalDependentRelationsResponseValidationError{}
+
+// Validate checks the field values on ExperimentalDiffSchemaRequest 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 *ExperimentalDiffSchemaRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExperimentalDiffSchemaRequest 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
+// ExperimentalDiffSchemaRequestMultiError, or nil if none found.
+func (m *ExperimentalDiffSchemaRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExperimentalDiffSchemaRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExperimentalDiffSchemaRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExperimentalDiffSchemaRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExperimentalDiffSchemaRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for ComparisonSchema
+
+ if len(errors) > 0 {
+ return ExperimentalDiffSchemaRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExperimentalDiffSchemaRequestMultiError is an error wrapping multiple
+// validation errors returned by ExperimentalDiffSchemaRequest.ValidateAll()
+// if the designated constraints aren't met.
+type ExperimentalDiffSchemaRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExperimentalDiffSchemaRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExperimentalDiffSchemaRequestMultiError) AllErrors() []error { return m }
+
+// ExperimentalDiffSchemaRequestValidationError is the validation error
+// returned by ExperimentalDiffSchemaRequest.Validate if the designated
+// constraints aren't met.
+type ExperimentalDiffSchemaRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExperimentalDiffSchemaRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExperimentalDiffSchemaRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExperimentalDiffSchemaRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExperimentalDiffSchemaRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExperimentalDiffSchemaRequestValidationError) ErrorName() string {
+ return "ExperimentalDiffSchemaRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExperimentalDiffSchemaRequestValidationError) 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 %sExperimentalDiffSchemaRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExperimentalDiffSchemaRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExperimentalDiffSchemaRequestValidationError{}
+
+// Validate checks the field values on ExperimentalDiffSchemaResponse 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 *ExperimentalDiffSchemaResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExperimentalDiffSchemaResponse 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
+// ExperimentalDiffSchemaResponseMultiError, or nil if none found.
+func (m *ExperimentalDiffSchemaResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExperimentalDiffSchemaResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetDiffs() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExperimentalDiffSchemaResponseValidationError{
+ field: fmt.Sprintf("Diffs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExperimentalDiffSchemaResponseValidationError{
+ field: fmt.Sprintf("Diffs[%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 ExperimentalDiffSchemaResponseValidationError{
+ field: fmt.Sprintf("Diffs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetReadAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExperimentalDiffSchemaResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExperimentalDiffSchemaResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetReadAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExperimentalDiffSchemaResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ExperimentalDiffSchemaResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExperimentalDiffSchemaResponseMultiError is an error wrapping multiple
+// validation errors returned by ExperimentalDiffSchemaResponse.ValidateAll()
+// if the designated constraints aren't met.
+type ExperimentalDiffSchemaResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExperimentalDiffSchemaResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExperimentalDiffSchemaResponseMultiError) AllErrors() []error { return m }
+
+// ExperimentalDiffSchemaResponseValidationError is the validation error
+// returned by ExperimentalDiffSchemaResponse.Validate if the designated
+// constraints aren't met.
+type ExperimentalDiffSchemaResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExperimentalDiffSchemaResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExperimentalDiffSchemaResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExperimentalDiffSchemaResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExperimentalDiffSchemaResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExperimentalDiffSchemaResponseValidationError) ErrorName() string {
+ return "ExperimentalDiffSchemaResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExperimentalDiffSchemaResponseValidationError) 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 %sExperimentalDiffSchemaResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExperimentalDiffSchemaResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExperimentalDiffSchemaResponseValidationError{}
+
+// Validate checks the field values on ExpRelationSubjectTypeChange 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 *ExpRelationSubjectTypeChange) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExpRelationSubjectTypeChange 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
+// ExpRelationSubjectTypeChangeMultiError, or nil if none found.
+func (m *ExpRelationSubjectTypeChange) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExpRelationSubjectTypeChange) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetRelation()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpRelationSubjectTypeChangeValidationError{
+ field: "Relation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpRelationSubjectTypeChangeValidationError{
+ field: "Relation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelation()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpRelationSubjectTypeChangeValidationError{
+ field: "Relation",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetChangedSubjectType()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpRelationSubjectTypeChangeValidationError{
+ field: "ChangedSubjectType",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpRelationSubjectTypeChangeValidationError{
+ field: "ChangedSubjectType",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetChangedSubjectType()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpRelationSubjectTypeChangeValidationError{
+ field: "ChangedSubjectType",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ExpRelationSubjectTypeChangeMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExpRelationSubjectTypeChangeMultiError is an error wrapping multiple
+// validation errors returned by ExpRelationSubjectTypeChange.ValidateAll() if
+// the designated constraints aren't met.
+type ExpRelationSubjectTypeChangeMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExpRelationSubjectTypeChangeMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExpRelationSubjectTypeChangeMultiError) AllErrors() []error { return m }
+
+// ExpRelationSubjectTypeChangeValidationError is the validation error returned
+// by ExpRelationSubjectTypeChange.Validate if the designated constraints
+// aren't met.
+type ExpRelationSubjectTypeChangeValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExpRelationSubjectTypeChangeValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExpRelationSubjectTypeChangeValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExpRelationSubjectTypeChangeValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExpRelationSubjectTypeChangeValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExpRelationSubjectTypeChangeValidationError) ErrorName() string {
+ return "ExpRelationSubjectTypeChangeValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExpRelationSubjectTypeChangeValidationError) 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 %sExpRelationSubjectTypeChange.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExpRelationSubjectTypeChangeValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExpRelationSubjectTypeChangeValidationError{}
+
+// Validate checks the field values on ExpCaveatParameterTypeChange 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 *ExpCaveatParameterTypeChange) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExpCaveatParameterTypeChange 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
+// ExpCaveatParameterTypeChangeMultiError, or nil if none found.
+func (m *ExpCaveatParameterTypeChange) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExpCaveatParameterTypeChange) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetParameter()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpCaveatParameterTypeChangeValidationError{
+ field: "Parameter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpCaveatParameterTypeChangeValidationError{
+ field: "Parameter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetParameter()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpCaveatParameterTypeChangeValidationError{
+ field: "Parameter",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for PreviousType
+
+ if len(errors) > 0 {
+ return ExpCaveatParameterTypeChangeMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExpCaveatParameterTypeChangeMultiError is an error wrapping multiple
+// validation errors returned by ExpCaveatParameterTypeChange.ValidateAll() if
+// the designated constraints aren't met.
+type ExpCaveatParameterTypeChangeMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExpCaveatParameterTypeChangeMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExpCaveatParameterTypeChangeMultiError) AllErrors() []error { return m }
+
+// ExpCaveatParameterTypeChangeValidationError is the validation error returned
+// by ExpCaveatParameterTypeChange.Validate if the designated constraints
+// aren't met.
+type ExpCaveatParameterTypeChangeValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExpCaveatParameterTypeChangeValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExpCaveatParameterTypeChangeValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExpCaveatParameterTypeChangeValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExpCaveatParameterTypeChangeValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExpCaveatParameterTypeChangeValidationError) ErrorName() string {
+ return "ExpCaveatParameterTypeChangeValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExpCaveatParameterTypeChangeValidationError) 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 %sExpCaveatParameterTypeChange.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExpCaveatParameterTypeChangeValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExpCaveatParameterTypeChangeValidationError{}
+
+// Validate checks the field values on ExpSchemaDiff 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 *ExpSchemaDiff) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExpSchemaDiff 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 ExpSchemaDiffMultiError, or
+// nil if none found.
+func (m *ExpSchemaDiff) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExpSchemaDiff) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ switch v := m.Diff.(type) {
+ case *ExpSchemaDiff_DefinitionAdded:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetDefinitionAdded()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "DefinitionAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "DefinitionAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetDefinitionAdded()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "DefinitionAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_DefinitionRemoved:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetDefinitionRemoved()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "DefinitionRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "DefinitionRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetDefinitionRemoved()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "DefinitionRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_DefinitionDocCommentChanged:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetDefinitionDocCommentChanged()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "DefinitionDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "DefinitionDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetDefinitionDocCommentChanged()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "DefinitionDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_RelationAdded:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRelationAdded()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "RelationAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "RelationAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelationAdded()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "RelationAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_RelationRemoved:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRelationRemoved()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "RelationRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "RelationRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelationRemoved()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "RelationRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_RelationDocCommentChanged:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRelationDocCommentChanged()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "RelationDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "RelationDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelationDocCommentChanged()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "RelationDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_RelationSubjectTypeAdded:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRelationSubjectTypeAdded()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "RelationSubjectTypeAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "RelationSubjectTypeAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelationSubjectTypeAdded()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "RelationSubjectTypeAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_RelationSubjectTypeRemoved:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRelationSubjectTypeRemoved()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "RelationSubjectTypeRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "RelationSubjectTypeRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelationSubjectTypeRemoved()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "RelationSubjectTypeRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_PermissionAdded:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPermissionAdded()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "PermissionAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "PermissionAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPermissionAdded()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "PermissionAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_PermissionRemoved:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPermissionRemoved()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "PermissionRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "PermissionRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPermissionRemoved()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "PermissionRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_PermissionDocCommentChanged:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPermissionDocCommentChanged()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "PermissionDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "PermissionDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPermissionDocCommentChanged()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "PermissionDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_PermissionExprChanged:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPermissionExprChanged()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "PermissionExprChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "PermissionExprChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPermissionExprChanged()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "PermissionExprChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_CaveatAdded:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCaveatAdded()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "CaveatAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "CaveatAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCaveatAdded()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "CaveatAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_CaveatRemoved:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCaveatRemoved()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "CaveatRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "CaveatRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCaveatRemoved()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "CaveatRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_CaveatDocCommentChanged:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCaveatDocCommentChanged()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "CaveatDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "CaveatDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCaveatDocCommentChanged()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "CaveatDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_CaveatExprChanged:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCaveatExprChanged()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "CaveatExprChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "CaveatExprChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCaveatExprChanged()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "CaveatExprChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_CaveatParameterAdded:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCaveatParameterAdded()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "CaveatParameterAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "CaveatParameterAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCaveatParameterAdded()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "CaveatParameterAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_CaveatParameterRemoved:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCaveatParameterRemoved()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "CaveatParameterRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "CaveatParameterRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCaveatParameterRemoved()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "CaveatParameterRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ExpSchemaDiff_CaveatParameterTypeChanged:
+ if v == nil {
+ err := ExpSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCaveatParameterTypeChanged()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "CaveatParameterTypeChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpSchemaDiffValidationError{
+ field: "CaveatParameterTypeChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCaveatParameterTypeChanged()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpSchemaDiffValidationError{
+ field: "CaveatParameterTypeChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return ExpSchemaDiffMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExpSchemaDiffMultiError is an error wrapping multiple validation errors
+// returned by ExpSchemaDiff.ValidateAll() if the designated constraints
+// aren't met.
+type ExpSchemaDiffMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExpSchemaDiffMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExpSchemaDiffMultiError) AllErrors() []error { return m }
+
+// ExpSchemaDiffValidationError is the validation error returned by
+// ExpSchemaDiff.Validate if the designated constraints aren't met.
+type ExpSchemaDiffValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExpSchemaDiffValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExpSchemaDiffValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExpSchemaDiffValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExpSchemaDiffValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExpSchemaDiffValidationError) ErrorName() string { return "ExpSchemaDiffValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ExpSchemaDiffValidationError) 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 %sExpSchemaDiff.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExpSchemaDiffValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExpSchemaDiffValidationError{}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service_grpc.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service_grpc.pb.go
new file mode 100644
index 0000000..004ce80
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service_grpc.pb.go
@@ -0,0 +1,525 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.5.1
+// - protoc (unknown)
+// source: authzed/api/v1/experimental_service.proto
+
+package v1
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ ExperimentalService_BulkImportRelationships_FullMethodName = "/authzed.api.v1.ExperimentalService/BulkImportRelationships"
+ ExperimentalService_BulkExportRelationships_FullMethodName = "/authzed.api.v1.ExperimentalService/BulkExportRelationships"
+ ExperimentalService_BulkCheckPermission_FullMethodName = "/authzed.api.v1.ExperimentalService/BulkCheckPermission"
+ ExperimentalService_ExperimentalReflectSchema_FullMethodName = "/authzed.api.v1.ExperimentalService/ExperimentalReflectSchema"
+ ExperimentalService_ExperimentalComputablePermissions_FullMethodName = "/authzed.api.v1.ExperimentalService/ExperimentalComputablePermissions"
+ ExperimentalService_ExperimentalDependentRelations_FullMethodName = "/authzed.api.v1.ExperimentalService/ExperimentalDependentRelations"
+ ExperimentalService_ExperimentalDiffSchema_FullMethodName = "/authzed.api.v1.ExperimentalService/ExperimentalDiffSchema"
+ ExperimentalService_ExperimentalRegisterRelationshipCounter_FullMethodName = "/authzed.api.v1.ExperimentalService/ExperimentalRegisterRelationshipCounter"
+ ExperimentalService_ExperimentalCountRelationships_FullMethodName = "/authzed.api.v1.ExperimentalService/ExperimentalCountRelationships"
+ ExperimentalService_ExperimentalUnregisterRelationshipCounter_FullMethodName = "/authzed.api.v1.ExperimentalService/ExperimentalUnregisterRelationshipCounter"
+)
+
+// ExperimentalServiceClient is the client API for ExperimentalService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+//
+// ExperimentalService exposes a number of APIs that are currently being
+// prototyped and tested for future inclusion in the stable API.
+type ExperimentalServiceClient interface {
+ // BulkImportRelationships is a faster path to writing a large number of
+ // relationships at once. It is both batched and streaming. For maximum
+ // performance, the caller should attempt to write relationships in as close
+ // to relationship sort order as possible: (resource.object_type,
+ // resource.object_id, relation, subject.object.object_type,
+ // subject.object.object_id, subject.optional_relation)
+ //
+ // EXPERIMENTAL
+ // https://github.com/authzed/spicedb/issues/1303
+ BulkImportRelationships(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[BulkImportRelationshipsRequest, BulkImportRelationshipsResponse], error)
+ // BulkExportRelationships is the fastest path available to exporting
+ // relationships from the server. It is resumable, and will return results
+ // in an order determined by the server.
+ BulkExportRelationships(ctx context.Context, in *BulkExportRelationshipsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BulkExportRelationshipsResponse], error)
+ // Deprecated: Do not use.
+ // NOTE: BulkCheckPermission has been promoted to the stable API as "CheckBulkPermission" and the
+ // API will be removed from experimental in a future release.
+ BulkCheckPermission(ctx context.Context, in *BulkCheckPermissionRequest, opts ...grpc.CallOption) (*BulkCheckPermissionResponse, error)
+ // Deprecated: Do not use.
+ // DEPRECATED: Promoted to ReflectSchema in the stable API.
+ ExperimentalReflectSchema(ctx context.Context, in *ExperimentalReflectSchemaRequest, opts ...grpc.CallOption) (*ExperimentalReflectSchemaResponse, error)
+ // Deprecated: Do not use.
+ // DEPRECATED: Promoted to ComputablePermissions in the stable API.
+ ExperimentalComputablePermissions(ctx context.Context, in *ExperimentalComputablePermissionsRequest, opts ...grpc.CallOption) (*ExperimentalComputablePermissionsResponse, error)
+ // Deprecated: Do not use.
+ // DEPRECATED: Promoted to DependentRelations in the stable API.
+ ExperimentalDependentRelations(ctx context.Context, in *ExperimentalDependentRelationsRequest, opts ...grpc.CallOption) (*ExperimentalDependentRelationsResponse, error)
+ // Deprecated: Do not use.
+ // DEPRECATED: Promoted to DiffSchema in the stable API.
+ ExperimentalDiffSchema(ctx context.Context, in *ExperimentalDiffSchemaRequest, opts ...grpc.CallOption) (*ExperimentalDiffSchemaResponse, error)
+ // EXPERIMENTAL: RegisterRelationshipCounter registers a new filter for counting relationships. A filter must be registered before
+ // a count can be requested.
+ ExperimentalRegisterRelationshipCounter(ctx context.Context, in *ExperimentalRegisterRelationshipCounterRequest, opts ...grpc.CallOption) (*ExperimentalRegisterRelationshipCounterResponse, error)
+ // EXPERIMENTAL: CountRelationships returns the count of relationships for *pre-registered* filter.
+ ExperimentalCountRelationships(ctx context.Context, in *ExperimentalCountRelationshipsRequest, opts ...grpc.CallOption) (*ExperimentalCountRelationshipsResponse, error)
+ // EXPERIMENTAL: UnregisterRelationshipCounter unregisters an existing filter for counting relationships.
+ ExperimentalUnregisterRelationshipCounter(ctx context.Context, in *ExperimentalUnregisterRelationshipCounterRequest, opts ...grpc.CallOption) (*ExperimentalUnregisterRelationshipCounterResponse, error)
+}
+
+type experimentalServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewExperimentalServiceClient(cc grpc.ClientConnInterface) ExperimentalServiceClient {
+ return &experimentalServiceClient{cc}
+}
+
+func (c *experimentalServiceClient) BulkImportRelationships(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[BulkImportRelationshipsRequest, BulkImportRelationshipsResponse], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &ExperimentalService_ServiceDesc.Streams[0], ExperimentalService_BulkImportRelationships_FullMethodName, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &grpc.GenericClientStream[BulkImportRelationshipsRequest, BulkImportRelationshipsResponse]{ClientStream: stream}
+ return x, nil
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type ExperimentalService_BulkImportRelationshipsClient = grpc.ClientStreamingClient[BulkImportRelationshipsRequest, BulkImportRelationshipsResponse]
+
+func (c *experimentalServiceClient) BulkExportRelationships(ctx context.Context, in *BulkExportRelationshipsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BulkExportRelationshipsResponse], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &ExperimentalService_ServiceDesc.Streams[1], ExperimentalService_BulkExportRelationships_FullMethodName, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &grpc.GenericClientStream[BulkExportRelationshipsRequest, BulkExportRelationshipsResponse]{ClientStream: stream}
+ if err := x.ClientStream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type ExperimentalService_BulkExportRelationshipsClient = grpc.ServerStreamingClient[BulkExportRelationshipsResponse]
+
+// Deprecated: Do not use.
+func (c *experimentalServiceClient) BulkCheckPermission(ctx context.Context, in *BulkCheckPermissionRequest, opts ...grpc.CallOption) (*BulkCheckPermissionResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(BulkCheckPermissionResponse)
+ err := c.cc.Invoke(ctx, ExperimentalService_BulkCheckPermission_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// Deprecated: Do not use.
+func (c *experimentalServiceClient) ExperimentalReflectSchema(ctx context.Context, in *ExperimentalReflectSchemaRequest, opts ...grpc.CallOption) (*ExperimentalReflectSchemaResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ExperimentalReflectSchemaResponse)
+ err := c.cc.Invoke(ctx, ExperimentalService_ExperimentalReflectSchema_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// Deprecated: Do not use.
+func (c *experimentalServiceClient) ExperimentalComputablePermissions(ctx context.Context, in *ExperimentalComputablePermissionsRequest, opts ...grpc.CallOption) (*ExperimentalComputablePermissionsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ExperimentalComputablePermissionsResponse)
+ err := c.cc.Invoke(ctx, ExperimentalService_ExperimentalComputablePermissions_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// Deprecated: Do not use.
+func (c *experimentalServiceClient) ExperimentalDependentRelations(ctx context.Context, in *ExperimentalDependentRelationsRequest, opts ...grpc.CallOption) (*ExperimentalDependentRelationsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ExperimentalDependentRelationsResponse)
+ err := c.cc.Invoke(ctx, ExperimentalService_ExperimentalDependentRelations_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// Deprecated: Do not use.
+func (c *experimentalServiceClient) ExperimentalDiffSchema(ctx context.Context, in *ExperimentalDiffSchemaRequest, opts ...grpc.CallOption) (*ExperimentalDiffSchemaResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ExperimentalDiffSchemaResponse)
+ err := c.cc.Invoke(ctx, ExperimentalService_ExperimentalDiffSchema_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *experimentalServiceClient) ExperimentalRegisterRelationshipCounter(ctx context.Context, in *ExperimentalRegisterRelationshipCounterRequest, opts ...grpc.CallOption) (*ExperimentalRegisterRelationshipCounterResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ExperimentalRegisterRelationshipCounterResponse)
+ err := c.cc.Invoke(ctx, ExperimentalService_ExperimentalRegisterRelationshipCounter_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *experimentalServiceClient) ExperimentalCountRelationships(ctx context.Context, in *ExperimentalCountRelationshipsRequest, opts ...grpc.CallOption) (*ExperimentalCountRelationshipsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ExperimentalCountRelationshipsResponse)
+ err := c.cc.Invoke(ctx, ExperimentalService_ExperimentalCountRelationships_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *experimentalServiceClient) ExperimentalUnregisterRelationshipCounter(ctx context.Context, in *ExperimentalUnregisterRelationshipCounterRequest, opts ...grpc.CallOption) (*ExperimentalUnregisterRelationshipCounterResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ExperimentalUnregisterRelationshipCounterResponse)
+ err := c.cc.Invoke(ctx, ExperimentalService_ExperimentalUnregisterRelationshipCounter_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// ExperimentalServiceServer is the server API for ExperimentalService service.
+// All implementations must embed UnimplementedExperimentalServiceServer
+// for forward compatibility.
+//
+// ExperimentalService exposes a number of APIs that are currently being
+// prototyped and tested for future inclusion in the stable API.
+type ExperimentalServiceServer interface {
+ // BulkImportRelationships is a faster path to writing a large number of
+ // relationships at once. It is both batched and streaming. For maximum
+ // performance, the caller should attempt to write relationships in as close
+ // to relationship sort order as possible: (resource.object_type,
+ // resource.object_id, relation, subject.object.object_type,
+ // subject.object.object_id, subject.optional_relation)
+ //
+ // EXPERIMENTAL
+ // https://github.com/authzed/spicedb/issues/1303
+ BulkImportRelationships(grpc.ClientStreamingServer[BulkImportRelationshipsRequest, BulkImportRelationshipsResponse]) error
+ // BulkExportRelationships is the fastest path available to exporting
+ // relationships from the server. It is resumable, and will return results
+ // in an order determined by the server.
+ BulkExportRelationships(*BulkExportRelationshipsRequest, grpc.ServerStreamingServer[BulkExportRelationshipsResponse]) error
+ // Deprecated: Do not use.
+ // NOTE: BulkCheckPermission has been promoted to the stable API as "CheckBulkPermission" and the
+ // API will be removed from experimental in a future release.
+ BulkCheckPermission(context.Context, *BulkCheckPermissionRequest) (*BulkCheckPermissionResponse, error)
+ // Deprecated: Do not use.
+ // DEPRECATED: Promoted to ReflectSchema in the stable API.
+ ExperimentalReflectSchema(context.Context, *ExperimentalReflectSchemaRequest) (*ExperimentalReflectSchemaResponse, error)
+ // Deprecated: Do not use.
+ // DEPRECATED: Promoted to ComputablePermissions in the stable API.
+ ExperimentalComputablePermissions(context.Context, *ExperimentalComputablePermissionsRequest) (*ExperimentalComputablePermissionsResponse, error)
+ // Deprecated: Do not use.
+ // DEPRECATED: Promoted to DependentRelations in the stable API.
+ ExperimentalDependentRelations(context.Context, *ExperimentalDependentRelationsRequest) (*ExperimentalDependentRelationsResponse, error)
+ // Deprecated: Do not use.
+ // DEPRECATED: Promoted to DiffSchema in the stable API.
+ ExperimentalDiffSchema(context.Context, *ExperimentalDiffSchemaRequest) (*ExperimentalDiffSchemaResponse, error)
+ // EXPERIMENTAL: RegisterRelationshipCounter registers a new filter for counting relationships. A filter must be registered before
+ // a count can be requested.
+ ExperimentalRegisterRelationshipCounter(context.Context, *ExperimentalRegisterRelationshipCounterRequest) (*ExperimentalRegisterRelationshipCounterResponse, error)
+ // EXPERIMENTAL: CountRelationships returns the count of relationships for *pre-registered* filter.
+ ExperimentalCountRelationships(context.Context, *ExperimentalCountRelationshipsRequest) (*ExperimentalCountRelationshipsResponse, error)
+ // EXPERIMENTAL: UnregisterRelationshipCounter unregisters an existing filter for counting relationships.
+ ExperimentalUnregisterRelationshipCounter(context.Context, *ExperimentalUnregisterRelationshipCounterRequest) (*ExperimentalUnregisterRelationshipCounterResponse, error)
+ mustEmbedUnimplementedExperimentalServiceServer()
+}
+
+// UnimplementedExperimentalServiceServer must be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedExperimentalServiceServer struct{}
+
+func (UnimplementedExperimentalServiceServer) BulkImportRelationships(grpc.ClientStreamingServer[BulkImportRelationshipsRequest, BulkImportRelationshipsResponse]) error {
+ return status.Errorf(codes.Unimplemented, "method BulkImportRelationships not implemented")
+}
+func (UnimplementedExperimentalServiceServer) BulkExportRelationships(*BulkExportRelationshipsRequest, grpc.ServerStreamingServer[BulkExportRelationshipsResponse]) error {
+ return status.Errorf(codes.Unimplemented, "method BulkExportRelationships not implemented")
+}
+func (UnimplementedExperimentalServiceServer) BulkCheckPermission(context.Context, *BulkCheckPermissionRequest) (*BulkCheckPermissionResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method BulkCheckPermission not implemented")
+}
+func (UnimplementedExperimentalServiceServer) ExperimentalReflectSchema(context.Context, *ExperimentalReflectSchemaRequest) (*ExperimentalReflectSchemaResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ExperimentalReflectSchema not implemented")
+}
+func (UnimplementedExperimentalServiceServer) ExperimentalComputablePermissions(context.Context, *ExperimentalComputablePermissionsRequest) (*ExperimentalComputablePermissionsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ExperimentalComputablePermissions not implemented")
+}
+func (UnimplementedExperimentalServiceServer) ExperimentalDependentRelations(context.Context, *ExperimentalDependentRelationsRequest) (*ExperimentalDependentRelationsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ExperimentalDependentRelations not implemented")
+}
+func (UnimplementedExperimentalServiceServer) ExperimentalDiffSchema(context.Context, *ExperimentalDiffSchemaRequest) (*ExperimentalDiffSchemaResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ExperimentalDiffSchema not implemented")
+}
+func (UnimplementedExperimentalServiceServer) ExperimentalRegisterRelationshipCounter(context.Context, *ExperimentalRegisterRelationshipCounterRequest) (*ExperimentalRegisterRelationshipCounterResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ExperimentalRegisterRelationshipCounter not implemented")
+}
+func (UnimplementedExperimentalServiceServer) ExperimentalCountRelationships(context.Context, *ExperimentalCountRelationshipsRequest) (*ExperimentalCountRelationshipsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ExperimentalCountRelationships not implemented")
+}
+func (UnimplementedExperimentalServiceServer) ExperimentalUnregisterRelationshipCounter(context.Context, *ExperimentalUnregisterRelationshipCounterRequest) (*ExperimentalUnregisterRelationshipCounterResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ExperimentalUnregisterRelationshipCounter not implemented")
+}
+func (UnimplementedExperimentalServiceServer) mustEmbedUnimplementedExperimentalServiceServer() {}
+func (UnimplementedExperimentalServiceServer) testEmbeddedByValue() {}
+
+// UnsafeExperimentalServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to ExperimentalServiceServer will
+// result in compilation errors.
+type UnsafeExperimentalServiceServer interface {
+ mustEmbedUnimplementedExperimentalServiceServer()
+}
+
+func RegisterExperimentalServiceServer(s grpc.ServiceRegistrar, srv ExperimentalServiceServer) {
+ // If the following call pancis, it indicates UnimplementedExperimentalServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
+ s.RegisterService(&ExperimentalService_ServiceDesc, srv)
+}
+
+func _ExperimentalService_BulkImportRelationships_Handler(srv interface{}, stream grpc.ServerStream) error {
+ return srv.(ExperimentalServiceServer).BulkImportRelationships(&grpc.GenericServerStream[BulkImportRelationshipsRequest, BulkImportRelationshipsResponse]{ServerStream: stream})
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type ExperimentalService_BulkImportRelationshipsServer = grpc.ClientStreamingServer[BulkImportRelationshipsRequest, BulkImportRelationshipsResponse]
+
+func _ExperimentalService_BulkExportRelationships_Handler(srv interface{}, stream grpc.ServerStream) error {
+ m := new(BulkExportRelationshipsRequest)
+ if err := stream.RecvMsg(m); err != nil {
+ return err
+ }
+ return srv.(ExperimentalServiceServer).BulkExportRelationships(m, &grpc.GenericServerStream[BulkExportRelationshipsRequest, BulkExportRelationshipsResponse]{ServerStream: stream})
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type ExperimentalService_BulkExportRelationshipsServer = grpc.ServerStreamingServer[BulkExportRelationshipsResponse]
+
+func _ExperimentalService_BulkCheckPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(BulkCheckPermissionRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ExperimentalServiceServer).BulkCheckPermission(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ExperimentalService_BulkCheckPermission_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ExperimentalServiceServer).BulkCheckPermission(ctx, req.(*BulkCheckPermissionRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ExperimentalService_ExperimentalReflectSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ExperimentalReflectSchemaRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ExperimentalServiceServer).ExperimentalReflectSchema(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ExperimentalService_ExperimentalReflectSchema_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ExperimentalServiceServer).ExperimentalReflectSchema(ctx, req.(*ExperimentalReflectSchemaRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ExperimentalService_ExperimentalComputablePermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ExperimentalComputablePermissionsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ExperimentalServiceServer).ExperimentalComputablePermissions(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ExperimentalService_ExperimentalComputablePermissions_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ExperimentalServiceServer).ExperimentalComputablePermissions(ctx, req.(*ExperimentalComputablePermissionsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ExperimentalService_ExperimentalDependentRelations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ExperimentalDependentRelationsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ExperimentalServiceServer).ExperimentalDependentRelations(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ExperimentalService_ExperimentalDependentRelations_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ExperimentalServiceServer).ExperimentalDependentRelations(ctx, req.(*ExperimentalDependentRelationsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ExperimentalService_ExperimentalDiffSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ExperimentalDiffSchemaRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ExperimentalServiceServer).ExperimentalDiffSchema(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ExperimentalService_ExperimentalDiffSchema_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ExperimentalServiceServer).ExperimentalDiffSchema(ctx, req.(*ExperimentalDiffSchemaRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ExperimentalService_ExperimentalRegisterRelationshipCounter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ExperimentalRegisterRelationshipCounterRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ExperimentalServiceServer).ExperimentalRegisterRelationshipCounter(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ExperimentalService_ExperimentalRegisterRelationshipCounter_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ExperimentalServiceServer).ExperimentalRegisterRelationshipCounter(ctx, req.(*ExperimentalRegisterRelationshipCounterRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ExperimentalService_ExperimentalCountRelationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ExperimentalCountRelationshipsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ExperimentalServiceServer).ExperimentalCountRelationships(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ExperimentalService_ExperimentalCountRelationships_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ExperimentalServiceServer).ExperimentalCountRelationships(ctx, req.(*ExperimentalCountRelationshipsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ExperimentalService_ExperimentalUnregisterRelationshipCounter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ExperimentalUnregisterRelationshipCounterRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ExperimentalServiceServer).ExperimentalUnregisterRelationshipCounter(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ExperimentalService_ExperimentalUnregisterRelationshipCounter_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ExperimentalServiceServer).ExperimentalUnregisterRelationshipCounter(ctx, req.(*ExperimentalUnregisterRelationshipCounterRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// ExperimentalService_ServiceDesc is the grpc.ServiceDesc for ExperimentalService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var ExperimentalService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "authzed.api.v1.ExperimentalService",
+ HandlerType: (*ExperimentalServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "BulkCheckPermission",
+ Handler: _ExperimentalService_BulkCheckPermission_Handler,
+ },
+ {
+ MethodName: "ExperimentalReflectSchema",
+ Handler: _ExperimentalService_ExperimentalReflectSchema_Handler,
+ },
+ {
+ MethodName: "ExperimentalComputablePermissions",
+ Handler: _ExperimentalService_ExperimentalComputablePermissions_Handler,
+ },
+ {
+ MethodName: "ExperimentalDependentRelations",
+ Handler: _ExperimentalService_ExperimentalDependentRelations_Handler,
+ },
+ {
+ MethodName: "ExperimentalDiffSchema",
+ Handler: _ExperimentalService_ExperimentalDiffSchema_Handler,
+ },
+ {
+ MethodName: "ExperimentalRegisterRelationshipCounter",
+ Handler: _ExperimentalService_ExperimentalRegisterRelationshipCounter_Handler,
+ },
+ {
+ MethodName: "ExperimentalCountRelationships",
+ Handler: _ExperimentalService_ExperimentalCountRelationships_Handler,
+ },
+ {
+ MethodName: "ExperimentalUnregisterRelationshipCounter",
+ Handler: _ExperimentalService_ExperimentalUnregisterRelationshipCounter_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "BulkImportRelationships",
+ Handler: _ExperimentalService_BulkImportRelationships_Handler,
+ ClientStreams: true,
+ },
+ {
+ StreamName: "BulkExportRelationships",
+ Handler: _ExperimentalService_BulkExportRelationships_Handler,
+ ServerStreams: true,
+ },
+ },
+ Metadata: "authzed/api/v1/experimental_service.proto",
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service_vtproto.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service_vtproto.pb.go
new file mode 100644
index 0000000..8074ed9
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/experimental_service_vtproto.pb.go
@@ -0,0 +1,11445 @@
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// protoc-gen-go-vtproto version: v0.6.1-0.20240319094008-0393e58bdf10
+// source: authzed/api/v1/experimental_service.proto
+
+package v1
+
+import (
+ fmt "fmt"
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ structpb1 "github.com/planetscale/vtprotobuf/types/known/structpb"
+ status "google.golang.org/genproto/googleapis/rpc/status"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ io "io"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *ExperimentalRegisterRelationshipCounterRequest) CloneVT() *ExperimentalRegisterRelationshipCounterRequest {
+ if m == nil {
+ return (*ExperimentalRegisterRelationshipCounterRequest)(nil)
+ }
+ r := new(ExperimentalRegisterRelationshipCounterRequest)
+ r.Name = m.Name
+ r.RelationshipFilter = m.RelationshipFilter.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExperimentalRegisterRelationshipCounterRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExperimentalRegisterRelationshipCounterResponse) CloneVT() *ExperimentalRegisterRelationshipCounterResponse {
+ if m == nil {
+ return (*ExperimentalRegisterRelationshipCounterResponse)(nil)
+ }
+ r := new(ExperimentalRegisterRelationshipCounterResponse)
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExperimentalRegisterRelationshipCounterResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExperimentalCountRelationshipsRequest) CloneVT() *ExperimentalCountRelationshipsRequest {
+ if m == nil {
+ return (*ExperimentalCountRelationshipsRequest)(nil)
+ }
+ r := new(ExperimentalCountRelationshipsRequest)
+ r.Name = m.Name
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExperimentalCountRelationshipsRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExperimentalCountRelationshipsResponse) CloneVT() *ExperimentalCountRelationshipsResponse {
+ if m == nil {
+ return (*ExperimentalCountRelationshipsResponse)(nil)
+ }
+ r := new(ExperimentalCountRelationshipsResponse)
+ if m.CounterResult != nil {
+ r.CounterResult = m.CounterResult.(interface {
+ CloneVT() isExperimentalCountRelationshipsResponse_CounterResult
+ }).CloneVT()
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExperimentalCountRelationshipsResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExperimentalCountRelationshipsResponse_CounterStillCalculating) CloneVT() isExperimentalCountRelationshipsResponse_CounterResult {
+ if m == nil {
+ return (*ExperimentalCountRelationshipsResponse_CounterStillCalculating)(nil)
+ }
+ r := new(ExperimentalCountRelationshipsResponse_CounterStillCalculating)
+ r.CounterStillCalculating = m.CounterStillCalculating
+ return r
+}
+
+func (m *ExperimentalCountRelationshipsResponse_ReadCounterValue) CloneVT() isExperimentalCountRelationshipsResponse_CounterResult {
+ if m == nil {
+ return (*ExperimentalCountRelationshipsResponse_ReadCounterValue)(nil)
+ }
+ r := new(ExperimentalCountRelationshipsResponse_ReadCounterValue)
+ r.ReadCounterValue = m.ReadCounterValue.CloneVT()
+ return r
+}
+
+func (m *ReadCounterValue) CloneVT() *ReadCounterValue {
+ if m == nil {
+ return (*ReadCounterValue)(nil)
+ }
+ r := new(ReadCounterValue)
+ r.RelationshipCount = m.RelationshipCount
+ r.ReadAt = m.ReadAt.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReadCounterValue) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExperimentalUnregisterRelationshipCounterRequest) CloneVT() *ExperimentalUnregisterRelationshipCounterRequest {
+ if m == nil {
+ return (*ExperimentalUnregisterRelationshipCounterRequest)(nil)
+ }
+ r := new(ExperimentalUnregisterRelationshipCounterRequest)
+ r.Name = m.Name
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExperimentalUnregisterRelationshipCounterRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExperimentalUnregisterRelationshipCounterResponse) CloneVT() *ExperimentalUnregisterRelationshipCounterResponse {
+ if m == nil {
+ return (*ExperimentalUnregisterRelationshipCounterResponse)(nil)
+ }
+ r := new(ExperimentalUnregisterRelationshipCounterResponse)
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExperimentalUnregisterRelationshipCounterResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *BulkCheckPermissionRequest) CloneVT() *BulkCheckPermissionRequest {
+ if m == nil {
+ return (*BulkCheckPermissionRequest)(nil)
+ }
+ r := new(BulkCheckPermissionRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ if rhs := m.Items; rhs != nil {
+ tmpContainer := make([]*BulkCheckPermissionRequestItem, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Items = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *BulkCheckPermissionRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *BulkCheckPermissionRequestItem) CloneVT() *BulkCheckPermissionRequestItem {
+ if m == nil {
+ return (*BulkCheckPermissionRequestItem)(nil)
+ }
+ r := new(BulkCheckPermissionRequestItem)
+ r.Resource = m.Resource.CloneVT()
+ r.Permission = m.Permission
+ r.Subject = m.Subject.CloneVT()
+ r.Context = (*structpb.Struct)((*structpb1.Struct)(m.Context).CloneVT())
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *BulkCheckPermissionRequestItem) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *BulkCheckPermissionResponse) CloneVT() *BulkCheckPermissionResponse {
+ if m == nil {
+ return (*BulkCheckPermissionResponse)(nil)
+ }
+ r := new(BulkCheckPermissionResponse)
+ r.CheckedAt = m.CheckedAt.CloneVT()
+ if rhs := m.Pairs; rhs != nil {
+ tmpContainer := make([]*BulkCheckPermissionPair, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Pairs = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *BulkCheckPermissionResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *BulkCheckPermissionPair) CloneVT() *BulkCheckPermissionPair {
+ if m == nil {
+ return (*BulkCheckPermissionPair)(nil)
+ }
+ r := new(BulkCheckPermissionPair)
+ r.Request = m.Request.CloneVT()
+ if m.Response != nil {
+ r.Response = m.Response.(interface {
+ CloneVT() isBulkCheckPermissionPair_Response
+ }).CloneVT()
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *BulkCheckPermissionPair) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *BulkCheckPermissionPair_Item) CloneVT() isBulkCheckPermissionPair_Response {
+ if m == nil {
+ return (*BulkCheckPermissionPair_Item)(nil)
+ }
+ r := new(BulkCheckPermissionPair_Item)
+ r.Item = m.Item.CloneVT()
+ return r
+}
+
+func (m *BulkCheckPermissionPair_Error) CloneVT() isBulkCheckPermissionPair_Response {
+ if m == nil {
+ return (*BulkCheckPermissionPair_Error)(nil)
+ }
+ r := new(BulkCheckPermissionPair_Error)
+ if rhs := m.Error; rhs != nil {
+ if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *status.Status }); ok {
+ r.Error = vtpb.CloneVT()
+ } else {
+ r.Error = proto.Clone(rhs).(*status.Status)
+ }
+ }
+ return r
+}
+
+func (m *BulkCheckPermissionResponseItem) CloneVT() *BulkCheckPermissionResponseItem {
+ if m == nil {
+ return (*BulkCheckPermissionResponseItem)(nil)
+ }
+ r := new(BulkCheckPermissionResponseItem)
+ r.Permissionship = m.Permissionship
+ r.PartialCaveatInfo = m.PartialCaveatInfo.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *BulkCheckPermissionResponseItem) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *BulkImportRelationshipsRequest) CloneVT() *BulkImportRelationshipsRequest {
+ if m == nil {
+ return (*BulkImportRelationshipsRequest)(nil)
+ }
+ r := new(BulkImportRelationshipsRequest)
+ if rhs := m.Relationships; rhs != nil {
+ tmpContainer := make([]*Relationship, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Relationships = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *BulkImportRelationshipsRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *BulkImportRelationshipsResponse) CloneVT() *BulkImportRelationshipsResponse {
+ if m == nil {
+ return (*BulkImportRelationshipsResponse)(nil)
+ }
+ r := new(BulkImportRelationshipsResponse)
+ r.NumLoaded = m.NumLoaded
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *BulkImportRelationshipsResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *BulkExportRelationshipsRequest) CloneVT() *BulkExportRelationshipsRequest {
+ if m == nil {
+ return (*BulkExportRelationshipsRequest)(nil)
+ }
+ r := new(BulkExportRelationshipsRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ r.OptionalLimit = m.OptionalLimit
+ r.OptionalCursor = m.OptionalCursor.CloneVT()
+ r.OptionalRelationshipFilter = m.OptionalRelationshipFilter.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *BulkExportRelationshipsRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *BulkExportRelationshipsResponse) CloneVT() *BulkExportRelationshipsResponse {
+ if m == nil {
+ return (*BulkExportRelationshipsResponse)(nil)
+ }
+ r := new(BulkExportRelationshipsResponse)
+ r.AfterResultCursor = m.AfterResultCursor.CloneVT()
+ if rhs := m.Relationships; rhs != nil {
+ tmpContainer := make([]*Relationship, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Relationships = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *BulkExportRelationshipsResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExperimentalReflectSchemaRequest) CloneVT() *ExperimentalReflectSchemaRequest {
+ if m == nil {
+ return (*ExperimentalReflectSchemaRequest)(nil)
+ }
+ r := new(ExperimentalReflectSchemaRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ if rhs := m.OptionalFilters; rhs != nil {
+ tmpContainer := make([]*ExpSchemaFilter, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.OptionalFilters = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExperimentalReflectSchemaRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExperimentalReflectSchemaResponse) CloneVT() *ExperimentalReflectSchemaResponse {
+ if m == nil {
+ return (*ExperimentalReflectSchemaResponse)(nil)
+ }
+ r := new(ExperimentalReflectSchemaResponse)
+ r.ReadAt = m.ReadAt.CloneVT()
+ if rhs := m.Definitions; rhs != nil {
+ tmpContainer := make([]*ExpDefinition, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Definitions = tmpContainer
+ }
+ if rhs := m.Caveats; rhs != nil {
+ tmpContainer := make([]*ExpCaveat, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Caveats = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExperimentalReflectSchemaResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExpSchemaFilter) CloneVT() *ExpSchemaFilter {
+ if m == nil {
+ return (*ExpSchemaFilter)(nil)
+ }
+ r := new(ExpSchemaFilter)
+ r.OptionalDefinitionNameFilter = m.OptionalDefinitionNameFilter
+ r.OptionalCaveatNameFilter = m.OptionalCaveatNameFilter
+ r.OptionalRelationNameFilter = m.OptionalRelationNameFilter
+ r.OptionalPermissionNameFilter = m.OptionalPermissionNameFilter
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExpSchemaFilter) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExpDefinition) CloneVT() *ExpDefinition {
+ if m == nil {
+ return (*ExpDefinition)(nil)
+ }
+ r := new(ExpDefinition)
+ r.Name = m.Name
+ r.Comment = m.Comment
+ if rhs := m.Relations; rhs != nil {
+ tmpContainer := make([]*ExpRelation, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Relations = tmpContainer
+ }
+ if rhs := m.Permissions; rhs != nil {
+ tmpContainer := make([]*ExpPermission, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Permissions = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExpDefinition) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExpCaveat) CloneVT() *ExpCaveat {
+ if m == nil {
+ return (*ExpCaveat)(nil)
+ }
+ r := new(ExpCaveat)
+ r.Name = m.Name
+ r.Comment = m.Comment
+ r.Expression = m.Expression
+ if rhs := m.Parameters; rhs != nil {
+ tmpContainer := make([]*ExpCaveatParameter, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Parameters = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExpCaveat) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExpCaveatParameter) CloneVT() *ExpCaveatParameter {
+ if m == nil {
+ return (*ExpCaveatParameter)(nil)
+ }
+ r := new(ExpCaveatParameter)
+ r.Name = m.Name
+ r.Type = m.Type
+ r.ParentCaveatName = m.ParentCaveatName
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExpCaveatParameter) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExpRelation) CloneVT() *ExpRelation {
+ if m == nil {
+ return (*ExpRelation)(nil)
+ }
+ r := new(ExpRelation)
+ r.Name = m.Name
+ r.Comment = m.Comment
+ r.ParentDefinitionName = m.ParentDefinitionName
+ if rhs := m.SubjectTypes; rhs != nil {
+ tmpContainer := make([]*ExpTypeReference, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.SubjectTypes = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExpRelation) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExpTypeReference) CloneVT() *ExpTypeReference {
+ if m == nil {
+ return (*ExpTypeReference)(nil)
+ }
+ r := new(ExpTypeReference)
+ r.SubjectDefinitionName = m.SubjectDefinitionName
+ r.OptionalCaveatName = m.OptionalCaveatName
+ if m.Typeref != nil {
+ r.Typeref = m.Typeref.(interface {
+ CloneVT() isExpTypeReference_Typeref
+ }).CloneVT()
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExpTypeReference) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExpTypeReference_IsTerminalSubject) CloneVT() isExpTypeReference_Typeref {
+ if m == nil {
+ return (*ExpTypeReference_IsTerminalSubject)(nil)
+ }
+ r := new(ExpTypeReference_IsTerminalSubject)
+ r.IsTerminalSubject = m.IsTerminalSubject
+ return r
+}
+
+func (m *ExpTypeReference_OptionalRelationName) CloneVT() isExpTypeReference_Typeref {
+ if m == nil {
+ return (*ExpTypeReference_OptionalRelationName)(nil)
+ }
+ r := new(ExpTypeReference_OptionalRelationName)
+ r.OptionalRelationName = m.OptionalRelationName
+ return r
+}
+
+func (m *ExpTypeReference_IsPublicWildcard) CloneVT() isExpTypeReference_Typeref {
+ if m == nil {
+ return (*ExpTypeReference_IsPublicWildcard)(nil)
+ }
+ r := new(ExpTypeReference_IsPublicWildcard)
+ r.IsPublicWildcard = m.IsPublicWildcard
+ return r
+}
+
+func (m *ExpPermission) CloneVT() *ExpPermission {
+ if m == nil {
+ return (*ExpPermission)(nil)
+ }
+ r := new(ExpPermission)
+ r.Name = m.Name
+ r.Comment = m.Comment
+ r.ParentDefinitionName = m.ParentDefinitionName
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExpPermission) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExperimentalComputablePermissionsRequest) CloneVT() *ExperimentalComputablePermissionsRequest {
+ if m == nil {
+ return (*ExperimentalComputablePermissionsRequest)(nil)
+ }
+ r := new(ExperimentalComputablePermissionsRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ r.DefinitionName = m.DefinitionName
+ r.RelationName = m.RelationName
+ r.OptionalDefinitionNameFilter = m.OptionalDefinitionNameFilter
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExperimentalComputablePermissionsRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExpRelationReference) CloneVT() *ExpRelationReference {
+ if m == nil {
+ return (*ExpRelationReference)(nil)
+ }
+ r := new(ExpRelationReference)
+ r.DefinitionName = m.DefinitionName
+ r.RelationName = m.RelationName
+ r.IsPermission = m.IsPermission
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExpRelationReference) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExperimentalComputablePermissionsResponse) CloneVT() *ExperimentalComputablePermissionsResponse {
+ if m == nil {
+ return (*ExperimentalComputablePermissionsResponse)(nil)
+ }
+ r := new(ExperimentalComputablePermissionsResponse)
+ r.ReadAt = m.ReadAt.CloneVT()
+ if rhs := m.Permissions; rhs != nil {
+ tmpContainer := make([]*ExpRelationReference, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Permissions = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExperimentalComputablePermissionsResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExperimentalDependentRelationsRequest) CloneVT() *ExperimentalDependentRelationsRequest {
+ if m == nil {
+ return (*ExperimentalDependentRelationsRequest)(nil)
+ }
+ r := new(ExperimentalDependentRelationsRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ r.DefinitionName = m.DefinitionName
+ r.PermissionName = m.PermissionName
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExperimentalDependentRelationsRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExperimentalDependentRelationsResponse) CloneVT() *ExperimentalDependentRelationsResponse {
+ if m == nil {
+ return (*ExperimentalDependentRelationsResponse)(nil)
+ }
+ r := new(ExperimentalDependentRelationsResponse)
+ r.ReadAt = m.ReadAt.CloneVT()
+ if rhs := m.Relations; rhs != nil {
+ tmpContainer := make([]*ExpRelationReference, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Relations = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExperimentalDependentRelationsResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExperimentalDiffSchemaRequest) CloneVT() *ExperimentalDiffSchemaRequest {
+ if m == nil {
+ return (*ExperimentalDiffSchemaRequest)(nil)
+ }
+ r := new(ExperimentalDiffSchemaRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ r.ComparisonSchema = m.ComparisonSchema
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExperimentalDiffSchemaRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExperimentalDiffSchemaResponse) CloneVT() *ExperimentalDiffSchemaResponse {
+ if m == nil {
+ return (*ExperimentalDiffSchemaResponse)(nil)
+ }
+ r := new(ExperimentalDiffSchemaResponse)
+ r.ReadAt = m.ReadAt.CloneVT()
+ if rhs := m.Diffs; rhs != nil {
+ tmpContainer := make([]*ExpSchemaDiff, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Diffs = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExperimentalDiffSchemaResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExpRelationSubjectTypeChange) CloneVT() *ExpRelationSubjectTypeChange {
+ if m == nil {
+ return (*ExpRelationSubjectTypeChange)(nil)
+ }
+ r := new(ExpRelationSubjectTypeChange)
+ r.Relation = m.Relation.CloneVT()
+ r.ChangedSubjectType = m.ChangedSubjectType.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExpRelationSubjectTypeChange) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExpCaveatParameterTypeChange) CloneVT() *ExpCaveatParameterTypeChange {
+ if m == nil {
+ return (*ExpCaveatParameterTypeChange)(nil)
+ }
+ r := new(ExpCaveatParameterTypeChange)
+ r.Parameter = m.Parameter.CloneVT()
+ r.PreviousType = m.PreviousType
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExpCaveatParameterTypeChange) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExpSchemaDiff) CloneVT() *ExpSchemaDiff {
+ if m == nil {
+ return (*ExpSchemaDiff)(nil)
+ }
+ r := new(ExpSchemaDiff)
+ if m.Diff != nil {
+ r.Diff = m.Diff.(interface{ CloneVT() isExpSchemaDiff_Diff }).CloneVT()
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExpSchemaDiff) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExpSchemaDiff_DefinitionAdded) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_DefinitionAdded)(nil)
+ }
+ r := new(ExpSchemaDiff_DefinitionAdded)
+ r.DefinitionAdded = m.DefinitionAdded.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_DefinitionRemoved) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_DefinitionRemoved)(nil)
+ }
+ r := new(ExpSchemaDiff_DefinitionRemoved)
+ r.DefinitionRemoved = m.DefinitionRemoved.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_DefinitionDocCommentChanged) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_DefinitionDocCommentChanged)(nil)
+ }
+ r := new(ExpSchemaDiff_DefinitionDocCommentChanged)
+ r.DefinitionDocCommentChanged = m.DefinitionDocCommentChanged.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_RelationAdded) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_RelationAdded)(nil)
+ }
+ r := new(ExpSchemaDiff_RelationAdded)
+ r.RelationAdded = m.RelationAdded.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_RelationRemoved) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_RelationRemoved)(nil)
+ }
+ r := new(ExpSchemaDiff_RelationRemoved)
+ r.RelationRemoved = m.RelationRemoved.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_RelationDocCommentChanged) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_RelationDocCommentChanged)(nil)
+ }
+ r := new(ExpSchemaDiff_RelationDocCommentChanged)
+ r.RelationDocCommentChanged = m.RelationDocCommentChanged.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_RelationSubjectTypeAdded) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_RelationSubjectTypeAdded)(nil)
+ }
+ r := new(ExpSchemaDiff_RelationSubjectTypeAdded)
+ r.RelationSubjectTypeAdded = m.RelationSubjectTypeAdded.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_RelationSubjectTypeRemoved) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_RelationSubjectTypeRemoved)(nil)
+ }
+ r := new(ExpSchemaDiff_RelationSubjectTypeRemoved)
+ r.RelationSubjectTypeRemoved = m.RelationSubjectTypeRemoved.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_PermissionAdded) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_PermissionAdded)(nil)
+ }
+ r := new(ExpSchemaDiff_PermissionAdded)
+ r.PermissionAdded = m.PermissionAdded.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_PermissionRemoved) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_PermissionRemoved)(nil)
+ }
+ r := new(ExpSchemaDiff_PermissionRemoved)
+ r.PermissionRemoved = m.PermissionRemoved.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_PermissionDocCommentChanged) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_PermissionDocCommentChanged)(nil)
+ }
+ r := new(ExpSchemaDiff_PermissionDocCommentChanged)
+ r.PermissionDocCommentChanged = m.PermissionDocCommentChanged.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_PermissionExprChanged) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_PermissionExprChanged)(nil)
+ }
+ r := new(ExpSchemaDiff_PermissionExprChanged)
+ r.PermissionExprChanged = m.PermissionExprChanged.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_CaveatAdded) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_CaveatAdded)(nil)
+ }
+ r := new(ExpSchemaDiff_CaveatAdded)
+ r.CaveatAdded = m.CaveatAdded.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_CaveatRemoved) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_CaveatRemoved)(nil)
+ }
+ r := new(ExpSchemaDiff_CaveatRemoved)
+ r.CaveatRemoved = m.CaveatRemoved.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_CaveatDocCommentChanged) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_CaveatDocCommentChanged)(nil)
+ }
+ r := new(ExpSchemaDiff_CaveatDocCommentChanged)
+ r.CaveatDocCommentChanged = m.CaveatDocCommentChanged.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_CaveatExprChanged) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_CaveatExprChanged)(nil)
+ }
+ r := new(ExpSchemaDiff_CaveatExprChanged)
+ r.CaveatExprChanged = m.CaveatExprChanged.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_CaveatParameterAdded) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_CaveatParameterAdded)(nil)
+ }
+ r := new(ExpSchemaDiff_CaveatParameterAdded)
+ r.CaveatParameterAdded = m.CaveatParameterAdded.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_CaveatParameterRemoved) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_CaveatParameterRemoved)(nil)
+ }
+ r := new(ExpSchemaDiff_CaveatParameterRemoved)
+ r.CaveatParameterRemoved = m.CaveatParameterRemoved.CloneVT()
+ return r
+}
+
+func (m *ExpSchemaDiff_CaveatParameterTypeChanged) CloneVT() isExpSchemaDiff_Diff {
+ if m == nil {
+ return (*ExpSchemaDiff_CaveatParameterTypeChanged)(nil)
+ }
+ r := new(ExpSchemaDiff_CaveatParameterTypeChanged)
+ r.CaveatParameterTypeChanged = m.CaveatParameterTypeChanged.CloneVT()
+ return r
+}
+
+func (this *ExperimentalRegisterRelationshipCounterRequest) EqualVT(that *ExperimentalRegisterRelationshipCounterRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Name != that.Name {
+ return false
+ }
+ if !this.RelationshipFilter.EqualVT(that.RelationshipFilter) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExperimentalRegisterRelationshipCounterRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExperimentalRegisterRelationshipCounterRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExperimentalRegisterRelationshipCounterResponse) EqualVT(that *ExperimentalRegisterRelationshipCounterResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExperimentalRegisterRelationshipCounterResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExperimentalRegisterRelationshipCounterResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExperimentalCountRelationshipsRequest) EqualVT(that *ExperimentalCountRelationshipsRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Name != that.Name {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExperimentalCountRelationshipsRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExperimentalCountRelationshipsRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExperimentalCountRelationshipsResponse) EqualVT(that *ExperimentalCountRelationshipsResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.CounterResult == nil && that.CounterResult != nil {
+ return false
+ } else if this.CounterResult != nil {
+ if that.CounterResult == nil {
+ return false
+ }
+ if !this.CounterResult.(interface {
+ EqualVT(isExperimentalCountRelationshipsResponse_CounterResult) bool
+ }).EqualVT(that.CounterResult) {
+ return false
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExperimentalCountRelationshipsResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExperimentalCountRelationshipsResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExperimentalCountRelationshipsResponse_CounterStillCalculating) EqualVT(thatIface isExperimentalCountRelationshipsResponse_CounterResult) bool {
+ that, ok := thatIface.(*ExperimentalCountRelationshipsResponse_CounterStillCalculating)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if this.CounterStillCalculating != that.CounterStillCalculating {
+ return false
+ }
+ return true
+}
+
+func (this *ExperimentalCountRelationshipsResponse_ReadCounterValue) EqualVT(thatIface isExperimentalCountRelationshipsResponse_CounterResult) bool {
+ that, ok := thatIface.(*ExperimentalCountRelationshipsResponse_ReadCounterValue)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.ReadCounterValue, that.ReadCounterValue; p != q {
+ if p == nil {
+ p = &ReadCounterValue{}
+ }
+ if q == nil {
+ q = &ReadCounterValue{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReadCounterValue) EqualVT(that *ReadCounterValue) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.RelationshipCount != that.RelationshipCount {
+ return false
+ }
+ if !this.ReadAt.EqualVT(that.ReadAt) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReadCounterValue) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReadCounterValue)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExperimentalUnregisterRelationshipCounterRequest) EqualVT(that *ExperimentalUnregisterRelationshipCounterRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Name != that.Name {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExperimentalUnregisterRelationshipCounterRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExperimentalUnregisterRelationshipCounterRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExperimentalUnregisterRelationshipCounterResponse) EqualVT(that *ExperimentalUnregisterRelationshipCounterResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExperimentalUnregisterRelationshipCounterResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExperimentalUnregisterRelationshipCounterResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *BulkCheckPermissionRequest) EqualVT(that *BulkCheckPermissionRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if len(this.Items) != len(that.Items) {
+ return false
+ }
+ for i, vx := range this.Items {
+ vy := that.Items[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &BulkCheckPermissionRequestItem{}
+ }
+ if q == nil {
+ q = &BulkCheckPermissionRequestItem{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *BulkCheckPermissionRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*BulkCheckPermissionRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *BulkCheckPermissionRequestItem) EqualVT(that *BulkCheckPermissionRequestItem) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Resource.EqualVT(that.Resource) {
+ return false
+ }
+ if this.Permission != that.Permission {
+ return false
+ }
+ if !this.Subject.EqualVT(that.Subject) {
+ return false
+ }
+ if !(*structpb1.Struct)(this.Context).EqualVT((*structpb1.Struct)(that.Context)) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *BulkCheckPermissionRequestItem) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*BulkCheckPermissionRequestItem)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *BulkCheckPermissionResponse) EqualVT(that *BulkCheckPermissionResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.CheckedAt.EqualVT(that.CheckedAt) {
+ return false
+ }
+ if len(this.Pairs) != len(that.Pairs) {
+ return false
+ }
+ for i, vx := range this.Pairs {
+ vy := that.Pairs[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &BulkCheckPermissionPair{}
+ }
+ if q == nil {
+ q = &BulkCheckPermissionPair{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *BulkCheckPermissionResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*BulkCheckPermissionResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *BulkCheckPermissionPair) EqualVT(that *BulkCheckPermissionPair) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Response == nil && that.Response != nil {
+ return false
+ } else if this.Response != nil {
+ if that.Response == nil {
+ return false
+ }
+ if !this.Response.(interface {
+ EqualVT(isBulkCheckPermissionPair_Response) bool
+ }).EqualVT(that.Response) {
+ return false
+ }
+ }
+ if !this.Request.EqualVT(that.Request) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *BulkCheckPermissionPair) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*BulkCheckPermissionPair)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *BulkCheckPermissionPair_Item) EqualVT(thatIface isBulkCheckPermissionPair_Response) bool {
+ that, ok := thatIface.(*BulkCheckPermissionPair_Item)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.Item, that.Item; p != q {
+ if p == nil {
+ p = &BulkCheckPermissionResponseItem{}
+ }
+ if q == nil {
+ q = &BulkCheckPermissionResponseItem{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *BulkCheckPermissionPair_Error) EqualVT(thatIface isBulkCheckPermissionPair_Response) bool {
+ that, ok := thatIface.(*BulkCheckPermissionPair_Error)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.Error, that.Error; p != q {
+ if p == nil {
+ p = &status.Status{}
+ }
+ if q == nil {
+ q = &status.Status{}
+ }
+ if equal, ok := interface{}(p).(interface{ EqualVT(*status.Status) bool }); ok {
+ if !equal.EqualVT(q) {
+ return false
+ }
+ } else if !proto.Equal(p, q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *BulkCheckPermissionResponseItem) EqualVT(that *BulkCheckPermissionResponseItem) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Permissionship != that.Permissionship {
+ return false
+ }
+ if !this.PartialCaveatInfo.EqualVT(that.PartialCaveatInfo) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *BulkCheckPermissionResponseItem) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*BulkCheckPermissionResponseItem)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *BulkImportRelationshipsRequest) EqualVT(that *BulkImportRelationshipsRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if len(this.Relationships) != len(that.Relationships) {
+ return false
+ }
+ for i, vx := range this.Relationships {
+ vy := that.Relationships[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &Relationship{}
+ }
+ if q == nil {
+ q = &Relationship{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *BulkImportRelationshipsRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*BulkImportRelationshipsRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *BulkImportRelationshipsResponse) EqualVT(that *BulkImportRelationshipsResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.NumLoaded != that.NumLoaded {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *BulkImportRelationshipsResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*BulkImportRelationshipsResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *BulkExportRelationshipsRequest) EqualVT(that *BulkExportRelationshipsRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if this.OptionalLimit != that.OptionalLimit {
+ return false
+ }
+ if !this.OptionalCursor.EqualVT(that.OptionalCursor) {
+ return false
+ }
+ if !this.OptionalRelationshipFilter.EqualVT(that.OptionalRelationshipFilter) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *BulkExportRelationshipsRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*BulkExportRelationshipsRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *BulkExportRelationshipsResponse) EqualVT(that *BulkExportRelationshipsResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.AfterResultCursor.EqualVT(that.AfterResultCursor) {
+ return false
+ }
+ if len(this.Relationships) != len(that.Relationships) {
+ return false
+ }
+ for i, vx := range this.Relationships {
+ vy := that.Relationships[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &Relationship{}
+ }
+ if q == nil {
+ q = &Relationship{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *BulkExportRelationshipsResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*BulkExportRelationshipsResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExperimentalReflectSchemaRequest) EqualVT(that *ExperimentalReflectSchemaRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if len(this.OptionalFilters) != len(that.OptionalFilters) {
+ return false
+ }
+ for i, vx := range this.OptionalFilters {
+ vy := that.OptionalFilters[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ExpSchemaFilter{}
+ }
+ if q == nil {
+ q = &ExpSchemaFilter{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExperimentalReflectSchemaRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExperimentalReflectSchemaRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExperimentalReflectSchemaResponse) EqualVT(that *ExperimentalReflectSchemaResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if len(this.Definitions) != len(that.Definitions) {
+ return false
+ }
+ for i, vx := range this.Definitions {
+ vy := that.Definitions[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ExpDefinition{}
+ }
+ if q == nil {
+ q = &ExpDefinition{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if len(this.Caveats) != len(that.Caveats) {
+ return false
+ }
+ for i, vx := range this.Caveats {
+ vy := that.Caveats[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ExpCaveat{}
+ }
+ if q == nil {
+ q = &ExpCaveat{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if !this.ReadAt.EqualVT(that.ReadAt) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExperimentalReflectSchemaResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExperimentalReflectSchemaResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExpSchemaFilter) EqualVT(that *ExpSchemaFilter) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.OptionalDefinitionNameFilter != that.OptionalDefinitionNameFilter {
+ return false
+ }
+ if this.OptionalCaveatNameFilter != that.OptionalCaveatNameFilter {
+ return false
+ }
+ if this.OptionalRelationNameFilter != that.OptionalRelationNameFilter {
+ return false
+ }
+ if this.OptionalPermissionNameFilter != that.OptionalPermissionNameFilter {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExpSchemaFilter) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExpSchemaFilter)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExpDefinition) EqualVT(that *ExpDefinition) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Name != that.Name {
+ return false
+ }
+ if this.Comment != that.Comment {
+ return false
+ }
+ if len(this.Relations) != len(that.Relations) {
+ return false
+ }
+ for i, vx := range this.Relations {
+ vy := that.Relations[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ExpRelation{}
+ }
+ if q == nil {
+ q = &ExpRelation{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if len(this.Permissions) != len(that.Permissions) {
+ return false
+ }
+ for i, vx := range this.Permissions {
+ vy := that.Permissions[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ExpPermission{}
+ }
+ if q == nil {
+ q = &ExpPermission{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExpDefinition) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExpDefinition)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExpCaveat) EqualVT(that *ExpCaveat) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Name != that.Name {
+ return false
+ }
+ if this.Comment != that.Comment {
+ return false
+ }
+ if len(this.Parameters) != len(that.Parameters) {
+ return false
+ }
+ for i, vx := range this.Parameters {
+ vy := that.Parameters[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ExpCaveatParameter{}
+ }
+ if q == nil {
+ q = &ExpCaveatParameter{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if this.Expression != that.Expression {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExpCaveat) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExpCaveat)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExpCaveatParameter) EqualVT(that *ExpCaveatParameter) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Name != that.Name {
+ return false
+ }
+ if this.Type != that.Type {
+ return false
+ }
+ if this.ParentCaveatName != that.ParentCaveatName {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExpCaveatParameter) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExpCaveatParameter)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExpRelation) EqualVT(that *ExpRelation) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Name != that.Name {
+ return false
+ }
+ if this.Comment != that.Comment {
+ return false
+ }
+ if this.ParentDefinitionName != that.ParentDefinitionName {
+ return false
+ }
+ if len(this.SubjectTypes) != len(that.SubjectTypes) {
+ return false
+ }
+ for i, vx := range this.SubjectTypes {
+ vy := that.SubjectTypes[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ExpTypeReference{}
+ }
+ if q == nil {
+ q = &ExpTypeReference{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExpRelation) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExpRelation)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExpTypeReference) EqualVT(that *ExpTypeReference) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Typeref == nil && that.Typeref != nil {
+ return false
+ } else if this.Typeref != nil {
+ if that.Typeref == nil {
+ return false
+ }
+ if !this.Typeref.(interface {
+ EqualVT(isExpTypeReference_Typeref) bool
+ }).EqualVT(that.Typeref) {
+ return false
+ }
+ }
+ if this.SubjectDefinitionName != that.SubjectDefinitionName {
+ return false
+ }
+ if this.OptionalCaveatName != that.OptionalCaveatName {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExpTypeReference) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExpTypeReference)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExpTypeReference_IsTerminalSubject) EqualVT(thatIface isExpTypeReference_Typeref) bool {
+ that, ok := thatIface.(*ExpTypeReference_IsTerminalSubject)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if this.IsTerminalSubject != that.IsTerminalSubject {
+ return false
+ }
+ return true
+}
+
+func (this *ExpTypeReference_OptionalRelationName) EqualVT(thatIface isExpTypeReference_Typeref) bool {
+ that, ok := thatIface.(*ExpTypeReference_OptionalRelationName)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if this.OptionalRelationName != that.OptionalRelationName {
+ return false
+ }
+ return true
+}
+
+func (this *ExpTypeReference_IsPublicWildcard) EqualVT(thatIface isExpTypeReference_Typeref) bool {
+ that, ok := thatIface.(*ExpTypeReference_IsPublicWildcard)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if this.IsPublicWildcard != that.IsPublicWildcard {
+ return false
+ }
+ return true
+}
+
+func (this *ExpPermission) EqualVT(that *ExpPermission) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Name != that.Name {
+ return false
+ }
+ if this.Comment != that.Comment {
+ return false
+ }
+ if this.ParentDefinitionName != that.ParentDefinitionName {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExpPermission) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExpPermission)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExperimentalComputablePermissionsRequest) EqualVT(that *ExperimentalComputablePermissionsRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if this.DefinitionName != that.DefinitionName {
+ return false
+ }
+ if this.RelationName != that.RelationName {
+ return false
+ }
+ if this.OptionalDefinitionNameFilter != that.OptionalDefinitionNameFilter {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExperimentalComputablePermissionsRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExperimentalComputablePermissionsRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExpRelationReference) EqualVT(that *ExpRelationReference) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.DefinitionName != that.DefinitionName {
+ return false
+ }
+ if this.RelationName != that.RelationName {
+ return false
+ }
+ if this.IsPermission != that.IsPermission {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExpRelationReference) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExpRelationReference)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExperimentalComputablePermissionsResponse) EqualVT(that *ExperimentalComputablePermissionsResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if len(this.Permissions) != len(that.Permissions) {
+ return false
+ }
+ for i, vx := range this.Permissions {
+ vy := that.Permissions[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ExpRelationReference{}
+ }
+ if q == nil {
+ q = &ExpRelationReference{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if !this.ReadAt.EqualVT(that.ReadAt) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExperimentalComputablePermissionsResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExperimentalComputablePermissionsResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExperimentalDependentRelationsRequest) EqualVT(that *ExperimentalDependentRelationsRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if this.DefinitionName != that.DefinitionName {
+ return false
+ }
+ if this.PermissionName != that.PermissionName {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExperimentalDependentRelationsRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExperimentalDependentRelationsRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExperimentalDependentRelationsResponse) EqualVT(that *ExperimentalDependentRelationsResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if len(this.Relations) != len(that.Relations) {
+ return false
+ }
+ for i, vx := range this.Relations {
+ vy := that.Relations[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ExpRelationReference{}
+ }
+ if q == nil {
+ q = &ExpRelationReference{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if !this.ReadAt.EqualVT(that.ReadAt) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExperimentalDependentRelationsResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExperimentalDependentRelationsResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExperimentalDiffSchemaRequest) EqualVT(that *ExperimentalDiffSchemaRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if this.ComparisonSchema != that.ComparisonSchema {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExperimentalDiffSchemaRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExperimentalDiffSchemaRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExperimentalDiffSchemaResponse) EqualVT(that *ExperimentalDiffSchemaResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if len(this.Diffs) != len(that.Diffs) {
+ return false
+ }
+ for i, vx := range this.Diffs {
+ vy := that.Diffs[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ExpSchemaDiff{}
+ }
+ if q == nil {
+ q = &ExpSchemaDiff{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if !this.ReadAt.EqualVT(that.ReadAt) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExperimentalDiffSchemaResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExperimentalDiffSchemaResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExpRelationSubjectTypeChange) EqualVT(that *ExpRelationSubjectTypeChange) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Relation.EqualVT(that.Relation) {
+ return false
+ }
+ if !this.ChangedSubjectType.EqualVT(that.ChangedSubjectType) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExpRelationSubjectTypeChange) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExpRelationSubjectTypeChange)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExpCaveatParameterTypeChange) EqualVT(that *ExpCaveatParameterTypeChange) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Parameter.EqualVT(that.Parameter) {
+ return false
+ }
+ if this.PreviousType != that.PreviousType {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExpCaveatParameterTypeChange) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExpCaveatParameterTypeChange)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExpSchemaDiff) EqualVT(that *ExpSchemaDiff) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Diff == nil && that.Diff != nil {
+ return false
+ } else if this.Diff != nil {
+ if that.Diff == nil {
+ return false
+ }
+ if !this.Diff.(interface {
+ EqualVT(isExpSchemaDiff_Diff) bool
+ }).EqualVT(that.Diff) {
+ return false
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExpSchemaDiff) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExpSchemaDiff)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExpSchemaDiff_DefinitionAdded) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_DefinitionAdded)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.DefinitionAdded, that.DefinitionAdded; p != q {
+ if p == nil {
+ p = &ExpDefinition{}
+ }
+ if q == nil {
+ q = &ExpDefinition{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_DefinitionRemoved) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_DefinitionRemoved)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.DefinitionRemoved, that.DefinitionRemoved; p != q {
+ if p == nil {
+ p = &ExpDefinition{}
+ }
+ if q == nil {
+ q = &ExpDefinition{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_DefinitionDocCommentChanged) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_DefinitionDocCommentChanged)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.DefinitionDocCommentChanged, that.DefinitionDocCommentChanged; p != q {
+ if p == nil {
+ p = &ExpDefinition{}
+ }
+ if q == nil {
+ q = &ExpDefinition{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_RelationAdded) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_RelationAdded)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.RelationAdded, that.RelationAdded; p != q {
+ if p == nil {
+ p = &ExpRelation{}
+ }
+ if q == nil {
+ q = &ExpRelation{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_RelationRemoved) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_RelationRemoved)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.RelationRemoved, that.RelationRemoved; p != q {
+ if p == nil {
+ p = &ExpRelation{}
+ }
+ if q == nil {
+ q = &ExpRelation{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_RelationDocCommentChanged) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_RelationDocCommentChanged)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.RelationDocCommentChanged, that.RelationDocCommentChanged; p != q {
+ if p == nil {
+ p = &ExpRelation{}
+ }
+ if q == nil {
+ q = &ExpRelation{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_RelationSubjectTypeAdded) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_RelationSubjectTypeAdded)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.RelationSubjectTypeAdded, that.RelationSubjectTypeAdded; p != q {
+ if p == nil {
+ p = &ExpRelationSubjectTypeChange{}
+ }
+ if q == nil {
+ q = &ExpRelationSubjectTypeChange{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_RelationSubjectTypeRemoved) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_RelationSubjectTypeRemoved)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.RelationSubjectTypeRemoved, that.RelationSubjectTypeRemoved; p != q {
+ if p == nil {
+ p = &ExpRelationSubjectTypeChange{}
+ }
+ if q == nil {
+ q = &ExpRelationSubjectTypeChange{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_PermissionAdded) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_PermissionAdded)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.PermissionAdded, that.PermissionAdded; p != q {
+ if p == nil {
+ p = &ExpPermission{}
+ }
+ if q == nil {
+ q = &ExpPermission{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_PermissionRemoved) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_PermissionRemoved)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.PermissionRemoved, that.PermissionRemoved; p != q {
+ if p == nil {
+ p = &ExpPermission{}
+ }
+ if q == nil {
+ q = &ExpPermission{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_PermissionDocCommentChanged) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_PermissionDocCommentChanged)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.PermissionDocCommentChanged, that.PermissionDocCommentChanged; p != q {
+ if p == nil {
+ p = &ExpPermission{}
+ }
+ if q == nil {
+ q = &ExpPermission{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_PermissionExprChanged) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_PermissionExprChanged)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.PermissionExprChanged, that.PermissionExprChanged; p != q {
+ if p == nil {
+ p = &ExpPermission{}
+ }
+ if q == nil {
+ q = &ExpPermission{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_CaveatAdded) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_CaveatAdded)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.CaveatAdded, that.CaveatAdded; p != q {
+ if p == nil {
+ p = &ExpCaveat{}
+ }
+ if q == nil {
+ q = &ExpCaveat{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_CaveatRemoved) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_CaveatRemoved)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.CaveatRemoved, that.CaveatRemoved; p != q {
+ if p == nil {
+ p = &ExpCaveat{}
+ }
+ if q == nil {
+ q = &ExpCaveat{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_CaveatDocCommentChanged) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_CaveatDocCommentChanged)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.CaveatDocCommentChanged, that.CaveatDocCommentChanged; p != q {
+ if p == nil {
+ p = &ExpCaveat{}
+ }
+ if q == nil {
+ q = &ExpCaveat{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_CaveatExprChanged) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_CaveatExprChanged)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.CaveatExprChanged, that.CaveatExprChanged; p != q {
+ if p == nil {
+ p = &ExpCaveat{}
+ }
+ if q == nil {
+ q = &ExpCaveat{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_CaveatParameterAdded) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_CaveatParameterAdded)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.CaveatParameterAdded, that.CaveatParameterAdded; p != q {
+ if p == nil {
+ p = &ExpCaveatParameter{}
+ }
+ if q == nil {
+ q = &ExpCaveatParameter{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_CaveatParameterRemoved) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_CaveatParameterRemoved)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.CaveatParameterRemoved, that.CaveatParameterRemoved; p != q {
+ if p == nil {
+ p = &ExpCaveatParameter{}
+ }
+ if q == nil {
+ q = &ExpCaveatParameter{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ExpSchemaDiff_CaveatParameterTypeChanged) EqualVT(thatIface isExpSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ExpSchemaDiff_CaveatParameterTypeChanged)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.CaveatParameterTypeChanged, that.CaveatParameterTypeChanged; p != q {
+ if p == nil {
+ p = &ExpCaveatParameterTypeChange{}
+ }
+ if q == nil {
+ q = &ExpCaveatParameterTypeChange{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (m *ExperimentalRegisterRelationshipCounterRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExperimentalRegisterRelationshipCounterRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExperimentalRegisterRelationshipCounterRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.RelationshipFilter != nil {
+ size, err := m.RelationshipFilter.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExperimentalRegisterRelationshipCounterResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExperimentalRegisterRelationshipCounterResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExperimentalRegisterRelationshipCounterResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExperimentalCountRelationshipsRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExperimentalCountRelationshipsRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExperimentalCountRelationshipsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExperimentalCountRelationshipsResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExperimentalCountRelationshipsResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExperimentalCountRelationshipsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if vtmsg, ok := m.CounterResult.(interface {
+ MarshalToSizedBufferVT([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExperimentalCountRelationshipsResponse_CounterStillCalculating) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExperimentalCountRelationshipsResponse_CounterStillCalculating) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i--
+ if m.CounterStillCalculating {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x8
+ return len(dAtA) - i, nil
+}
+func (m *ExperimentalCountRelationshipsResponse_ReadCounterValue) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExperimentalCountRelationshipsResponse_ReadCounterValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.ReadCounterValue != nil {
+ size, err := m.ReadCounterValue.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReadCounterValue) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReadCounterValue) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReadCounterValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ReadAt != nil {
+ size, err := m.ReadAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.RelationshipCount != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RelationshipCount))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExperimentalUnregisterRelationshipCounterRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExperimentalUnregisterRelationshipCounterRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExperimentalUnregisterRelationshipCounterRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExperimentalUnregisterRelationshipCounterResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExperimentalUnregisterRelationshipCounterResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExperimentalUnregisterRelationshipCounterResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *BulkCheckPermissionRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *BulkCheckPermissionRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *BulkCheckPermissionRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Items) > 0 {
+ for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Items[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *BulkCheckPermissionRequestItem) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *BulkCheckPermissionRequestItem) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *BulkCheckPermissionRequestItem) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Context != nil {
+ size, err := (*structpb1.Struct)(m.Context).MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.Subject != nil {
+ size, err := m.Subject.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Permission) > 0 {
+ i -= len(m.Permission)
+ copy(dAtA[i:], m.Permission)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Permission)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Resource != nil {
+ size, err := m.Resource.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *BulkCheckPermissionResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *BulkCheckPermissionResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *BulkCheckPermissionResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Pairs) > 0 {
+ for iNdEx := len(m.Pairs) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Pairs[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.CheckedAt != nil {
+ size, err := m.CheckedAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *BulkCheckPermissionPair) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *BulkCheckPermissionPair) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *BulkCheckPermissionPair) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if vtmsg, ok := m.Response.(interface {
+ MarshalToSizedBufferVT([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if m.Request != nil {
+ size, err := m.Request.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *BulkCheckPermissionPair_Item) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *BulkCheckPermissionPair_Item) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Item != nil {
+ size, err := m.Item.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *BulkCheckPermissionPair_Error) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *BulkCheckPermissionPair_Error) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Error != nil {
+ if vtmsg, ok := interface{}(m.Error).(interface {
+ MarshalToSizedBufferVT([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Error)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *BulkCheckPermissionResponseItem) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *BulkCheckPermissionResponseItem) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *BulkCheckPermissionResponseItem) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.PartialCaveatInfo != nil {
+ size, err := m.PartialCaveatInfo.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Permissionship != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Permissionship))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *BulkImportRelationshipsRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *BulkImportRelationshipsRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *BulkImportRelationshipsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Relationships) > 0 {
+ for iNdEx := len(m.Relationships) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Relationships[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *BulkImportRelationshipsResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *BulkImportRelationshipsResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *BulkImportRelationshipsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.NumLoaded != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NumLoaded))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *BulkExportRelationshipsRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *BulkExportRelationshipsRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *BulkExportRelationshipsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.OptionalRelationshipFilter != nil {
+ size, err := m.OptionalRelationshipFilter.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.OptionalCursor != nil {
+ size, err := m.OptionalCursor.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.OptionalLimit != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalLimit))
+ i--
+ dAtA[i] = 0x10
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *BulkExportRelationshipsResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *BulkExportRelationshipsResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *BulkExportRelationshipsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Relationships) > 0 {
+ for iNdEx := len(m.Relationships) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Relationships[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.AfterResultCursor != nil {
+ size, err := m.AfterResultCursor.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExperimentalReflectSchemaRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExperimentalReflectSchemaRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExperimentalReflectSchemaRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.OptionalFilters) > 0 {
+ for iNdEx := len(m.OptionalFilters) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.OptionalFilters[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExperimentalReflectSchemaResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExperimentalReflectSchemaResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExperimentalReflectSchemaResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ReadAt != nil {
+ size, err := m.ReadAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Caveats) > 0 {
+ for iNdEx := len(m.Caveats) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Caveats[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.Definitions) > 0 {
+ for iNdEx := len(m.Definitions) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Definitions[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExpSchemaFilter) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExpSchemaFilter) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.OptionalPermissionNameFilter) > 0 {
+ i -= len(m.OptionalPermissionNameFilter)
+ copy(dAtA[i:], m.OptionalPermissionNameFilter)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalPermissionNameFilter)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.OptionalRelationNameFilter) > 0 {
+ i -= len(m.OptionalRelationNameFilter)
+ copy(dAtA[i:], m.OptionalRelationNameFilter)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalRelationNameFilter)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.OptionalCaveatNameFilter) > 0 {
+ i -= len(m.OptionalCaveatNameFilter)
+ copy(dAtA[i:], m.OptionalCaveatNameFilter)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalCaveatNameFilter)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.OptionalDefinitionNameFilter) > 0 {
+ i -= len(m.OptionalDefinitionNameFilter)
+ copy(dAtA[i:], m.OptionalDefinitionNameFilter)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalDefinitionNameFilter)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExpDefinition) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExpDefinition) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Permissions) > 0 {
+ for iNdEx := len(m.Permissions) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Permissions[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ }
+ if len(m.Relations) > 0 {
+ for iNdEx := len(m.Relations) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Relations[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if len(m.Comment) > 0 {
+ i -= len(m.Comment)
+ copy(dAtA[i:], m.Comment)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Comment)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExpCaveat) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExpCaveat) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpCaveat) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Expression) > 0 {
+ i -= len(m.Expression)
+ copy(dAtA[i:], m.Expression)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Expression)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.Parameters) > 0 {
+ for iNdEx := len(m.Parameters) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Parameters[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if len(m.Comment) > 0 {
+ i -= len(m.Comment)
+ copy(dAtA[i:], m.Comment)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Comment)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExpCaveatParameter) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExpCaveatParameter) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpCaveatParameter) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.ParentCaveatName) > 0 {
+ i -= len(m.ParentCaveatName)
+ copy(dAtA[i:], m.ParentCaveatName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParentCaveatName)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Type) > 0 {
+ i -= len(m.Type)
+ copy(dAtA[i:], m.Type)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExpRelation) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExpRelation) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpRelation) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.SubjectTypes) > 0 {
+ for iNdEx := len(m.SubjectTypes) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.SubjectTypes[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ }
+ if len(m.ParentDefinitionName) > 0 {
+ i -= len(m.ParentDefinitionName)
+ copy(dAtA[i:], m.ParentDefinitionName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParentDefinitionName)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Comment) > 0 {
+ i -= len(m.Comment)
+ copy(dAtA[i:], m.Comment)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Comment)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExpTypeReference) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExpTypeReference) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpTypeReference) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if vtmsg, ok := m.Typeref.(interface {
+ MarshalToSizedBufferVT([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if len(m.OptionalCaveatName) > 0 {
+ i -= len(m.OptionalCaveatName)
+ copy(dAtA[i:], m.OptionalCaveatName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalCaveatName)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.SubjectDefinitionName) > 0 {
+ i -= len(m.SubjectDefinitionName)
+ copy(dAtA[i:], m.SubjectDefinitionName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SubjectDefinitionName)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExpTypeReference_IsTerminalSubject) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpTypeReference_IsTerminalSubject) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i--
+ if m.IsTerminalSubject {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x18
+ return len(dAtA) - i, nil
+}
+func (m *ExpTypeReference_OptionalRelationName) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpTypeReference_OptionalRelationName) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i -= len(m.OptionalRelationName)
+ copy(dAtA[i:], m.OptionalRelationName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalRelationName)))
+ i--
+ dAtA[i] = 0x22
+ return len(dAtA) - i, nil
+}
+func (m *ExpTypeReference_IsPublicWildcard) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpTypeReference_IsPublicWildcard) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i--
+ if m.IsPublicWildcard {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x28
+ return len(dAtA) - i, nil
+}
+func (m *ExpPermission) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExpPermission) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpPermission) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.ParentDefinitionName) > 0 {
+ i -= len(m.ParentDefinitionName)
+ copy(dAtA[i:], m.ParentDefinitionName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParentDefinitionName)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Comment) > 0 {
+ i -= len(m.Comment)
+ copy(dAtA[i:], m.Comment)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Comment)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExperimentalComputablePermissionsRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExperimentalComputablePermissionsRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExperimentalComputablePermissionsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.OptionalDefinitionNameFilter) > 0 {
+ i -= len(m.OptionalDefinitionNameFilter)
+ copy(dAtA[i:], m.OptionalDefinitionNameFilter)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalDefinitionNameFilter)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.RelationName) > 0 {
+ i -= len(m.RelationName)
+ copy(dAtA[i:], m.RelationName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RelationName)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.DefinitionName) > 0 {
+ i -= len(m.DefinitionName)
+ copy(dAtA[i:], m.DefinitionName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DefinitionName)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExpRelationReference) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExpRelationReference) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpRelationReference) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.IsPermission {
+ i--
+ if m.IsPermission {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x18
+ }
+ if len(m.RelationName) > 0 {
+ i -= len(m.RelationName)
+ copy(dAtA[i:], m.RelationName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RelationName)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.DefinitionName) > 0 {
+ i -= len(m.DefinitionName)
+ copy(dAtA[i:], m.DefinitionName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DefinitionName)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExperimentalComputablePermissionsResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExperimentalComputablePermissionsResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExperimentalComputablePermissionsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ReadAt != nil {
+ size, err := m.ReadAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Permissions) > 0 {
+ for iNdEx := len(m.Permissions) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Permissions[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExperimentalDependentRelationsRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExperimentalDependentRelationsRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExperimentalDependentRelationsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.PermissionName) > 0 {
+ i -= len(m.PermissionName)
+ copy(dAtA[i:], m.PermissionName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PermissionName)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.DefinitionName) > 0 {
+ i -= len(m.DefinitionName)
+ copy(dAtA[i:], m.DefinitionName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DefinitionName)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExperimentalDependentRelationsResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExperimentalDependentRelationsResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExperimentalDependentRelationsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ReadAt != nil {
+ size, err := m.ReadAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Relations) > 0 {
+ for iNdEx := len(m.Relations) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Relations[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExperimentalDiffSchemaRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExperimentalDiffSchemaRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExperimentalDiffSchemaRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.ComparisonSchema) > 0 {
+ i -= len(m.ComparisonSchema)
+ copy(dAtA[i:], m.ComparisonSchema)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ComparisonSchema)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExperimentalDiffSchemaResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExperimentalDiffSchemaResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExperimentalDiffSchemaResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ReadAt != nil {
+ size, err := m.ReadAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Diffs) > 0 {
+ for iNdEx := len(m.Diffs) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Diffs[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExpRelationSubjectTypeChange) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExpRelationSubjectTypeChange) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpRelationSubjectTypeChange) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ChangedSubjectType != nil {
+ size, err := m.ChangedSubjectType.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Relation != nil {
+ size, err := m.Relation.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExpCaveatParameterTypeChange) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExpCaveatParameterTypeChange) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpCaveatParameterTypeChange) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.PreviousType) > 0 {
+ i -= len(m.PreviousType)
+ copy(dAtA[i:], m.PreviousType)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PreviousType)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Parameter != nil {
+ size, err := m.Parameter.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExpSchemaDiff) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExpSchemaDiff) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if vtmsg, ok := m.Diff.(interface {
+ MarshalToSizedBufferVT([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExpSchemaDiff_DefinitionAdded) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_DefinitionAdded) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.DefinitionAdded != nil {
+ size, err := m.DefinitionAdded.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_DefinitionRemoved) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_DefinitionRemoved) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.DefinitionRemoved != nil {
+ size, err := m.DefinitionRemoved.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_DefinitionDocCommentChanged) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_DefinitionDocCommentChanged) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.DefinitionDocCommentChanged != nil {
+ size, err := m.DefinitionDocCommentChanged.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_RelationAdded) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_RelationAdded) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.RelationAdded != nil {
+ size, err := m.RelationAdded.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x22
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_RelationRemoved) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_RelationRemoved) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.RelationRemoved != nil {
+ size, err := m.RelationRemoved.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x2a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_RelationDocCommentChanged) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_RelationDocCommentChanged) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.RelationDocCommentChanged != nil {
+ size, err := m.RelationDocCommentChanged.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x32
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x32
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_RelationSubjectTypeAdded) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_RelationSubjectTypeAdded) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.RelationSubjectTypeAdded != nil {
+ size, err := m.RelationSubjectTypeAdded.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x3a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x3a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_RelationSubjectTypeRemoved) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_RelationSubjectTypeRemoved) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.RelationSubjectTypeRemoved != nil {
+ size, err := m.RelationSubjectTypeRemoved.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x42
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x42
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_PermissionAdded) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_PermissionAdded) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.PermissionAdded != nil {
+ size, err := m.PermissionAdded.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x4a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x4a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_PermissionRemoved) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_PermissionRemoved) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.PermissionRemoved != nil {
+ size, err := m.PermissionRemoved.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x52
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x52
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_PermissionDocCommentChanged) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_PermissionDocCommentChanged) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.PermissionDocCommentChanged != nil {
+ size, err := m.PermissionDocCommentChanged.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x5a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x5a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_PermissionExprChanged) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_PermissionExprChanged) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.PermissionExprChanged != nil {
+ size, err := m.PermissionExprChanged.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x62
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x62
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_CaveatAdded) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_CaveatAdded) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.CaveatAdded != nil {
+ size, err := m.CaveatAdded.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x6a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x6a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_CaveatRemoved) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_CaveatRemoved) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.CaveatRemoved != nil {
+ size, err := m.CaveatRemoved.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x72
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x72
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_CaveatDocCommentChanged) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_CaveatDocCommentChanged) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.CaveatDocCommentChanged != nil {
+ size, err := m.CaveatDocCommentChanged.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x7a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x7a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_CaveatExprChanged) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_CaveatExprChanged) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.CaveatExprChanged != nil {
+ size, err := m.CaveatExprChanged.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x82
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x82
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_CaveatParameterAdded) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_CaveatParameterAdded) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.CaveatParameterAdded != nil {
+ size, err := m.CaveatParameterAdded.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x8a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x8a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_CaveatParameterRemoved) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_CaveatParameterRemoved) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.CaveatParameterRemoved != nil {
+ size, err := m.CaveatParameterRemoved.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x92
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x92
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExpSchemaDiff_CaveatParameterTypeChanged) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpSchemaDiff_CaveatParameterTypeChanged) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.CaveatParameterTypeChanged != nil {
+ size, err := m.CaveatParameterTypeChanged.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x9a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x9a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ExperimentalRegisterRelationshipCounterRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.RelationshipFilter != nil {
+ l = m.RelationshipFilter.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExperimentalRegisterRelationshipCounterResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExperimentalCountRelationshipsRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExperimentalCountRelationshipsResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.CounterResult.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExperimentalCountRelationshipsResponse_CounterStillCalculating) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += 2
+ return n
+}
+func (m *ExperimentalCountRelationshipsResponse_ReadCounterValue) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ReadCounterValue != nil {
+ l = m.ReadCounterValue.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReadCounterValue) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RelationshipCount != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.RelationshipCount))
+ }
+ if m.ReadAt != nil {
+ l = m.ReadAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExperimentalUnregisterRelationshipCounterRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExperimentalUnregisterRelationshipCounterResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *BulkCheckPermissionRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *BulkCheckPermissionRequestItem) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Resource != nil {
+ l = m.Resource.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Permission)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Subject != nil {
+ l = m.Subject.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Context != nil {
+ l = (*structpb1.Struct)(m.Context).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *BulkCheckPermissionResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CheckedAt != nil {
+ l = m.CheckedAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.Pairs) > 0 {
+ for _, e := range m.Pairs {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *BulkCheckPermissionPair) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Request != nil {
+ l = m.Request.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if vtmsg, ok := m.Response.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *BulkCheckPermissionPair_Item) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Item != nil {
+ l = m.Item.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *BulkCheckPermissionPair_Error) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Error != nil {
+ if size, ok := interface{}(m.Error).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Error)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *BulkCheckPermissionResponseItem) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Permissionship != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Permissionship))
+ }
+ if m.PartialCaveatInfo != nil {
+ l = m.PartialCaveatInfo.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *BulkImportRelationshipsRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Relationships) > 0 {
+ for _, e := range m.Relationships {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *BulkImportRelationshipsResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.NumLoaded != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.NumLoaded))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *BulkExportRelationshipsRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OptionalLimit != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.OptionalLimit))
+ }
+ if m.OptionalCursor != nil {
+ l = m.OptionalCursor.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OptionalRelationshipFilter != nil {
+ l = m.OptionalRelationshipFilter.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *BulkExportRelationshipsResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.AfterResultCursor != nil {
+ l = m.AfterResultCursor.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.Relationships) > 0 {
+ for _, e := range m.Relationships {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExperimentalReflectSchemaRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.OptionalFilters) > 0 {
+ for _, e := range m.OptionalFilters {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExperimentalReflectSchemaResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Definitions) > 0 {
+ for _, e := range m.Definitions {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if len(m.Caveats) > 0 {
+ for _, e := range m.Caveats {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.ReadAt != nil {
+ l = m.ReadAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExpSchemaFilter) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.OptionalDefinitionNameFilter)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.OptionalCaveatNameFilter)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.OptionalRelationNameFilter)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.OptionalPermissionNameFilter)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExpDefinition) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Comment)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.Relations) > 0 {
+ for _, e := range m.Relations {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if len(m.Permissions) > 0 {
+ for _, e := range m.Permissions {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExpCaveat) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Comment)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.Parameters) > 0 {
+ for _, e := range m.Parameters {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ l = len(m.Expression)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExpCaveatParameter) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Type)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.ParentCaveatName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExpRelation) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Comment)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.ParentDefinitionName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.SubjectTypes) > 0 {
+ for _, e := range m.SubjectTypes {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExpTypeReference) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.SubjectDefinitionName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.OptionalCaveatName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if vtmsg, ok := m.Typeref.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExpTypeReference_IsTerminalSubject) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += 2
+ return n
+}
+func (m *ExpTypeReference_OptionalRelationName) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.OptionalRelationName)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ return n
+}
+func (m *ExpTypeReference_IsPublicWildcard) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += 2
+ return n
+}
+func (m *ExpPermission) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Comment)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.ParentDefinitionName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExperimentalComputablePermissionsRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.DefinitionName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.RelationName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.OptionalDefinitionNameFilter)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExpRelationReference) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.DefinitionName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.RelationName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.IsPermission {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExperimentalComputablePermissionsResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Permissions) > 0 {
+ for _, e := range m.Permissions {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.ReadAt != nil {
+ l = m.ReadAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExperimentalDependentRelationsRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.DefinitionName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.PermissionName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExperimentalDependentRelationsResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Relations) > 0 {
+ for _, e := range m.Relations {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.ReadAt != nil {
+ l = m.ReadAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExperimentalDiffSchemaRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.ComparisonSchema)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExperimentalDiffSchemaResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Diffs) > 0 {
+ for _, e := range m.Diffs {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.ReadAt != nil {
+ l = m.ReadAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExpRelationSubjectTypeChange) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Relation != nil {
+ l = m.Relation.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ChangedSubjectType != nil {
+ l = m.ChangedSubjectType.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExpCaveatParameterTypeChange) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Parameter != nil {
+ l = m.Parameter.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.PreviousType)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExpSchemaDiff) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.Diff.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExpSchemaDiff_DefinitionAdded) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.DefinitionAdded != nil {
+ l = m.DefinitionAdded.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_DefinitionRemoved) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.DefinitionRemoved != nil {
+ l = m.DefinitionRemoved.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_DefinitionDocCommentChanged) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.DefinitionDocCommentChanged != nil {
+ l = m.DefinitionDocCommentChanged.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_RelationAdded) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RelationAdded != nil {
+ l = m.RelationAdded.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_RelationRemoved) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RelationRemoved != nil {
+ l = m.RelationRemoved.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_RelationDocCommentChanged) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RelationDocCommentChanged != nil {
+ l = m.RelationDocCommentChanged.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_RelationSubjectTypeAdded) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RelationSubjectTypeAdded != nil {
+ l = m.RelationSubjectTypeAdded.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_RelationSubjectTypeRemoved) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RelationSubjectTypeRemoved != nil {
+ l = m.RelationSubjectTypeRemoved.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_PermissionAdded) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.PermissionAdded != nil {
+ l = m.PermissionAdded.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_PermissionRemoved) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.PermissionRemoved != nil {
+ l = m.PermissionRemoved.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_PermissionDocCommentChanged) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.PermissionDocCommentChanged != nil {
+ l = m.PermissionDocCommentChanged.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_PermissionExprChanged) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.PermissionExprChanged != nil {
+ l = m.PermissionExprChanged.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_CaveatAdded) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CaveatAdded != nil {
+ l = m.CaveatAdded.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_CaveatRemoved) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CaveatRemoved != nil {
+ l = m.CaveatRemoved.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_CaveatDocCommentChanged) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CaveatDocCommentChanged != nil {
+ l = m.CaveatDocCommentChanged.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_CaveatExprChanged) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CaveatExprChanged != nil {
+ l = m.CaveatExprChanged.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_CaveatParameterAdded) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CaveatParameterAdded != nil {
+ l = m.CaveatParameterAdded.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_CaveatParameterRemoved) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CaveatParameterRemoved != nil {
+ l = m.CaveatParameterRemoved.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExpSchemaDiff_CaveatParameterTypeChanged) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CaveatParameterTypeChanged != nil {
+ l = m.CaveatParameterTypeChanged.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ExperimentalRegisterRelationshipCounterRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExperimentalRegisterRelationshipCounterRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExperimentalRegisterRelationshipCounterRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationshipFilter", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RelationshipFilter == nil {
+ m.RelationshipFilter = &RelationshipFilter{}
+ }
+ if err := m.RelationshipFilter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExperimentalRegisterRelationshipCounterResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExperimentalRegisterRelationshipCounterResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExperimentalRegisterRelationshipCounterResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExperimentalCountRelationshipsRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExperimentalCountRelationshipsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExperimentalCountRelationshipsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExperimentalCountRelationshipsResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExperimentalCountRelationshipsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExperimentalCountRelationshipsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CounterStillCalculating", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.CounterResult = &ExperimentalCountRelationshipsResponse_CounterStillCalculating{CounterStillCalculating: b}
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadCounterValue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.CounterResult.(*ExperimentalCountRelationshipsResponse_ReadCounterValue); ok {
+ if err := oneof.ReadCounterValue.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReadCounterValue{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.CounterResult = &ExperimentalCountRelationshipsResponse_ReadCounterValue{ReadCounterValue: v}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReadCounterValue) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReadCounterValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReadCounterValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationshipCount", wireType)
+ }
+ m.RelationshipCount = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.RelationshipCount |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ReadAt == nil {
+ m.ReadAt = &ZedToken{}
+ }
+ if err := m.ReadAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExperimentalUnregisterRelationshipCounterRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExperimentalUnregisterRelationshipCounterRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExperimentalUnregisterRelationshipCounterRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExperimentalUnregisterRelationshipCounterResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExperimentalUnregisterRelationshipCounterResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExperimentalUnregisterRelationshipCounterResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *BulkCheckPermissionRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: BulkCheckPermissionRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: BulkCheckPermissionRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, &BulkCheckPermissionRequestItem{})
+ if err := m.Items[len(m.Items)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *BulkCheckPermissionRequestItem) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: BulkCheckPermissionRequestItem: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: BulkCheckPermissionRequestItem: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resource == nil {
+ m.Resource = &ObjectReference{}
+ }
+ if err := m.Resource.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Permission = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Subject == nil {
+ m.Subject = &SubjectReference{}
+ }
+ if err := m.Subject.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Context == nil {
+ m.Context = &structpb.Struct{}
+ }
+ if err := (*structpb1.Struct)(m.Context).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *BulkCheckPermissionResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: BulkCheckPermissionResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: BulkCheckPermissionResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CheckedAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.CheckedAt == nil {
+ m.CheckedAt = &ZedToken{}
+ }
+ if err := m.CheckedAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Pairs", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Pairs = append(m.Pairs, &BulkCheckPermissionPair{})
+ if err := m.Pairs[len(m.Pairs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *BulkCheckPermissionPair) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: BulkCheckPermissionPair: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: BulkCheckPermissionPair: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Request == nil {
+ m.Request = &BulkCheckPermissionRequestItem{}
+ }
+ if err := m.Request.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Item", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Response.(*BulkCheckPermissionPair_Item); ok {
+ if err := oneof.Item.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &BulkCheckPermissionResponseItem{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Response = &BulkCheckPermissionPair_Item{Item: v}
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Response.(*BulkCheckPermissionPair_Error); ok {
+ if unmarshal, ok := interface{}(oneof.Error).(interface {
+ UnmarshalVT([]byte) error
+ }); ok {
+ if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ if err := proto.Unmarshal(dAtA[iNdEx:postIndex], oneof.Error); err != nil {
+ return err
+ }
+ }
+ } else {
+ v := &status.Status{}
+ if unmarshal, ok := interface{}(v).(interface {
+ UnmarshalVT([]byte) error
+ }); ok {
+ if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ if err := proto.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil {
+ return err
+ }
+ }
+ m.Response = &BulkCheckPermissionPair_Error{Error: v}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *BulkCheckPermissionResponseItem) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: BulkCheckPermissionResponseItem: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: BulkCheckPermissionResponseItem: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permissionship", wireType)
+ }
+ m.Permissionship = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Permissionship |= CheckPermissionResponse_Permissionship(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PartialCaveatInfo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PartialCaveatInfo == nil {
+ m.PartialCaveatInfo = &PartialCaveatInfo{}
+ }
+ if err := m.PartialCaveatInfo.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *BulkImportRelationshipsRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: BulkImportRelationshipsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: BulkImportRelationshipsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Relationships", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Relationships = append(m.Relationships, &Relationship{})
+ if err := m.Relationships[len(m.Relationships)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *BulkImportRelationshipsResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: BulkImportRelationshipsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: BulkImportRelationshipsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NumLoaded", wireType)
+ }
+ m.NumLoaded = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.NumLoaded |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *BulkExportRelationshipsRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: BulkExportRelationshipsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: BulkExportRelationshipsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalLimit", wireType)
+ }
+ m.OptionalLimit = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.OptionalLimit |= uint32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalCursor", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalCursor == nil {
+ m.OptionalCursor = &Cursor{}
+ }
+ if err := m.OptionalCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalRelationshipFilter", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalRelationshipFilter == nil {
+ m.OptionalRelationshipFilter = &RelationshipFilter{}
+ }
+ if err := m.OptionalRelationshipFilter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *BulkExportRelationshipsResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: BulkExportRelationshipsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: BulkExportRelationshipsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AfterResultCursor", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AfterResultCursor == nil {
+ m.AfterResultCursor = &Cursor{}
+ }
+ if err := m.AfterResultCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Relationships", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Relationships = append(m.Relationships, &Relationship{})
+ if err := m.Relationships[len(m.Relationships)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExperimentalReflectSchemaRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExperimentalReflectSchemaRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExperimentalReflectSchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalFilters", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalFilters = append(m.OptionalFilters, &ExpSchemaFilter{})
+ if err := m.OptionalFilters[len(m.OptionalFilters)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExperimentalReflectSchemaResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExperimentalReflectSchemaResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExperimentalReflectSchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Definitions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Definitions = append(m.Definitions, &ExpDefinition{})
+ if err := m.Definitions[len(m.Definitions)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Caveats", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Caveats = append(m.Caveats, &ExpCaveat{})
+ if err := m.Caveats[len(m.Caveats)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ReadAt == nil {
+ m.ReadAt = &ZedToken{}
+ }
+ if err := m.ReadAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExpSchemaFilter) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExpSchemaFilter: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExpSchemaFilter: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalDefinitionNameFilter", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalDefinitionNameFilter = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalCaveatNameFilter", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalCaveatNameFilter = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalRelationNameFilter", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalRelationNameFilter = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalPermissionNameFilter", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalPermissionNameFilter = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExpDefinition) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExpDefinition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExpDefinition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Comment = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Relations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Relations = append(m.Relations, &ExpRelation{})
+ if err := m.Relations[len(m.Relations)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Permissions = append(m.Permissions, &ExpPermission{})
+ if err := m.Permissions[len(m.Permissions)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExpCaveat) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExpCaveat: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExpCaveat: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Comment = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Parameters = append(m.Parameters, &ExpCaveatParameter{})
+ if err := m.Parameters[len(m.Parameters)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Expression = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExpCaveatParameter) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExpCaveatParameter: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExpCaveatParameter: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ParentCaveatName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ParentCaveatName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExpRelation) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExpRelation: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExpRelation: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Comment = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ParentDefinitionName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ParentDefinitionName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SubjectTypes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SubjectTypes = append(m.SubjectTypes, &ExpTypeReference{})
+ if err := m.SubjectTypes[len(m.SubjectTypes)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExpTypeReference) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExpTypeReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExpTypeReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SubjectDefinitionName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SubjectDefinitionName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalCaveatName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalCaveatName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IsTerminalSubject", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Typeref = &ExpTypeReference_IsTerminalSubject{IsTerminalSubject: b}
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalRelationName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Typeref = &ExpTypeReference_OptionalRelationName{OptionalRelationName: string(dAtA[iNdEx:postIndex])}
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IsPublicWildcard", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Typeref = &ExpTypeReference_IsPublicWildcard{IsPublicWildcard: b}
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExpPermission) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExpPermission: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExpPermission: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Comment = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ParentDefinitionName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ParentDefinitionName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExperimentalComputablePermissionsRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExperimentalComputablePermissionsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExperimentalComputablePermissionsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefinitionName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DefinitionName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RelationName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalDefinitionNameFilter", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalDefinitionNameFilter = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExpRelationReference) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExpRelationReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExpRelationReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefinitionName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DefinitionName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RelationName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IsPermission", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.IsPermission = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExperimentalComputablePermissionsResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExperimentalComputablePermissionsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExperimentalComputablePermissionsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Permissions = append(m.Permissions, &ExpRelationReference{})
+ if err := m.Permissions[len(m.Permissions)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ReadAt == nil {
+ m.ReadAt = &ZedToken{}
+ }
+ if err := m.ReadAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExperimentalDependentRelationsRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExperimentalDependentRelationsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExperimentalDependentRelationsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefinitionName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DefinitionName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PermissionName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PermissionName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExperimentalDependentRelationsResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExperimentalDependentRelationsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExperimentalDependentRelationsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Relations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Relations = append(m.Relations, &ExpRelationReference{})
+ if err := m.Relations[len(m.Relations)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ReadAt == nil {
+ m.ReadAt = &ZedToken{}
+ }
+ if err := m.ReadAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExperimentalDiffSchemaRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExperimentalDiffSchemaRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExperimentalDiffSchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ComparisonSchema", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ComparisonSchema = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExperimentalDiffSchemaResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExperimentalDiffSchemaResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExperimentalDiffSchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Diffs", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Diffs = append(m.Diffs, &ExpSchemaDiff{})
+ if err := m.Diffs[len(m.Diffs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ReadAt == nil {
+ m.ReadAt = &ZedToken{}
+ }
+ if err := m.ReadAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExpRelationSubjectTypeChange) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExpRelationSubjectTypeChange: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExpRelationSubjectTypeChange: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Relation == nil {
+ m.Relation = &ExpRelation{}
+ }
+ if err := m.Relation.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ChangedSubjectType", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ChangedSubjectType == nil {
+ m.ChangedSubjectType = &ExpTypeReference{}
+ }
+ if err := m.ChangedSubjectType.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExpCaveatParameterTypeChange) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExpCaveatParameterTypeChange: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExpCaveatParameterTypeChange: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Parameter", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Parameter == nil {
+ m.Parameter = &ExpCaveatParameter{}
+ }
+ if err := m.Parameter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PreviousType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PreviousType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExpSchemaDiff) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExpSchemaDiff: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExpSchemaDiff: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefinitionAdded", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_DefinitionAdded); ok {
+ if err := oneof.DefinitionAdded.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpDefinition{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_DefinitionAdded{DefinitionAdded: v}
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefinitionRemoved", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_DefinitionRemoved); ok {
+ if err := oneof.DefinitionRemoved.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpDefinition{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_DefinitionRemoved{DefinitionRemoved: v}
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefinitionDocCommentChanged", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_DefinitionDocCommentChanged); ok {
+ if err := oneof.DefinitionDocCommentChanged.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpDefinition{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_DefinitionDocCommentChanged{DefinitionDocCommentChanged: v}
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationAdded", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_RelationAdded); ok {
+ if err := oneof.RelationAdded.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpRelation{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_RelationAdded{RelationAdded: v}
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationRemoved", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_RelationRemoved); ok {
+ if err := oneof.RelationRemoved.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpRelation{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_RelationRemoved{RelationRemoved: v}
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationDocCommentChanged", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_RelationDocCommentChanged); ok {
+ if err := oneof.RelationDocCommentChanged.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpRelation{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_RelationDocCommentChanged{RelationDocCommentChanged: v}
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationSubjectTypeAdded", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_RelationSubjectTypeAdded); ok {
+ if err := oneof.RelationSubjectTypeAdded.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpRelationSubjectTypeChange{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_RelationSubjectTypeAdded{RelationSubjectTypeAdded: v}
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationSubjectTypeRemoved", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_RelationSubjectTypeRemoved); ok {
+ if err := oneof.RelationSubjectTypeRemoved.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpRelationSubjectTypeChange{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_RelationSubjectTypeRemoved{RelationSubjectTypeRemoved: v}
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PermissionAdded", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_PermissionAdded); ok {
+ if err := oneof.PermissionAdded.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpPermission{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_PermissionAdded{PermissionAdded: v}
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PermissionRemoved", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_PermissionRemoved); ok {
+ if err := oneof.PermissionRemoved.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpPermission{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_PermissionRemoved{PermissionRemoved: v}
+ }
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PermissionDocCommentChanged", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_PermissionDocCommentChanged); ok {
+ if err := oneof.PermissionDocCommentChanged.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpPermission{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_PermissionDocCommentChanged{PermissionDocCommentChanged: v}
+ }
+ iNdEx = postIndex
+ case 12:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PermissionExprChanged", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_PermissionExprChanged); ok {
+ if err := oneof.PermissionExprChanged.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpPermission{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_PermissionExprChanged{PermissionExprChanged: v}
+ }
+ iNdEx = postIndex
+ case 13:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatAdded", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_CaveatAdded); ok {
+ if err := oneof.CaveatAdded.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpCaveat{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_CaveatAdded{CaveatAdded: v}
+ }
+ iNdEx = postIndex
+ case 14:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatRemoved", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_CaveatRemoved); ok {
+ if err := oneof.CaveatRemoved.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpCaveat{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_CaveatRemoved{CaveatRemoved: v}
+ }
+ iNdEx = postIndex
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatDocCommentChanged", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_CaveatDocCommentChanged); ok {
+ if err := oneof.CaveatDocCommentChanged.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpCaveat{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_CaveatDocCommentChanged{CaveatDocCommentChanged: v}
+ }
+ iNdEx = postIndex
+ case 16:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatExprChanged", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_CaveatExprChanged); ok {
+ if err := oneof.CaveatExprChanged.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpCaveat{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_CaveatExprChanged{CaveatExprChanged: v}
+ }
+ iNdEx = postIndex
+ case 17:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatParameterAdded", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_CaveatParameterAdded); ok {
+ if err := oneof.CaveatParameterAdded.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpCaveatParameter{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_CaveatParameterAdded{CaveatParameterAdded: v}
+ }
+ iNdEx = postIndex
+ case 18:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatParameterRemoved", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_CaveatParameterRemoved); ok {
+ if err := oneof.CaveatParameterRemoved.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpCaveatParameter{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_CaveatParameterRemoved{CaveatParameterRemoved: v}
+ }
+ iNdEx = postIndex
+ case 19:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatParameterTypeChanged", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ExpSchemaDiff_CaveatParameterTypeChanged); ok {
+ if err := oneof.CaveatParameterTypeChanged.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ExpCaveatParameterTypeChange{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ExpSchemaDiff_CaveatParameterTypeChanged{CaveatParameterTypeChanged: v}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/openapi.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/openapi.pb.go
new file mode 100644
index 0000000..19e700f
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/openapi.pb.go
@@ -0,0 +1,71 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.6
+// protoc (unknown)
+// source: authzed/api/v1/openapi.proto
+
+package v1
+
+import (
+ _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+var File_authzed_api_v1_openapi_proto protoreflect.FileDescriptor
+
+const file_authzed_api_v1_openapi_proto_rawDesc = "" +
+ "\n" +
+ "\x1cauthzed/api/v1/openapi.proto\x12\x0eauthzed.api.v1\x1a.protoc-gen-openapiv2/options/annotations.protoB\xd7\x03\x92A\x89\x03\x12\x9c\x01\n" +
+ "\aAuthzed\"D\n" +
+ "\rAuthzed, Inc.\x12\x1ehttps://github.com/authzed/api\x1a\x13support@authzed.com*F\n" +
+ "\x12Apache 2.0 License\x120https://github.com/authzed/api/blob/main/LICENSE2\x031.0*\x03\x01\x02\x042\x10application/json:\x10application/jsonZf\n" +
+ "d\n" +
+ "\n" +
+ "ApiKeyAuth\x12V\b\x02\x12ASpiceDB preshared-key, prefixed by Bearer: Bearer <preshared-key>\x1a\rAuthorization \x02b\x10\n" +
+ "\x0e\n" +
+ "\n" +
+ "ApiKeyAuth\x12\x00rE\n" +
+ "\x1bMore about the Authzed API.\x12&https://docs.authzed.com/reference/api\n" +
+ "\x12com.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
+
+var file_authzed_api_v1_openapi_proto_goTypes = []any{}
+var file_authzed_api_v1_openapi_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_authzed_api_v1_openapi_proto_init() }
+func file_authzed_api_v1_openapi_proto_init() {
+ if File_authzed_api_v1_openapi_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_authzed_api_v1_openapi_proto_rawDesc), len(file_authzed_api_v1_openapi_proto_rawDesc)),
+ NumEnums: 0,
+ NumMessages: 0,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_authzed_api_v1_openapi_proto_goTypes,
+ DependencyIndexes: file_authzed_api_v1_openapi_proto_depIdxs,
+ }.Build()
+ File_authzed_api_v1_openapi_proto = out.File
+ file_authzed_api_v1_openapi_proto_goTypes = nil
+ file_authzed_api_v1_openapi_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/openapi.pb.validate.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/openapi.pb.validate.go
new file mode 100644
index 0000000..b2d93a6
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/openapi.pb.validate.go
@@ -0,0 +1,36 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: authzed/api/v1/openapi.proto
+
+package v1
+
+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
+)
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service.pb.go
new file mode 100644
index 0000000..88db55e
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service.pb.go
@@ -0,0 +1,2899 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.6
+// protoc (unknown)
+// source: authzed/api/v1/permission_service.proto
+
+package v1
+
+import (
+ _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ _ "google.golang.org/genproto/googleapis/api/annotations"
+ status "google.golang.org/genproto/googleapis/rpc/status"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// LookupPermissionship represents whether a Lookup response was partially evaluated or not
+type LookupPermissionship int32
+
+const (
+ LookupPermissionship_LOOKUP_PERMISSIONSHIP_UNSPECIFIED LookupPermissionship = 0
+ LookupPermissionship_LOOKUP_PERMISSIONSHIP_HAS_PERMISSION LookupPermissionship = 1
+ LookupPermissionship_LOOKUP_PERMISSIONSHIP_CONDITIONAL_PERMISSION LookupPermissionship = 2
+)
+
+// Enum value maps for LookupPermissionship.
+var (
+ LookupPermissionship_name = map[int32]string{
+ 0: "LOOKUP_PERMISSIONSHIP_UNSPECIFIED",
+ 1: "LOOKUP_PERMISSIONSHIP_HAS_PERMISSION",
+ 2: "LOOKUP_PERMISSIONSHIP_CONDITIONAL_PERMISSION",
+ }
+ LookupPermissionship_value = map[string]int32{
+ "LOOKUP_PERMISSIONSHIP_UNSPECIFIED": 0,
+ "LOOKUP_PERMISSIONSHIP_HAS_PERMISSION": 1,
+ "LOOKUP_PERMISSIONSHIP_CONDITIONAL_PERMISSION": 2,
+ }
+)
+
+func (x LookupPermissionship) Enum() *LookupPermissionship {
+ p := new(LookupPermissionship)
+ *p = x
+ return p
+}
+
+func (x LookupPermissionship) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (LookupPermissionship) Descriptor() protoreflect.EnumDescriptor {
+ return file_authzed_api_v1_permission_service_proto_enumTypes[0].Descriptor()
+}
+
+func (LookupPermissionship) Type() protoreflect.EnumType {
+ return &file_authzed_api_v1_permission_service_proto_enumTypes[0]
+}
+
+func (x LookupPermissionship) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use LookupPermissionship.Descriptor instead.
+func (LookupPermissionship) EnumDescriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{0}
+}
+
+type Precondition_Operation int32
+
+const (
+ Precondition_OPERATION_UNSPECIFIED Precondition_Operation = 0
+ Precondition_OPERATION_MUST_NOT_MATCH Precondition_Operation = 1
+ Precondition_OPERATION_MUST_MATCH Precondition_Operation = 2
+)
+
+// Enum value maps for Precondition_Operation.
+var (
+ Precondition_Operation_name = map[int32]string{
+ 0: "OPERATION_UNSPECIFIED",
+ 1: "OPERATION_MUST_NOT_MATCH",
+ 2: "OPERATION_MUST_MATCH",
+ }
+ Precondition_Operation_value = map[string]int32{
+ "OPERATION_UNSPECIFIED": 0,
+ "OPERATION_MUST_NOT_MATCH": 1,
+ "OPERATION_MUST_MATCH": 2,
+ }
+)
+
+func (x Precondition_Operation) Enum() *Precondition_Operation {
+ p := new(Precondition_Operation)
+ *p = x
+ return p
+}
+
+func (x Precondition_Operation) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Precondition_Operation) Descriptor() protoreflect.EnumDescriptor {
+ return file_authzed_api_v1_permission_service_proto_enumTypes[1].Descriptor()
+}
+
+func (Precondition_Operation) Type() protoreflect.EnumType {
+ return &file_authzed_api_v1_permission_service_proto_enumTypes[1]
+}
+
+func (x Precondition_Operation) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use Precondition_Operation.Descriptor instead.
+func (Precondition_Operation) EnumDescriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{5, 0}
+}
+
+type DeleteRelationshipsResponse_DeletionProgress int32
+
+const (
+ DeleteRelationshipsResponse_DELETION_PROGRESS_UNSPECIFIED DeleteRelationshipsResponse_DeletionProgress = 0
+ // DELETION_PROGRESS_COMPLETE indicates that all remaining relationships matching the filter
+ // were deleted. Will be returned even if no relationships were deleted.
+ DeleteRelationshipsResponse_DELETION_PROGRESS_COMPLETE DeleteRelationshipsResponse_DeletionProgress = 1
+ // DELETION_PROGRESS_PARTIAL indicates that a subset of the relationships matching the filter
+ // were deleted. Only returned if optional_allow_partial_deletions was true, an optional_limit was
+ // specified, and there existed more relationships matching the filter than optional_limit would allow.
+ // Once all remaining relationships have been deleted, DELETION_PROGRESS_COMPLETE will be returned.
+ DeleteRelationshipsResponse_DELETION_PROGRESS_PARTIAL DeleteRelationshipsResponse_DeletionProgress = 2
+)
+
+// Enum value maps for DeleteRelationshipsResponse_DeletionProgress.
+var (
+ DeleteRelationshipsResponse_DeletionProgress_name = map[int32]string{
+ 0: "DELETION_PROGRESS_UNSPECIFIED",
+ 1: "DELETION_PROGRESS_COMPLETE",
+ 2: "DELETION_PROGRESS_PARTIAL",
+ }
+ DeleteRelationshipsResponse_DeletionProgress_value = map[string]int32{
+ "DELETION_PROGRESS_UNSPECIFIED": 0,
+ "DELETION_PROGRESS_COMPLETE": 1,
+ "DELETION_PROGRESS_PARTIAL": 2,
+ }
+)
+
+func (x DeleteRelationshipsResponse_DeletionProgress) Enum() *DeleteRelationshipsResponse_DeletionProgress {
+ p := new(DeleteRelationshipsResponse_DeletionProgress)
+ *p = x
+ return p
+}
+
+func (x DeleteRelationshipsResponse_DeletionProgress) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (DeleteRelationshipsResponse_DeletionProgress) Descriptor() protoreflect.EnumDescriptor {
+ return file_authzed_api_v1_permission_service_proto_enumTypes[2].Descriptor()
+}
+
+func (DeleteRelationshipsResponse_DeletionProgress) Type() protoreflect.EnumType {
+ return &file_authzed_api_v1_permission_service_proto_enumTypes[2]
+}
+
+func (x DeleteRelationshipsResponse_DeletionProgress) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use DeleteRelationshipsResponse_DeletionProgress.Descriptor instead.
+func (DeleteRelationshipsResponse_DeletionProgress) EnumDescriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{9, 0}
+}
+
+type CheckPermissionResponse_Permissionship int32
+
+const (
+ CheckPermissionResponse_PERMISSIONSHIP_UNSPECIFIED CheckPermissionResponse_Permissionship = 0
+ CheckPermissionResponse_PERMISSIONSHIP_NO_PERMISSION CheckPermissionResponse_Permissionship = 1
+ CheckPermissionResponse_PERMISSIONSHIP_HAS_PERMISSION CheckPermissionResponse_Permissionship = 2
+ CheckPermissionResponse_PERMISSIONSHIP_CONDITIONAL_PERMISSION CheckPermissionResponse_Permissionship = 3
+)
+
+// Enum value maps for CheckPermissionResponse_Permissionship.
+var (
+ CheckPermissionResponse_Permissionship_name = map[int32]string{
+ 0: "PERMISSIONSHIP_UNSPECIFIED",
+ 1: "PERMISSIONSHIP_NO_PERMISSION",
+ 2: "PERMISSIONSHIP_HAS_PERMISSION",
+ 3: "PERMISSIONSHIP_CONDITIONAL_PERMISSION",
+ }
+ CheckPermissionResponse_Permissionship_value = map[string]int32{
+ "PERMISSIONSHIP_UNSPECIFIED": 0,
+ "PERMISSIONSHIP_NO_PERMISSION": 1,
+ "PERMISSIONSHIP_HAS_PERMISSION": 2,
+ "PERMISSIONSHIP_CONDITIONAL_PERMISSION": 3,
+ }
+)
+
+func (x CheckPermissionResponse_Permissionship) Enum() *CheckPermissionResponse_Permissionship {
+ p := new(CheckPermissionResponse_Permissionship)
+ *p = x
+ return p
+}
+
+func (x CheckPermissionResponse_Permissionship) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CheckPermissionResponse_Permissionship) Descriptor() protoreflect.EnumDescriptor {
+ return file_authzed_api_v1_permission_service_proto_enumTypes[3].Descriptor()
+}
+
+func (CheckPermissionResponse_Permissionship) Type() protoreflect.EnumType {
+ return &file_authzed_api_v1_permission_service_proto_enumTypes[3]
+}
+
+func (x CheckPermissionResponse_Permissionship) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use CheckPermissionResponse_Permissionship.Descriptor instead.
+func (CheckPermissionResponse_Permissionship) EnumDescriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{11, 0}
+}
+
+type LookupSubjectsRequest_WildcardOption int32
+
+const (
+ LookupSubjectsRequest_WILDCARD_OPTION_UNSPECIFIED LookupSubjectsRequest_WildcardOption = 0
+ LookupSubjectsRequest_WILDCARD_OPTION_INCLUDE_WILDCARDS LookupSubjectsRequest_WildcardOption = 1
+ LookupSubjectsRequest_WILDCARD_OPTION_EXCLUDE_WILDCARDS LookupSubjectsRequest_WildcardOption = 2
+)
+
+// Enum value maps for LookupSubjectsRequest_WildcardOption.
+var (
+ LookupSubjectsRequest_WildcardOption_name = map[int32]string{
+ 0: "WILDCARD_OPTION_UNSPECIFIED",
+ 1: "WILDCARD_OPTION_INCLUDE_WILDCARDS",
+ 2: "WILDCARD_OPTION_EXCLUDE_WILDCARDS",
+ }
+ LookupSubjectsRequest_WildcardOption_value = map[string]int32{
+ "WILDCARD_OPTION_UNSPECIFIED": 0,
+ "WILDCARD_OPTION_INCLUDE_WILDCARDS": 1,
+ "WILDCARD_OPTION_EXCLUDE_WILDCARDS": 2,
+ }
+)
+
+func (x LookupSubjectsRequest_WildcardOption) Enum() *LookupSubjectsRequest_WildcardOption {
+ p := new(LookupSubjectsRequest_WildcardOption)
+ *p = x
+ return p
+}
+
+func (x LookupSubjectsRequest_WildcardOption) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (LookupSubjectsRequest_WildcardOption) Descriptor() protoreflect.EnumDescriptor {
+ return file_authzed_api_v1_permission_service_proto_enumTypes[4].Descriptor()
+}
+
+func (LookupSubjectsRequest_WildcardOption) Type() protoreflect.EnumType {
+ return &file_authzed_api_v1_permission_service_proto_enumTypes[4]
+}
+
+func (x LookupSubjectsRequest_WildcardOption) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use LookupSubjectsRequest_WildcardOption.Descriptor instead.
+func (LookupSubjectsRequest_WildcardOption) EnumDescriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{21, 0}
+}
+
+// Consistency will define how a request is handled by the backend.
+// By defining a consistency requirement, and a token at which those
+// requirements should be applied, where applicable.
+type Consistency struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Types that are valid to be assigned to Requirement:
+ //
+ // *Consistency_MinimizeLatency
+ // *Consistency_AtLeastAsFresh
+ // *Consistency_AtExactSnapshot
+ // *Consistency_FullyConsistent
+ Requirement isConsistency_Requirement `protobuf_oneof:"requirement"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Consistency) Reset() {
+ *x = Consistency{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Consistency) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Consistency) ProtoMessage() {}
+
+func (x *Consistency) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Consistency.ProtoReflect.Descriptor instead.
+func (*Consistency) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Consistency) GetRequirement() isConsistency_Requirement {
+ if x != nil {
+ return x.Requirement
+ }
+ return nil
+}
+
+func (x *Consistency) GetMinimizeLatency() bool {
+ if x != nil {
+ if x, ok := x.Requirement.(*Consistency_MinimizeLatency); ok {
+ return x.MinimizeLatency
+ }
+ }
+ return false
+}
+
+func (x *Consistency) GetAtLeastAsFresh() *ZedToken {
+ if x != nil {
+ if x, ok := x.Requirement.(*Consistency_AtLeastAsFresh); ok {
+ return x.AtLeastAsFresh
+ }
+ }
+ return nil
+}
+
+func (x *Consistency) GetAtExactSnapshot() *ZedToken {
+ if x != nil {
+ if x, ok := x.Requirement.(*Consistency_AtExactSnapshot); ok {
+ return x.AtExactSnapshot
+ }
+ }
+ return nil
+}
+
+func (x *Consistency) GetFullyConsistent() bool {
+ if x != nil {
+ if x, ok := x.Requirement.(*Consistency_FullyConsistent); ok {
+ return x.FullyConsistent
+ }
+ }
+ return false
+}
+
+type isConsistency_Requirement interface {
+ isConsistency_Requirement()
+}
+
+type Consistency_MinimizeLatency struct {
+ // minimize_latency indicates that the latency for the call should be
+ // minimized by having the system select the fastest snapshot available.
+ MinimizeLatency bool `protobuf:"varint,1,opt,name=minimize_latency,json=minimizeLatency,proto3,oneof"`
+}
+
+type Consistency_AtLeastAsFresh struct {
+ // at_least_as_fresh indicates that all data used in the API call must be
+ // *at least as fresh* as that found in the ZedToken; more recent data might
+ // be used if available or faster.
+ AtLeastAsFresh *ZedToken `protobuf:"bytes,2,opt,name=at_least_as_fresh,json=atLeastAsFresh,proto3,oneof"`
+}
+
+type Consistency_AtExactSnapshot struct {
+ // at_exact_snapshot indicates that all data used in the API call must be
+ // *at the given* snapshot in time; if the snapshot is no longer available,
+ // an error will be returned to the caller.
+ AtExactSnapshot *ZedToken `protobuf:"bytes,3,opt,name=at_exact_snapshot,json=atExactSnapshot,proto3,oneof"`
+}
+
+type Consistency_FullyConsistent struct {
+ // fully_consistent indicates that all data used in the API call *must* be
+ // at the most recent snapshot found.
+ //
+ // NOTE: using this method can be *quite slow*, so unless there is a need to
+ // do so, it is recommended to use `at_least_as_fresh` with a stored
+ // ZedToken.
+ FullyConsistent bool `protobuf:"varint,4,opt,name=fully_consistent,json=fullyConsistent,proto3,oneof"`
+}
+
+func (*Consistency_MinimizeLatency) isConsistency_Requirement() {}
+
+func (*Consistency_AtLeastAsFresh) isConsistency_Requirement() {}
+
+func (*Consistency_AtExactSnapshot) isConsistency_Requirement() {}
+
+func (*Consistency_FullyConsistent) isConsistency_Requirement() {}
+
+// RelationshipFilter is a collection of filters which when applied to a
+// relationship will return relationships that have exactly matching fields.
+//
+// All fields are optional and if left unspecified will not filter relationships,
+// but at least one field must be specified.
+//
+// NOTE: The performance of the API will be affected by the selection of fields
+// on which to filter. If a field is not indexed, the performance of the API
+// can be significantly slower.
+type RelationshipFilter struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // resource_type is the *optional* resource type of the relationship.
+ // NOTE: It is not prefixed with "optional_" for legacy compatibility.
+ ResourceType string `protobuf:"bytes,1,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
+ // optional_resource_id is the *optional* resource ID of the relationship.
+ // If specified, optional_resource_id_prefix cannot be specified.
+ OptionalResourceId string `protobuf:"bytes,2,opt,name=optional_resource_id,json=optionalResourceId,proto3" json:"optional_resource_id,omitempty"`
+ // optional_resource_id_prefix is the *optional* prefix for the resource ID of the relationship.
+ // If specified, optional_resource_id cannot be specified.
+ OptionalResourceIdPrefix string `protobuf:"bytes,5,opt,name=optional_resource_id_prefix,json=optionalResourceIdPrefix,proto3" json:"optional_resource_id_prefix,omitempty"`
+ // relation is the *optional* relation of the relationship.
+ OptionalRelation string `protobuf:"bytes,3,opt,name=optional_relation,json=optionalRelation,proto3" json:"optional_relation,omitempty"`
+ // optional_subject_filter is the optional filter for the subjects of the relationships.
+ OptionalSubjectFilter *SubjectFilter `protobuf:"bytes,4,opt,name=optional_subject_filter,json=optionalSubjectFilter,proto3" json:"optional_subject_filter,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *RelationshipFilter) Reset() {
+ *x = RelationshipFilter{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *RelationshipFilter) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RelationshipFilter) ProtoMessage() {}
+
+func (x *RelationshipFilter) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RelationshipFilter.ProtoReflect.Descriptor instead.
+func (*RelationshipFilter) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *RelationshipFilter) GetResourceType() string {
+ if x != nil {
+ return x.ResourceType
+ }
+ return ""
+}
+
+func (x *RelationshipFilter) GetOptionalResourceId() string {
+ if x != nil {
+ return x.OptionalResourceId
+ }
+ return ""
+}
+
+func (x *RelationshipFilter) GetOptionalResourceIdPrefix() string {
+ if x != nil {
+ return x.OptionalResourceIdPrefix
+ }
+ return ""
+}
+
+func (x *RelationshipFilter) GetOptionalRelation() string {
+ if x != nil {
+ return x.OptionalRelation
+ }
+ return ""
+}
+
+func (x *RelationshipFilter) GetOptionalSubjectFilter() *SubjectFilter {
+ if x != nil {
+ return x.OptionalSubjectFilter
+ }
+ return nil
+}
+
+// SubjectFilter specifies a filter on the subject of a relationship.
+//
+// subject_type is required and all other fields are optional, and will not
+// impose any additional requirements if left unspecified.
+type SubjectFilter struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ SubjectType string `protobuf:"bytes,1,opt,name=subject_type,json=subjectType,proto3" json:"subject_type,omitempty"`
+ OptionalSubjectId string `protobuf:"bytes,2,opt,name=optional_subject_id,json=optionalSubjectId,proto3" json:"optional_subject_id,omitempty"`
+ OptionalRelation *SubjectFilter_RelationFilter `protobuf:"bytes,3,opt,name=optional_relation,json=optionalRelation,proto3" json:"optional_relation,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SubjectFilter) Reset() {
+ *x = SubjectFilter{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SubjectFilter) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SubjectFilter) ProtoMessage() {}
+
+func (x *SubjectFilter) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SubjectFilter.ProtoReflect.Descriptor instead.
+func (*SubjectFilter) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *SubjectFilter) GetSubjectType() string {
+ if x != nil {
+ return x.SubjectType
+ }
+ return ""
+}
+
+func (x *SubjectFilter) GetOptionalSubjectId() string {
+ if x != nil {
+ return x.OptionalSubjectId
+ }
+ return ""
+}
+
+func (x *SubjectFilter) GetOptionalRelation() *SubjectFilter_RelationFilter {
+ if x != nil {
+ return x.OptionalRelation
+ }
+ return nil
+}
+
+// ReadRelationshipsRequest specifies one or more filters used to read matching
+// relationships within the system.
+type ReadRelationshipsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ // relationship_filter defines the filter to be applied to the relationships
+ // to be returned.
+ RelationshipFilter *RelationshipFilter `protobuf:"bytes,2,opt,name=relationship_filter,json=relationshipFilter,proto3" json:"relationship_filter,omitempty"`
+ // optional_limit, if non-zero, specifies the limit on the number of relationships to return
+ // before the stream is closed on the server side. By default, the stream will continue
+ // resolving relationships until exhausted or the stream is closed due to the client or a
+ // network issue.
+ OptionalLimit uint32 `protobuf:"varint,3,opt,name=optional_limit,json=optionalLimit,proto3" json:"optional_limit,omitempty"`
+ // optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+ // The cursor can be found on the ReadRelationshipsResponse object.
+ OptionalCursor *Cursor `protobuf:"bytes,4,opt,name=optional_cursor,json=optionalCursor,proto3" json:"optional_cursor,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReadRelationshipsRequest) Reset() {
+ *x = ReadRelationshipsRequest{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReadRelationshipsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReadRelationshipsRequest) ProtoMessage() {}
+
+func (x *ReadRelationshipsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReadRelationshipsRequest.ProtoReflect.Descriptor instead.
+func (*ReadRelationshipsRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *ReadRelationshipsRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+func (x *ReadRelationshipsRequest) GetRelationshipFilter() *RelationshipFilter {
+ if x != nil {
+ return x.RelationshipFilter
+ }
+ return nil
+}
+
+func (x *ReadRelationshipsRequest) GetOptionalLimit() uint32 {
+ if x != nil {
+ return x.OptionalLimit
+ }
+ return 0
+}
+
+func (x *ReadRelationshipsRequest) GetOptionalCursor() *Cursor {
+ if x != nil {
+ return x.OptionalCursor
+ }
+ return nil
+}
+
+// ReadRelationshipsResponse contains a Relationship found that matches the
+// specified relationship filter(s). A instance of this response message will
+// be streamed to the client for each relationship found.
+type ReadRelationshipsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // read_at is the ZedToken at which the relationship was found.
+ ReadAt *ZedToken `protobuf:"bytes,1,opt,name=read_at,json=readAt,proto3" json:"read_at,omitempty"`
+ // relationship is the found relationship.
+ Relationship *Relationship `protobuf:"bytes,2,opt,name=relationship,proto3" json:"relationship,omitempty"`
+ // after_result_cursor holds a cursor that can be used to resume the ReadRelationships stream after this
+ // result.
+ AfterResultCursor *Cursor `protobuf:"bytes,3,opt,name=after_result_cursor,json=afterResultCursor,proto3" json:"after_result_cursor,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReadRelationshipsResponse) Reset() {
+ *x = ReadRelationshipsResponse{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReadRelationshipsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReadRelationshipsResponse) ProtoMessage() {}
+
+func (x *ReadRelationshipsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[4]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReadRelationshipsResponse.ProtoReflect.Descriptor instead.
+func (*ReadRelationshipsResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *ReadRelationshipsResponse) GetReadAt() *ZedToken {
+ if x != nil {
+ return x.ReadAt
+ }
+ return nil
+}
+
+func (x *ReadRelationshipsResponse) GetRelationship() *Relationship {
+ if x != nil {
+ return x.Relationship
+ }
+ return nil
+}
+
+func (x *ReadRelationshipsResponse) GetAfterResultCursor() *Cursor {
+ if x != nil {
+ return x.AfterResultCursor
+ }
+ return nil
+}
+
+// Precondition specifies how and the existence or absence of certain
+// relationships as expressed through the accompanying filter should affect
+// whether or not the operation proceeds.
+//
+// MUST_NOT_MATCH will fail the parent request if any relationships match the
+// relationships filter.
+// MUST_MATCH will fail the parent request if there are no
+// relationships that match the filter.
+type Precondition struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Operation Precondition_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=authzed.api.v1.Precondition_Operation" json:"operation,omitempty"`
+ Filter *RelationshipFilter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *Precondition) Reset() {
+ *x = Precondition{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *Precondition) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Precondition) ProtoMessage() {}
+
+func (x *Precondition) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[5]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Precondition.ProtoReflect.Descriptor instead.
+func (*Precondition) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *Precondition) GetOperation() Precondition_Operation {
+ if x != nil {
+ return x.Operation
+ }
+ return Precondition_OPERATION_UNSPECIFIED
+}
+
+func (x *Precondition) GetFilter() *RelationshipFilter {
+ if x != nil {
+ return x.Filter
+ }
+ return nil
+}
+
+// WriteRelationshipsRequest contains a list of Relationship mutations that
+// should be applied to the service. If the optional_preconditions parameter
+// is included, all of the specified preconditions must also be satisfied before
+// the write will be committed. All updates will be applied transactionally,
+// and if any preconditions fail, the entire transaction will be reverted.
+type WriteRelationshipsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Updates []*RelationshipUpdate `protobuf:"bytes,1,rep,name=updates,proto3" json:"updates,omitempty"`
+ OptionalPreconditions []*Precondition `protobuf:"bytes,2,rep,name=optional_preconditions,json=optionalPreconditions,proto3" json:"optional_preconditions,omitempty"` // To be bounded by configuration
+ // optional_transaction_metadata is an optional field that can be used to store metadata about the transaction.
+ // If specified, this metadata will be supplied in the WatchResponse for the updates associated with this
+ // transaction.
+ OptionalTransactionMetadata *structpb.Struct `protobuf:"bytes,3,opt,name=optional_transaction_metadata,json=optionalTransactionMetadata,proto3" json:"optional_transaction_metadata,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WriteRelationshipsRequest) Reset() {
+ *x = WriteRelationshipsRequest{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WriteRelationshipsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WriteRelationshipsRequest) ProtoMessage() {}
+
+func (x *WriteRelationshipsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[6]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WriteRelationshipsRequest.ProtoReflect.Descriptor instead.
+func (*WriteRelationshipsRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *WriteRelationshipsRequest) GetUpdates() []*RelationshipUpdate {
+ if x != nil {
+ return x.Updates
+ }
+ return nil
+}
+
+func (x *WriteRelationshipsRequest) GetOptionalPreconditions() []*Precondition {
+ if x != nil {
+ return x.OptionalPreconditions
+ }
+ return nil
+}
+
+func (x *WriteRelationshipsRequest) GetOptionalTransactionMetadata() *structpb.Struct {
+ if x != nil {
+ return x.OptionalTransactionMetadata
+ }
+ return nil
+}
+
+type WriteRelationshipsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ WrittenAt *ZedToken `protobuf:"bytes,1,opt,name=written_at,json=writtenAt,proto3" json:"written_at,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WriteRelationshipsResponse) Reset() {
+ *x = WriteRelationshipsResponse{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WriteRelationshipsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WriteRelationshipsResponse) ProtoMessage() {}
+
+func (x *WriteRelationshipsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[7]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WriteRelationshipsResponse.ProtoReflect.Descriptor instead.
+func (*WriteRelationshipsResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *WriteRelationshipsResponse) GetWrittenAt() *ZedToken {
+ if x != nil {
+ return x.WrittenAt
+ }
+ return nil
+}
+
+// DeleteRelationshipsRequest specifies which Relationships should be deleted,
+// requesting the delete of *ALL* relationships that match the specified
+// filters. If the optional_preconditions parameter is included, all of the
+// specified preconditions must also be satisfied before the delete will be
+// executed.
+type DeleteRelationshipsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ RelationshipFilter *RelationshipFilter `protobuf:"bytes,1,opt,name=relationship_filter,json=relationshipFilter,proto3" json:"relationship_filter,omitempty"`
+ OptionalPreconditions []*Precondition `protobuf:"bytes,2,rep,name=optional_preconditions,json=optionalPreconditions,proto3" json:"optional_preconditions,omitempty"` // To be bounded by configuration
+ // optional_limit, if non-zero, specifies the limit on the number of relationships to be deleted.
+ // If there are more matching relationships found to be deleted than the limit specified here,
+ // the deletion call will fail with an error to prevent partial deletion. If partial deletion
+ // is needed, specify below that partial deletion is allowed. Partial deletions can be used
+ // in a loop to delete large amounts of relationships in a *non-transactional* manner.
+ OptionalLimit uint32 `protobuf:"varint,3,opt,name=optional_limit,json=optionalLimit,proto3" json:"optional_limit,omitempty"`
+ // optional_allow_partial_deletions, if true and a limit is specified, will delete matching found
+ // relationships up to the count specified in optional_limit, and no more.
+ OptionalAllowPartialDeletions bool `protobuf:"varint,4,opt,name=optional_allow_partial_deletions,json=optionalAllowPartialDeletions,proto3" json:"optional_allow_partial_deletions,omitempty"`
+ // optional_transaction_metadata is an optional field that can be used to store metadata about the transaction.
+ // If specified, this metadata will be supplied in the WatchResponse for the deletions associated with
+ // this transaction.
+ OptionalTransactionMetadata *structpb.Struct `protobuf:"bytes,5,opt,name=optional_transaction_metadata,json=optionalTransactionMetadata,proto3" json:"optional_transaction_metadata,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DeleteRelationshipsRequest) Reset() {
+ *x = DeleteRelationshipsRequest{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DeleteRelationshipsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteRelationshipsRequest) ProtoMessage() {}
+
+func (x *DeleteRelationshipsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[8]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeleteRelationshipsRequest.ProtoReflect.Descriptor instead.
+func (*DeleteRelationshipsRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *DeleteRelationshipsRequest) GetRelationshipFilter() *RelationshipFilter {
+ if x != nil {
+ return x.RelationshipFilter
+ }
+ return nil
+}
+
+func (x *DeleteRelationshipsRequest) GetOptionalPreconditions() []*Precondition {
+ if x != nil {
+ return x.OptionalPreconditions
+ }
+ return nil
+}
+
+func (x *DeleteRelationshipsRequest) GetOptionalLimit() uint32 {
+ if x != nil {
+ return x.OptionalLimit
+ }
+ return 0
+}
+
+func (x *DeleteRelationshipsRequest) GetOptionalAllowPartialDeletions() bool {
+ if x != nil {
+ return x.OptionalAllowPartialDeletions
+ }
+ return false
+}
+
+func (x *DeleteRelationshipsRequest) GetOptionalTransactionMetadata() *structpb.Struct {
+ if x != nil {
+ return x.OptionalTransactionMetadata
+ }
+ return nil
+}
+
+type DeleteRelationshipsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // deleted_at is the revision at which the relationships were deleted.
+ DeletedAt *ZedToken `protobuf:"bytes,1,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"`
+ // deletion_progress is an enumeration of the possible outcomes that occurred when attempting to delete the specified relationships.
+ DeletionProgress DeleteRelationshipsResponse_DeletionProgress `protobuf:"varint,2,opt,name=deletion_progress,json=deletionProgress,proto3,enum=authzed.api.v1.DeleteRelationshipsResponse_DeletionProgress" json:"deletion_progress,omitempty"`
+ // relationships_deleted_count is the number of relationships that were deleted.
+ RelationshipsDeletedCount uint64 `protobuf:"varint,3,opt,name=relationships_deleted_count,json=relationshipsDeletedCount,proto3" json:"relationships_deleted_count,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DeleteRelationshipsResponse) Reset() {
+ *x = DeleteRelationshipsResponse{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DeleteRelationshipsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteRelationshipsResponse) ProtoMessage() {}
+
+func (x *DeleteRelationshipsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[9]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeleteRelationshipsResponse.ProtoReflect.Descriptor instead.
+func (*DeleteRelationshipsResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *DeleteRelationshipsResponse) GetDeletedAt() *ZedToken {
+ if x != nil {
+ return x.DeletedAt
+ }
+ return nil
+}
+
+func (x *DeleteRelationshipsResponse) GetDeletionProgress() DeleteRelationshipsResponse_DeletionProgress {
+ if x != nil {
+ return x.DeletionProgress
+ }
+ return DeleteRelationshipsResponse_DELETION_PROGRESS_UNSPECIFIED
+}
+
+func (x *DeleteRelationshipsResponse) GetRelationshipsDeletedCount() uint64 {
+ if x != nil {
+ return x.RelationshipsDeletedCount
+ }
+ return 0
+}
+
+// CheckPermissionRequest issues a check on whether a subject has a permission
+// or is a member of a relation, on a specific resource.
+type CheckPermissionRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ // resource is the resource on which to check the permission or relation.
+ Resource *ObjectReference `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
+ // permission is the name of the permission (or relation) on which to execute
+ // the check.
+ Permission string `protobuf:"bytes,3,opt,name=permission,proto3" json:"permission,omitempty"`
+ // subject is the subject that will be checked for the permission or relation.
+ Subject *SubjectReference `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
+ // context consists of named values that are injected into the caveat evaluation context
+ Context *structpb.Struct `protobuf:"bytes,5,opt,name=context,proto3" json:"context,omitempty"`
+ // with_tracing, if true, indicates that the response should include a debug trace.
+ // This can be useful for debugging and performance analysis, but adds a small amount
+ // of compute overhead to the request.
+ WithTracing bool `protobuf:"varint,6,opt,name=with_tracing,json=withTracing,proto3" json:"with_tracing,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *CheckPermissionRequest) Reset() {
+ *x = CheckPermissionRequest{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *CheckPermissionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CheckPermissionRequest) ProtoMessage() {}
+
+func (x *CheckPermissionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[10]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CheckPermissionRequest.ProtoReflect.Descriptor instead.
+func (*CheckPermissionRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *CheckPermissionRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+func (x *CheckPermissionRequest) GetResource() *ObjectReference {
+ if x != nil {
+ return x.Resource
+ }
+ return nil
+}
+
+func (x *CheckPermissionRequest) GetPermission() string {
+ if x != nil {
+ return x.Permission
+ }
+ return ""
+}
+
+func (x *CheckPermissionRequest) GetSubject() *SubjectReference {
+ if x != nil {
+ return x.Subject
+ }
+ return nil
+}
+
+func (x *CheckPermissionRequest) GetContext() *structpb.Struct {
+ if x != nil {
+ return x.Context
+ }
+ return nil
+}
+
+func (x *CheckPermissionRequest) GetWithTracing() bool {
+ if x != nil {
+ return x.WithTracing
+ }
+ return false
+}
+
+type CheckPermissionResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ CheckedAt *ZedToken `protobuf:"bytes,1,opt,name=checked_at,json=checkedAt,proto3" json:"checked_at,omitempty"`
+ // Permissionship communicates whether or not the subject has the requested
+ // permission or has a relationship with the given resource, over the given
+ // relation.
+ //
+ // This value will be authzed.api.v1.PERMISSIONSHIP_HAS_PERMISSION if the
+ // requested subject is a member of the computed permission set or there
+ // exists a relationship with the requested relation from the given resource
+ // to the given subject.
+ Permissionship CheckPermissionResponse_Permissionship `protobuf:"varint,2,opt,name=permissionship,proto3,enum=authzed.api.v1.CheckPermissionResponse_Permissionship" json:"permissionship,omitempty"`
+ // partial_caveat_info holds information of a partially-evaluated caveated response
+ PartialCaveatInfo *PartialCaveatInfo `protobuf:"bytes,3,opt,name=partial_caveat_info,json=partialCaveatInfo,proto3" json:"partial_caveat_info,omitempty"`
+ // debug_trace is the debugging trace of this check, if requested.
+ DebugTrace *DebugInformation `protobuf:"bytes,4,opt,name=debug_trace,json=debugTrace,proto3" json:"debug_trace,omitempty"`
+ // optional_expires_at is the time at which at least one of the relationships used to
+ // compute this result, expires (if any). This is *not* related to the caching window.
+ OptionalExpiresAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=optional_expires_at,json=optionalExpiresAt,proto3" json:"optional_expires_at,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *CheckPermissionResponse) Reset() {
+ *x = CheckPermissionResponse{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *CheckPermissionResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CheckPermissionResponse) ProtoMessage() {}
+
+func (x *CheckPermissionResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[11]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CheckPermissionResponse.ProtoReflect.Descriptor instead.
+func (*CheckPermissionResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *CheckPermissionResponse) GetCheckedAt() *ZedToken {
+ if x != nil {
+ return x.CheckedAt
+ }
+ return nil
+}
+
+func (x *CheckPermissionResponse) GetPermissionship() CheckPermissionResponse_Permissionship {
+ if x != nil {
+ return x.Permissionship
+ }
+ return CheckPermissionResponse_PERMISSIONSHIP_UNSPECIFIED
+}
+
+func (x *CheckPermissionResponse) GetPartialCaveatInfo() *PartialCaveatInfo {
+ if x != nil {
+ return x.PartialCaveatInfo
+ }
+ return nil
+}
+
+func (x *CheckPermissionResponse) GetDebugTrace() *DebugInformation {
+ if x != nil {
+ return x.DebugTrace
+ }
+ return nil
+}
+
+func (x *CheckPermissionResponse) GetOptionalExpiresAt() *timestamppb.Timestamp {
+ if x != nil {
+ return x.OptionalExpiresAt
+ }
+ return nil
+}
+
+// CheckBulkPermissionsRequest issues a check on whether a subject has permission
+// or is a member of a relation on a specific resource for each item in the list.
+//
+// The ordering of the items in the response is maintained in the response.
+// Checks with the same subject/permission will automatically be batched for performance optimization.
+type CheckBulkPermissionsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ Items []*CheckBulkPermissionsRequestItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
+ // with_tracing, if true, indicates that each response should include a debug trace.
+ // This can be useful for debugging and performance analysis, but adds a small amount
+ // of compute overhead to the request.
+ WithTracing bool `protobuf:"varint,3,opt,name=with_tracing,json=withTracing,proto3" json:"with_tracing,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *CheckBulkPermissionsRequest) Reset() {
+ *x = CheckBulkPermissionsRequest{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *CheckBulkPermissionsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CheckBulkPermissionsRequest) ProtoMessage() {}
+
+func (x *CheckBulkPermissionsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[12]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CheckBulkPermissionsRequest.ProtoReflect.Descriptor instead.
+func (*CheckBulkPermissionsRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *CheckBulkPermissionsRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+func (x *CheckBulkPermissionsRequest) GetItems() []*CheckBulkPermissionsRequestItem {
+ if x != nil {
+ return x.Items
+ }
+ return nil
+}
+
+func (x *CheckBulkPermissionsRequest) GetWithTracing() bool {
+ if x != nil {
+ return x.WithTracing
+ }
+ return false
+}
+
+type CheckBulkPermissionsRequestItem struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Resource *ObjectReference `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
+ Permission string `protobuf:"bytes,2,opt,name=permission,proto3" json:"permission,omitempty"`
+ Subject *SubjectReference `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
+ Context *structpb.Struct `protobuf:"bytes,4,opt,name=context,proto3" json:"context,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *CheckBulkPermissionsRequestItem) Reset() {
+ *x = CheckBulkPermissionsRequestItem{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *CheckBulkPermissionsRequestItem) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CheckBulkPermissionsRequestItem) ProtoMessage() {}
+
+func (x *CheckBulkPermissionsRequestItem) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[13]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CheckBulkPermissionsRequestItem.ProtoReflect.Descriptor instead.
+func (*CheckBulkPermissionsRequestItem) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *CheckBulkPermissionsRequestItem) GetResource() *ObjectReference {
+ if x != nil {
+ return x.Resource
+ }
+ return nil
+}
+
+func (x *CheckBulkPermissionsRequestItem) GetPermission() string {
+ if x != nil {
+ return x.Permission
+ }
+ return ""
+}
+
+func (x *CheckBulkPermissionsRequestItem) GetSubject() *SubjectReference {
+ if x != nil {
+ return x.Subject
+ }
+ return nil
+}
+
+func (x *CheckBulkPermissionsRequestItem) GetContext() *structpb.Struct {
+ if x != nil {
+ return x.Context
+ }
+ return nil
+}
+
+type CheckBulkPermissionsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ CheckedAt *ZedToken `protobuf:"bytes,1,opt,name=checked_at,json=checkedAt,proto3" json:"checked_at,omitempty"`
+ Pairs []*CheckBulkPermissionsPair `protobuf:"bytes,2,rep,name=pairs,proto3" json:"pairs,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *CheckBulkPermissionsResponse) Reset() {
+ *x = CheckBulkPermissionsResponse{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *CheckBulkPermissionsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CheckBulkPermissionsResponse) ProtoMessage() {}
+
+func (x *CheckBulkPermissionsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[14]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CheckBulkPermissionsResponse.ProtoReflect.Descriptor instead.
+func (*CheckBulkPermissionsResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *CheckBulkPermissionsResponse) GetCheckedAt() *ZedToken {
+ if x != nil {
+ return x.CheckedAt
+ }
+ return nil
+}
+
+func (x *CheckBulkPermissionsResponse) GetPairs() []*CheckBulkPermissionsPair {
+ if x != nil {
+ return x.Pairs
+ }
+ return nil
+}
+
+type CheckBulkPermissionsPair struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Request *CheckBulkPermissionsRequestItem `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
+ // Types that are valid to be assigned to Response:
+ //
+ // *CheckBulkPermissionsPair_Item
+ // *CheckBulkPermissionsPair_Error
+ Response isCheckBulkPermissionsPair_Response `protobuf_oneof:"response"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *CheckBulkPermissionsPair) Reset() {
+ *x = CheckBulkPermissionsPair{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *CheckBulkPermissionsPair) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CheckBulkPermissionsPair) ProtoMessage() {}
+
+func (x *CheckBulkPermissionsPair) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[15]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CheckBulkPermissionsPair.ProtoReflect.Descriptor instead.
+func (*CheckBulkPermissionsPair) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *CheckBulkPermissionsPair) GetRequest() *CheckBulkPermissionsRequestItem {
+ if x != nil {
+ return x.Request
+ }
+ return nil
+}
+
+func (x *CheckBulkPermissionsPair) GetResponse() isCheckBulkPermissionsPair_Response {
+ if x != nil {
+ return x.Response
+ }
+ return nil
+}
+
+func (x *CheckBulkPermissionsPair) GetItem() *CheckBulkPermissionsResponseItem {
+ if x != nil {
+ if x, ok := x.Response.(*CheckBulkPermissionsPair_Item); ok {
+ return x.Item
+ }
+ }
+ return nil
+}
+
+func (x *CheckBulkPermissionsPair) GetError() *status.Status {
+ if x != nil {
+ if x, ok := x.Response.(*CheckBulkPermissionsPair_Error); ok {
+ return x.Error
+ }
+ }
+ return nil
+}
+
+type isCheckBulkPermissionsPair_Response interface {
+ isCheckBulkPermissionsPair_Response()
+}
+
+type CheckBulkPermissionsPair_Item struct {
+ Item *CheckBulkPermissionsResponseItem `protobuf:"bytes,2,opt,name=item,proto3,oneof"`
+}
+
+type CheckBulkPermissionsPair_Error struct {
+ Error *status.Status `protobuf:"bytes,3,opt,name=error,proto3,oneof"`
+}
+
+func (*CheckBulkPermissionsPair_Item) isCheckBulkPermissionsPair_Response() {}
+
+func (*CheckBulkPermissionsPair_Error) isCheckBulkPermissionsPair_Response() {}
+
+type CheckBulkPermissionsResponseItem struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Permissionship CheckPermissionResponse_Permissionship `protobuf:"varint,1,opt,name=permissionship,proto3,enum=authzed.api.v1.CheckPermissionResponse_Permissionship" json:"permissionship,omitempty"`
+ PartialCaveatInfo *PartialCaveatInfo `protobuf:"bytes,2,opt,name=partial_caveat_info,json=partialCaveatInfo,proto3" json:"partial_caveat_info,omitempty"`
+ // debug_trace is the debugging trace of this check, if requested.
+ DebugTrace *DebugInformation `protobuf:"bytes,3,opt,name=debug_trace,json=debugTrace,proto3" json:"debug_trace,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *CheckBulkPermissionsResponseItem) Reset() {
+ *x = CheckBulkPermissionsResponseItem{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *CheckBulkPermissionsResponseItem) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CheckBulkPermissionsResponseItem) ProtoMessage() {}
+
+func (x *CheckBulkPermissionsResponseItem) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[16]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CheckBulkPermissionsResponseItem.ProtoReflect.Descriptor instead.
+func (*CheckBulkPermissionsResponseItem) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *CheckBulkPermissionsResponseItem) GetPermissionship() CheckPermissionResponse_Permissionship {
+ if x != nil {
+ return x.Permissionship
+ }
+ return CheckPermissionResponse_PERMISSIONSHIP_UNSPECIFIED
+}
+
+func (x *CheckBulkPermissionsResponseItem) GetPartialCaveatInfo() *PartialCaveatInfo {
+ if x != nil {
+ return x.PartialCaveatInfo
+ }
+ return nil
+}
+
+func (x *CheckBulkPermissionsResponseItem) GetDebugTrace() *DebugInformation {
+ if x != nil {
+ return x.DebugTrace
+ }
+ return nil
+}
+
+// ExpandPermissionTreeRequest returns a tree representing the expansion of all
+// relationships found accessible from a permission or relation on a particular
+// resource.
+//
+// ExpandPermissionTreeRequest is typically used to determine the full set of
+// subjects with a permission, along with the relationships that grant said
+// access.
+type ExpandPermissionTreeRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ // resource is the resource over which to run the expansion.
+ Resource *ObjectReference `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
+ // permission is the name of the permission or relation over which to run the
+ // expansion for the resource.
+ Permission string `protobuf:"bytes,3,opt,name=permission,proto3" json:"permission,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExpandPermissionTreeRequest) Reset() {
+ *x = ExpandPermissionTreeRequest{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExpandPermissionTreeRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExpandPermissionTreeRequest) ProtoMessage() {}
+
+func (x *ExpandPermissionTreeRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[17]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExpandPermissionTreeRequest.ProtoReflect.Descriptor instead.
+func (*ExpandPermissionTreeRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *ExpandPermissionTreeRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+func (x *ExpandPermissionTreeRequest) GetResource() *ObjectReference {
+ if x != nil {
+ return x.Resource
+ }
+ return nil
+}
+
+func (x *ExpandPermissionTreeRequest) GetPermission() string {
+ if x != nil {
+ return x.Permission
+ }
+ return ""
+}
+
+type ExpandPermissionTreeResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ ExpandedAt *ZedToken `protobuf:"bytes,1,opt,name=expanded_at,json=expandedAt,proto3" json:"expanded_at,omitempty"`
+ // tree_root is a tree structure whose leaf nodes are subjects, and
+ // intermediate nodes represent the various operations (union, intersection,
+ // exclusion) to reach those subjects.
+ TreeRoot *PermissionRelationshipTree `protobuf:"bytes,2,opt,name=tree_root,json=treeRoot,proto3" json:"tree_root,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExpandPermissionTreeResponse) Reset() {
+ *x = ExpandPermissionTreeResponse{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExpandPermissionTreeResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExpandPermissionTreeResponse) ProtoMessage() {}
+
+func (x *ExpandPermissionTreeResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[18]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExpandPermissionTreeResponse.ProtoReflect.Descriptor instead.
+func (*ExpandPermissionTreeResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *ExpandPermissionTreeResponse) GetExpandedAt() *ZedToken {
+ if x != nil {
+ return x.ExpandedAt
+ }
+ return nil
+}
+
+func (x *ExpandPermissionTreeResponse) GetTreeRoot() *PermissionRelationshipTree {
+ if x != nil {
+ return x.TreeRoot
+ }
+ return nil
+}
+
+// LookupResourcesRequest performs a lookup of all resources of a particular
+// kind on which the subject has the specified permission or the relation in
+// which the subject exists, streaming back the IDs of those resources.
+type LookupResourcesRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ // resource_object_type is the type of resource object for which the IDs will
+ // be returned.
+ ResourceObjectType string `protobuf:"bytes,2,opt,name=resource_object_type,json=resourceObjectType,proto3" json:"resource_object_type,omitempty"`
+ // permission is the name of the permission or relation for which the subject
+ // must Check.
+ Permission string `protobuf:"bytes,3,opt,name=permission,proto3" json:"permission,omitempty"`
+ // subject is the subject with access to the resources.
+ Subject *SubjectReference `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"`
+ // context consists of named values that are injected into the caveat evaluation context
+ Context *structpb.Struct `protobuf:"bytes,5,opt,name=context,proto3" json:"context,omitempty"`
+ // optional_limit, if non-zero, specifies the limit on the number of resources to return
+ // before the stream is closed on the server side. By default, the stream will continue
+ // resolving resources until exhausted or the stream is closed due to the client or a
+ // network issue.
+ OptionalLimit uint32 `protobuf:"varint,6,opt,name=optional_limit,json=optionalLimit,proto3" json:"optional_limit,omitempty"`
+ // optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+ // The cursor can be found on the LookupResourcesResponse object.
+ OptionalCursor *Cursor `protobuf:"bytes,7,opt,name=optional_cursor,json=optionalCursor,proto3" json:"optional_cursor,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *LookupResourcesRequest) Reset() {
+ *x = LookupResourcesRequest{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *LookupResourcesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LookupResourcesRequest) ProtoMessage() {}
+
+func (x *LookupResourcesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[19]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LookupResourcesRequest.ProtoReflect.Descriptor instead.
+func (*LookupResourcesRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *LookupResourcesRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+func (x *LookupResourcesRequest) GetResourceObjectType() string {
+ if x != nil {
+ return x.ResourceObjectType
+ }
+ return ""
+}
+
+func (x *LookupResourcesRequest) GetPermission() string {
+ if x != nil {
+ return x.Permission
+ }
+ return ""
+}
+
+func (x *LookupResourcesRequest) GetSubject() *SubjectReference {
+ if x != nil {
+ return x.Subject
+ }
+ return nil
+}
+
+func (x *LookupResourcesRequest) GetContext() *structpb.Struct {
+ if x != nil {
+ return x.Context
+ }
+ return nil
+}
+
+func (x *LookupResourcesRequest) GetOptionalLimit() uint32 {
+ if x != nil {
+ return x.OptionalLimit
+ }
+ return 0
+}
+
+func (x *LookupResourcesRequest) GetOptionalCursor() *Cursor {
+ if x != nil {
+ return x.OptionalCursor
+ }
+ return nil
+}
+
+// LookupResourcesResponse contains a single matching resource object ID for the
+// requested object type, permission, and subject.
+type LookupResourcesResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // looked_up_at is the ZedToken at which the resource was found.
+ LookedUpAt *ZedToken `protobuf:"bytes,1,opt,name=looked_up_at,json=lookedUpAt,proto3" json:"looked_up_at,omitempty"`
+ // resource_object_id is the object ID of the found resource.
+ ResourceObjectId string `protobuf:"bytes,2,opt,name=resource_object_id,json=resourceObjectId,proto3" json:"resource_object_id,omitempty"`
+ // permissionship indicates whether the response was partially evaluated or not
+ Permissionship LookupPermissionship `protobuf:"varint,3,opt,name=permissionship,proto3,enum=authzed.api.v1.LookupPermissionship" json:"permissionship,omitempty"`
+ // partial_caveat_info holds information of a partially-evaluated caveated response
+ PartialCaveatInfo *PartialCaveatInfo `protobuf:"bytes,4,opt,name=partial_caveat_info,json=partialCaveatInfo,proto3" json:"partial_caveat_info,omitempty"`
+ // after_result_cursor holds a cursor that can be used to resume the LookupResources stream after this
+ // result.
+ AfterResultCursor *Cursor `protobuf:"bytes,5,opt,name=after_result_cursor,json=afterResultCursor,proto3" json:"after_result_cursor,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *LookupResourcesResponse) Reset() {
+ *x = LookupResourcesResponse{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *LookupResourcesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LookupResourcesResponse) ProtoMessage() {}
+
+func (x *LookupResourcesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[20]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LookupResourcesResponse.ProtoReflect.Descriptor instead.
+func (*LookupResourcesResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *LookupResourcesResponse) GetLookedUpAt() *ZedToken {
+ if x != nil {
+ return x.LookedUpAt
+ }
+ return nil
+}
+
+func (x *LookupResourcesResponse) GetResourceObjectId() string {
+ if x != nil {
+ return x.ResourceObjectId
+ }
+ return ""
+}
+
+func (x *LookupResourcesResponse) GetPermissionship() LookupPermissionship {
+ if x != nil {
+ return x.Permissionship
+ }
+ return LookupPermissionship_LOOKUP_PERMISSIONSHIP_UNSPECIFIED
+}
+
+func (x *LookupResourcesResponse) GetPartialCaveatInfo() *PartialCaveatInfo {
+ if x != nil {
+ return x.PartialCaveatInfo
+ }
+ return nil
+}
+
+func (x *LookupResourcesResponse) GetAfterResultCursor() *Cursor {
+ if x != nil {
+ return x.AfterResultCursor
+ }
+ return nil
+}
+
+// LookupSubjectsRequest performs a lookup of all subjects of a particular
+// kind for which the subject has the specified permission or the relation in
+// which the subject exists, streaming back the IDs of those subjects.
+type LookupSubjectsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ // resource is the resource for which all matching subjects for the permission
+ // or relation will be returned.
+ Resource *ObjectReference `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
+ // permission is the name of the permission (or relation) for which to find
+ // the subjects.
+ Permission string `protobuf:"bytes,3,opt,name=permission,proto3" json:"permission,omitempty"`
+ // subject_object_type is the type of subject object for which the IDs will
+ // be returned.
+ SubjectObjectType string `protobuf:"bytes,4,opt,name=subject_object_type,json=subjectObjectType,proto3" json:"subject_object_type,omitempty"`
+ // optional_subject_relation is the optional relation for the subject.
+ OptionalSubjectRelation string `protobuf:"bytes,5,opt,name=optional_subject_relation,json=optionalSubjectRelation,proto3" json:"optional_subject_relation,omitempty"`
+ // context consists of named values that are injected into the caveat evaluation context
+ Context *structpb.Struct `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"`
+ // optional_concrete_limit, if non-zero, specifies the limit on the number of
+ // *concrete* (non-wildcard) subjects to return before the stream is closed on the
+ // server side. With the default value of zero, the stream will continue resolving
+ // concrete subjects until exhausted or the stream is closed due to the client or
+ // a network issue.
+ //
+ // NOTE: Wildcard subjects ("*") have special treatment when cursors and limits are used. Because
+ // wildcards can apply to *any* concrete subjects, if a wildcard subject is found within the dataset,
+ // a wildcard subject can be returned for *all* LookupSubjects calls, regardless of the cursor or
+ // limit.
+ //
+ // For example, if wildcards are requested, a wildcard subject exists, there is a specified limit
+ // of 10 concrete subjects, and at least 10 concrete subjects exist, the API will return 11 subjects
+ // in total: the 10 concrete + the wildcard
+ //
+ // Furthermore, if a wildcard has a set of exclusions generated by the dataset,
+ // the exclusions *will respect the cursor* and only a *partial* set of exclusions will be returned
+ // for each invocation of the API.
+ //
+ // ***IT IS UP TO THE CALLER IN THIS CASE TO COMBINE THE EXCLUSIONS IF DESIRED***
+ OptionalConcreteLimit uint32 `protobuf:"varint,7,opt,name=optional_concrete_limit,json=optionalConcreteLimit,proto3" json:"optional_concrete_limit,omitempty"`
+ // optional_cursor, if specified, indicates the cursor after which results should resume being returned.
+ // The cursor can be found on the LookupSubjectsResponse object.
+ //
+ // NOTE: See above for notes about how cursors interact with wildcard subjects.
+ OptionalCursor *Cursor `protobuf:"bytes,8,opt,name=optional_cursor,json=optionalCursor,proto3" json:"optional_cursor,omitempty"`
+ // wildcard_option specifies whether wildcards should be returned by LookupSubjects.
+ // For backwards compatibility, defaults to WILDCARD_OPTION_INCLUDE_WILDCARDS if unspecified.
+ WildcardOption LookupSubjectsRequest_WildcardOption `protobuf:"varint,9,opt,name=wildcard_option,json=wildcardOption,proto3,enum=authzed.api.v1.LookupSubjectsRequest_WildcardOption" json:"wildcard_option,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *LookupSubjectsRequest) Reset() {
+ *x = LookupSubjectsRequest{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *LookupSubjectsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LookupSubjectsRequest) ProtoMessage() {}
+
+func (x *LookupSubjectsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[21]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LookupSubjectsRequest.ProtoReflect.Descriptor instead.
+func (*LookupSubjectsRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *LookupSubjectsRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+func (x *LookupSubjectsRequest) GetResource() *ObjectReference {
+ if x != nil {
+ return x.Resource
+ }
+ return nil
+}
+
+func (x *LookupSubjectsRequest) GetPermission() string {
+ if x != nil {
+ return x.Permission
+ }
+ return ""
+}
+
+func (x *LookupSubjectsRequest) GetSubjectObjectType() string {
+ if x != nil {
+ return x.SubjectObjectType
+ }
+ return ""
+}
+
+func (x *LookupSubjectsRequest) GetOptionalSubjectRelation() string {
+ if x != nil {
+ return x.OptionalSubjectRelation
+ }
+ return ""
+}
+
+func (x *LookupSubjectsRequest) GetContext() *structpb.Struct {
+ if x != nil {
+ return x.Context
+ }
+ return nil
+}
+
+func (x *LookupSubjectsRequest) GetOptionalConcreteLimit() uint32 {
+ if x != nil {
+ return x.OptionalConcreteLimit
+ }
+ return 0
+}
+
+func (x *LookupSubjectsRequest) GetOptionalCursor() *Cursor {
+ if x != nil {
+ return x.OptionalCursor
+ }
+ return nil
+}
+
+func (x *LookupSubjectsRequest) GetWildcardOption() LookupSubjectsRequest_WildcardOption {
+ if x != nil {
+ return x.WildcardOption
+ }
+ return LookupSubjectsRequest_WILDCARD_OPTION_UNSPECIFIED
+}
+
+// LookupSubjectsResponse contains a single matching subject object ID for the
+// requested subject object type on the permission or relation.
+type LookupSubjectsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ LookedUpAt *ZedToken `protobuf:"bytes,1,opt,name=looked_up_at,json=lookedUpAt,proto3" json:"looked_up_at,omitempty"`
+ // subject_object_id is the Object ID of the subject found. May be a `*` if
+ // a wildcard was found.
+ // deprecated: use `subject`
+ //
+ // Deprecated: Marked as deprecated in authzed/api/v1/permission_service.proto.
+ SubjectObjectId string `protobuf:"bytes,2,opt,name=subject_object_id,json=subjectObjectId,proto3" json:"subject_object_id,omitempty"`
+ // excluded_subject_ids are the Object IDs of the subjects excluded. This list
+ // will only contain object IDs if `subject_object_id` is a wildcard (`*`) and
+ // will only be populated if exclusions exist from the wildcard.
+ // deprecated: use `excluded_subjects`
+ //
+ // Deprecated: Marked as deprecated in authzed/api/v1/permission_service.proto.
+ ExcludedSubjectIds []string `protobuf:"bytes,3,rep,name=excluded_subject_ids,json=excludedSubjectIds,proto3" json:"excluded_subject_ids,omitempty"`
+ // permissionship indicates whether the response was partially evaluated or not
+ // deprecated: use `subject.permissionship`
+ //
+ // Deprecated: Marked as deprecated in authzed/api/v1/permission_service.proto.
+ Permissionship LookupPermissionship `protobuf:"varint,4,opt,name=permissionship,proto3,enum=authzed.api.v1.LookupPermissionship" json:"permissionship,omitempty"`
+ // partial_caveat_info holds information of a partially-evaluated caveated response
+ // deprecated: use `subject.partial_caveat_info`
+ //
+ // Deprecated: Marked as deprecated in authzed/api/v1/permission_service.proto.
+ PartialCaveatInfo *PartialCaveatInfo `protobuf:"bytes,5,opt,name=partial_caveat_info,json=partialCaveatInfo,proto3" json:"partial_caveat_info,omitempty"`
+ // subject is the subject found, along with its permissionship.
+ Subject *ResolvedSubject `protobuf:"bytes,6,opt,name=subject,proto3" json:"subject,omitempty"`
+ // excluded_subjects are the subjects excluded. This list
+ // will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and
+ // will only be populated if exclusions exist from the wildcard.
+ ExcludedSubjects []*ResolvedSubject `protobuf:"bytes,7,rep,name=excluded_subjects,json=excludedSubjects,proto3" json:"excluded_subjects,omitempty"`
+ // after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this
+ // result.
+ AfterResultCursor *Cursor `protobuf:"bytes,8,opt,name=after_result_cursor,json=afterResultCursor,proto3" json:"after_result_cursor,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *LookupSubjectsResponse) Reset() {
+ *x = LookupSubjectsResponse{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *LookupSubjectsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LookupSubjectsResponse) ProtoMessage() {}
+
+func (x *LookupSubjectsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[22]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LookupSubjectsResponse.ProtoReflect.Descriptor instead.
+func (*LookupSubjectsResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *LookupSubjectsResponse) GetLookedUpAt() *ZedToken {
+ if x != nil {
+ return x.LookedUpAt
+ }
+ return nil
+}
+
+// Deprecated: Marked as deprecated in authzed/api/v1/permission_service.proto.
+func (x *LookupSubjectsResponse) GetSubjectObjectId() string {
+ if x != nil {
+ return x.SubjectObjectId
+ }
+ return ""
+}
+
+// Deprecated: Marked as deprecated in authzed/api/v1/permission_service.proto.
+func (x *LookupSubjectsResponse) GetExcludedSubjectIds() []string {
+ if x != nil {
+ return x.ExcludedSubjectIds
+ }
+ return nil
+}
+
+// Deprecated: Marked as deprecated in authzed/api/v1/permission_service.proto.
+func (x *LookupSubjectsResponse) GetPermissionship() LookupPermissionship {
+ if x != nil {
+ return x.Permissionship
+ }
+ return LookupPermissionship_LOOKUP_PERMISSIONSHIP_UNSPECIFIED
+}
+
+// Deprecated: Marked as deprecated in authzed/api/v1/permission_service.proto.
+func (x *LookupSubjectsResponse) GetPartialCaveatInfo() *PartialCaveatInfo {
+ if x != nil {
+ return x.PartialCaveatInfo
+ }
+ return nil
+}
+
+func (x *LookupSubjectsResponse) GetSubject() *ResolvedSubject {
+ if x != nil {
+ return x.Subject
+ }
+ return nil
+}
+
+func (x *LookupSubjectsResponse) GetExcludedSubjects() []*ResolvedSubject {
+ if x != nil {
+ return x.ExcludedSubjects
+ }
+ return nil
+}
+
+func (x *LookupSubjectsResponse) GetAfterResultCursor() *Cursor {
+ if x != nil {
+ return x.AfterResultCursor
+ }
+ return nil
+}
+
+// ResolvedSubject is a single subject resolved within LookupSubjects.
+type ResolvedSubject struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // subject_object_id is the Object ID of the subject found. May be a `*` if
+ // a wildcard was found.
+ SubjectObjectId string `protobuf:"bytes,1,opt,name=subject_object_id,json=subjectObjectId,proto3" json:"subject_object_id,omitempty"`
+ // permissionship indicates whether the response was partially evaluated or not
+ Permissionship LookupPermissionship `protobuf:"varint,2,opt,name=permissionship,proto3,enum=authzed.api.v1.LookupPermissionship" json:"permissionship,omitempty"`
+ // partial_caveat_info holds information of a partially-evaluated caveated response
+ PartialCaveatInfo *PartialCaveatInfo `protobuf:"bytes,3,opt,name=partial_caveat_info,json=partialCaveatInfo,proto3" json:"partial_caveat_info,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ResolvedSubject) Reset() {
+ *x = ResolvedSubject{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ResolvedSubject) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ResolvedSubject) ProtoMessage() {}
+
+func (x *ResolvedSubject) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[23]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ResolvedSubject.ProtoReflect.Descriptor instead.
+func (*ResolvedSubject) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *ResolvedSubject) GetSubjectObjectId() string {
+ if x != nil {
+ return x.SubjectObjectId
+ }
+ return ""
+}
+
+func (x *ResolvedSubject) GetPermissionship() LookupPermissionship {
+ if x != nil {
+ return x.Permissionship
+ }
+ return LookupPermissionship_LOOKUP_PERMISSIONSHIP_UNSPECIFIED
+}
+
+func (x *ResolvedSubject) GetPartialCaveatInfo() *PartialCaveatInfo {
+ if x != nil {
+ return x.PartialCaveatInfo
+ }
+ return nil
+}
+
+// ImportBulkRelationshipsRequest represents one batch of the streaming
+// ImportBulkRelationships API. The maximum size is only limited by the backing
+// datastore, and optimal size should be determined by the calling client
+// experimentally. When ImportBulk is invoked and receives its first request message,
+// a transaction is opened to import the relationships. All requests sent to the same
+// invocation are executed under this single transaction. If a relationship already
+// exists within the datastore, the entire transaction will fail with an error.
+type ImportBulkRelationshipsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Relationships []*Relationship `protobuf:"bytes,1,rep,name=relationships,proto3" json:"relationships,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ImportBulkRelationshipsRequest) Reset() {
+ *x = ImportBulkRelationshipsRequest{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ImportBulkRelationshipsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ImportBulkRelationshipsRequest) ProtoMessage() {}
+
+func (x *ImportBulkRelationshipsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[24]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ImportBulkRelationshipsRequest.ProtoReflect.Descriptor instead.
+func (*ImportBulkRelationshipsRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *ImportBulkRelationshipsRequest) GetRelationships() []*Relationship {
+ if x != nil {
+ return x.Relationships
+ }
+ return nil
+}
+
+// ImportBulkRelationshipsResponse is returned on successful completion of the
+// bulk load stream, and contains the total number of relationships loaded.
+type ImportBulkRelationshipsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ NumLoaded uint64 `protobuf:"varint,1,opt,name=num_loaded,json=numLoaded,proto3" json:"num_loaded,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ImportBulkRelationshipsResponse) Reset() {
+ *x = ImportBulkRelationshipsResponse{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ImportBulkRelationshipsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ImportBulkRelationshipsResponse) ProtoMessage() {}
+
+func (x *ImportBulkRelationshipsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[25]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ImportBulkRelationshipsResponse.ProtoReflect.Descriptor instead.
+func (*ImportBulkRelationshipsResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{25}
+}
+
+func (x *ImportBulkRelationshipsResponse) GetNumLoaded() uint64 {
+ if x != nil {
+ return x.NumLoaded
+ }
+ return 0
+}
+
+// ExportBulkRelationshipsRequest represents a resumable request for
+// all relationships from the server.
+type ExportBulkRelationshipsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ // optional_limit, if non-zero, specifies the limit on the number of
+ // relationships the server can return in one page. By default, the server
+ // will pick a page size, and the server is free to choose a smaller size
+ // at will.
+ OptionalLimit uint32 `protobuf:"varint,2,opt,name=optional_limit,json=optionalLimit,proto3" json:"optional_limit,omitempty"`
+ // optional_cursor, if specified, indicates the cursor after which results
+ // should resume being returned. The cursor can be found on the
+ // BulkExportRelationshipsResponse object.
+ OptionalCursor *Cursor `protobuf:"bytes,3,opt,name=optional_cursor,json=optionalCursor,proto3" json:"optional_cursor,omitempty"`
+ // optional_relationship_filter, if specified, indicates the
+ // filter to apply to each relationship to be exported.
+ OptionalRelationshipFilter *RelationshipFilter `protobuf:"bytes,4,opt,name=optional_relationship_filter,json=optionalRelationshipFilter,proto3" json:"optional_relationship_filter,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExportBulkRelationshipsRequest) Reset() {
+ *x = ExportBulkRelationshipsRequest{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExportBulkRelationshipsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExportBulkRelationshipsRequest) ProtoMessage() {}
+
+func (x *ExportBulkRelationshipsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[26]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExportBulkRelationshipsRequest.ProtoReflect.Descriptor instead.
+func (*ExportBulkRelationshipsRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{26}
+}
+
+func (x *ExportBulkRelationshipsRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+func (x *ExportBulkRelationshipsRequest) GetOptionalLimit() uint32 {
+ if x != nil {
+ return x.OptionalLimit
+ }
+ return 0
+}
+
+func (x *ExportBulkRelationshipsRequest) GetOptionalCursor() *Cursor {
+ if x != nil {
+ return x.OptionalCursor
+ }
+ return nil
+}
+
+func (x *ExportBulkRelationshipsRequest) GetOptionalRelationshipFilter() *RelationshipFilter {
+ if x != nil {
+ return x.OptionalRelationshipFilter
+ }
+ return nil
+}
+
+// ExportBulkRelationshipsResponse is one page in a stream of relationship
+// groups that meet the criteria specified by the originating request. The
+// server will continue to stream back relationship groups as quickly as it can
+// until all relationships have been transmitted back.
+type ExportBulkRelationshipsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ AfterResultCursor *Cursor `protobuf:"bytes,1,opt,name=after_result_cursor,json=afterResultCursor,proto3" json:"after_result_cursor,omitempty"`
+ Relationships []*Relationship `protobuf:"bytes,2,rep,name=relationships,proto3" json:"relationships,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ExportBulkRelationshipsResponse) Reset() {
+ *x = ExportBulkRelationshipsResponse{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ExportBulkRelationshipsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExportBulkRelationshipsResponse) ProtoMessage() {}
+
+func (x *ExportBulkRelationshipsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[27]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ExportBulkRelationshipsResponse.ProtoReflect.Descriptor instead.
+func (*ExportBulkRelationshipsResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{27}
+}
+
+func (x *ExportBulkRelationshipsResponse) GetAfterResultCursor() *Cursor {
+ if x != nil {
+ return x.AfterResultCursor
+ }
+ return nil
+}
+
+func (x *ExportBulkRelationshipsResponse) GetRelationships() []*Relationship {
+ if x != nil {
+ return x.Relationships
+ }
+ return nil
+}
+
+type SubjectFilter_RelationFilter struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Relation string `protobuf:"bytes,1,opt,name=relation,proto3" json:"relation,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *SubjectFilter_RelationFilter) Reset() {
+ *x = SubjectFilter_RelationFilter{}
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *SubjectFilter_RelationFilter) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SubjectFilter_RelationFilter) ProtoMessage() {}
+
+func (x *SubjectFilter_RelationFilter) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_permission_service_proto_msgTypes[28]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SubjectFilter_RelationFilter.ProtoReflect.Descriptor instead.
+func (*SubjectFilter_RelationFilter) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_permission_service_proto_rawDescGZIP(), []int{2, 0}
+}
+
+func (x *SubjectFilter_RelationFilter) GetRelation() string {
+ if x != nil {
+ return x.Relation
+ }
+ return ""
+}
+
+var File_authzed_api_v1_permission_service_proto protoreflect.FileDescriptor
+
+const file_authzed_api_v1_permission_service_proto_rawDesc = "" +
+ "\n" +
+ "'authzed/api/v1/permission_service.proto\x12\x0eauthzed.api.v1\x1a\x19authzed/api/v1/core.proto\x1a\x1aauthzed/api/v1/debug.proto\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x17validate/validate.proto\"\xaf\x02\n" +
+ "\vConsistency\x12;\n" +
+ "\x10minimize_latency\x18\x01 \x01(\bB\x0e\xfaB\x04j\x02\b\x01\xbaH\x04j\x02\b\x01H\x00R\x0fminimizeLatency\x12E\n" +
+ "\x11at_least_as_fresh\x18\x02 \x01(\v2\x18.authzed.api.v1.ZedTokenH\x00R\x0eatLeastAsFresh\x12F\n" +
+ "\x11at_exact_snapshot\x18\x03 \x01(\v2\x18.authzed.api.v1.ZedTokenH\x00R\x0fatExactSnapshot\x12;\n" +
+ "\x10fully_consistent\x18\x04 \x01(\bB\x0e\xfaB\x04j\x02\b\x01\xbaH\x04j\x02\b\x01H\x00R\x0ffullyConsistentB\x17\n" +
+ "\vrequirement\x12\b\xf8B\x01\xbaH\x02\b\x01\"\xb8\x05\n" +
+ "\x12RelationshipFilter\x12\xbc\x01\n" +
+ "\rresource_type\x18\x01 \x01(\tB\x96\x01\xfaBHrF(\x80\x012A^(([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9])?$\xbaHHrF(\x80\x012A^(([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9])?$R\fresourceType\x12|\n" +
+ "\x14optional_resource_id\x18\x02 \x01(\tBJ\xfaB\"r (\x80\b2\x1b^([a-zA-Z0-9/_|\\-=+]{1,})?$\xbaH\"r (\x80\b2\x1b^([a-zA-Z0-9/_|\\-=+]{1,})?$R\x12optionalResourceId\x12\x89\x01\n" +
+ "\x1boptional_resource_id_prefix\x18\x05 \x01(\tBJ\xfaB\"r (\x80\b2\x1b^([a-zA-Z0-9/_|\\-=+]{1,})?$\xbaH\"r (\x80\b2\x1b^([a-zA-Z0-9/_|\\-=+]{1,})?$R\x18optionalResourceIdPrefix\x12\x81\x01\n" +
+ "\x11optional_relation\x18\x03 \x01(\tBT\xfaB'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\xbaH'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x10optionalRelation\x12U\n" +
+ "\x17optional_subject_filter\x18\x04 \x01(\v2\x1d.authzed.api.v1.SubjectFilterR\x15optionalSubjectFilter\"\xad\x04\n" +
+ "\rSubjectFilter\x12\xb4\x01\n" +
+ "\fsubject_type\x18\x01 \x01(\tB\x90\x01\xfaBErC(\x80\x012>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\xbaHErC(\x80\x012>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\vsubjectType\x12\x84\x01\n" +
+ "\x13optional_subject_id\x18\x02 \x01(\tBT\xfaB'r%(\x80\b2 ^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)?$\xbaH'r%(\x80\b2 ^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)?$R\x11optionalSubjectId\x12Y\n" +
+ "\x11optional_relation\x18\x03 \x01(\v2,.authzed.api.v1.SubjectFilter.RelationFilterR\x10optionalRelation\x1a\x82\x01\n" +
+ "\x0eRelationFilter\x12p\n" +
+ "\brelation\x18\x01 \x01(\tBT\xfaB'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\xbaH'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\brelation\"\xb6\x02\n" +
+ "\x18ReadRelationshipsRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x12c\n" +
+ "\x13relationship_filter\x18\x02 \x01(\v2\".authzed.api.v1.RelationshipFilterB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\x12relationshipFilter\x125\n" +
+ "\x0eoptional_limit\x18\x03 \x01(\rB\x0e\xfaB\x04*\x02(\x00\xbaH\x04*\x02(\x00R\roptionalLimit\x12?\n" +
+ "\x0foptional_cursor\x18\x04 \x01(\v2\x16.authzed.api.v1.CursorR\x0eoptionalCursor\"\xf8\x01\n" +
+ "\x19ReadRelationshipsResponse\x12A\n" +
+ "\aread_at\x18\x01 \x01(\v2\x18.authzed.api.v1.ZedTokenB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\x06readAt\x12P\n" +
+ "\frelationship\x18\x02 \x01(\v2\x1c.authzed.api.v1.RelationshipB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\frelationship\x12F\n" +
+ "\x13after_result_cursor\x18\x03 \x01(\v2\x16.authzed.api.v1.CursorR\x11afterResultCursor\"\x96\x02\n" +
+ "\fPrecondition\x12Z\n" +
+ "\toperation\x18\x01 \x01(\x0e2&.authzed.api.v1.Precondition.OperationB\x14\xfaB\a\x82\x01\x04\x10\x01 \x00\xbaH\a\x82\x01\x04\x10\x01 \x00R\toperation\x12J\n" +
+ "\x06filter\x18\x02 \x01(\v2\".authzed.api.v1.RelationshipFilterB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\x06filter\"^\n" +
+ "\tOperation\x12\x19\n" +
+ "\x15OPERATION_UNSPECIFIED\x10\x00\x12\x1c\n" +
+ "\x18OPERATION_MUST_NOT_MATCH\x10\x01\x12\x18\n" +
+ "\x14OPERATION_MUST_MATCH\x10\x02\"\xcf\x02\n" +
+ "\x19WriteRelationshipsRequest\x12V\n" +
+ "\aupdates\x18\x01 \x03(\v2\".authzed.api.v1.RelationshipUpdateB\x18\xfaB\n" +
+ "\x92\x01\a\"\x05\x8a\x01\x02\x10\x01\xbaH\b\x92\x01\x05\"\x03\xc8\x01\x01R\aupdates\x12m\n" +
+ "\x16optional_preconditions\x18\x02 \x03(\v2\x1c.authzed.api.v1.PreconditionB\x18\xfaB\n" +
+ "\x92\x01\a\"\x05\x8a\x01\x02\x10\x01\xbaH\b\x92\x01\x05\"\x03\xc8\x01\x01R\x15optionalPreconditions\x12k\n" +
+ "\x1doptional_transaction_metadata\x18\x03 \x01(\v2\x17.google.protobuf.StructB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\x1boptionalTransactionMetadata\"U\n" +
+ "\x1aWriteRelationshipsResponse\x127\n" +
+ "\n" +
+ "written_at\x18\x01 \x01(\v2\x18.authzed.api.v1.ZedTokenR\twrittenAt\"\xdd\x03\n" +
+ "\x1aDeleteRelationshipsRequest\x12c\n" +
+ "\x13relationship_filter\x18\x01 \x01(\v2\".authzed.api.v1.RelationshipFilterB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\x12relationshipFilter\x12m\n" +
+ "\x16optional_preconditions\x18\x02 \x03(\v2\x1c.authzed.api.v1.PreconditionB\x18\xfaB\n" +
+ "\x92\x01\a\"\x05\x8a\x01\x02\x10\x01\xbaH\b\x92\x01\x05\"\x03\xc8\x01\x01R\x15optionalPreconditions\x125\n" +
+ "\x0eoptional_limit\x18\x03 \x01(\rB\x0e\xfaB\x04*\x02(\x00\xbaH\x04*\x02(\x00R\roptionalLimit\x12G\n" +
+ " optional_allow_partial_deletions\x18\x04 \x01(\bR\x1doptionalAllowPartialDeletions\x12k\n" +
+ "\x1doptional_transaction_metadata\x18\x05 \x01(\v2\x17.google.protobuf.StructB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\x1boptionalTransactionMetadata\"\xf7\x02\n" +
+ "\x1bDeleteRelationshipsResponse\x127\n" +
+ "\n" +
+ "deleted_at\x18\x01 \x01(\v2\x18.authzed.api.v1.ZedTokenR\tdeletedAt\x12i\n" +
+ "\x11deletion_progress\x18\x02 \x01(\x0e2<.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgressR\x10deletionProgress\x12>\n" +
+ "\x1brelationships_deleted_count\x18\x03 \x01(\x04R\x19relationshipsDeletedCount\"t\n" +
+ "\x10DeletionProgress\x12!\n" +
+ "\x1dDELETION_PROGRESS_UNSPECIFIED\x10\x00\x12\x1e\n" +
+ "\x1aDELETION_PROGRESS_COMPLETE\x10\x01\x12\x1d\n" +
+ "\x19DELETION_PROGRESS_PARTIAL\x10\x02\"\xcc\x03\n" +
+ "\x16CheckPermissionRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x12K\n" +
+ "\bresource\x18\x02 \x01(\v2\x1f.authzed.api.v1.ObjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\bresource\x12t\n" +
+ "\n" +
+ "permission\x18\x03 \x01(\tBT\xfaB'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\xbaH'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\n" +
+ "permission\x12J\n" +
+ "\asubject\x18\x04 \x01(\v2 .authzed.api.v1.SubjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\asubject\x12A\n" +
+ "\acontext\x18\x05 \x01(\v2\x17.google.protobuf.StructB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\acontext\x12!\n" +
+ "\fwith_tracing\x18\x06 \x01(\bR\vwithTracing\"\xed\x04\n" +
+ "\x17CheckPermissionResponse\x12G\n" +
+ "\n" +
+ "checked_at\x18\x01 \x01(\v2\x18.authzed.api.v1.ZedTokenB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\tcheckedAt\x12t\n" +
+ "\x0epermissionship\x18\x02 \x01(\x0e26.authzed.api.v1.CheckPermissionResponse.PermissionshipB\x14\xfaB\a\x82\x01\x04\x10\x01 \x00\xbaH\a\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12a\n" +
+ "\x13partial_caveat_info\x18\x03 \x01(\v2!.authzed.api.v1.PartialCaveatInfoB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\x11partialCaveatInfo\x12A\n" +
+ "\vdebug_trace\x18\x04 \x01(\v2 .authzed.api.v1.DebugInformationR\n" +
+ "debugTrace\x12J\n" +
+ "\x13optional_expires_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\x11optionalExpiresAt\"\xa0\x01\n" +
+ "\x0ePermissionship\x12\x1e\n" +
+ "\x1aPERMISSIONSHIP_UNSPECIFIED\x10\x00\x12 \n" +
+ "\x1cPERMISSIONSHIP_NO_PERMISSION\x10\x01\x12!\n" +
+ "\x1dPERMISSIONSHIP_HAS_PERMISSION\x10\x02\x12)\n" +
+ "%PERMISSIONSHIP_CONDITIONAL_PERMISSION\x10\x03\"\xe0\x01\n" +
+ "\x1bCheckBulkPermissionsRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x12_\n" +
+ "\x05items\x18\x02 \x03(\v2/.authzed.api.v1.CheckBulkPermissionsRequestItemB\x18\xfaB\n" +
+ "\x92\x01\a\"\x05\x8a\x01\x02\x10\x01\xbaH\b\x92\x01\x05\"\x03\xc8\x01\x01R\x05items\x12!\n" +
+ "\fwith_tracing\x18\x03 \x01(\bR\vwithTracing\"\xf3\x02\n" +
+ "\x1fCheckBulkPermissionsRequestItem\x12K\n" +
+ "\bresource\x18\x01 \x01(\v2\x1f.authzed.api.v1.ObjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\bresource\x12t\n" +
+ "\n" +
+ "permission\x18\x02 \x01(\tBT\xfaB'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\xbaH'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\n" +
+ "permission\x12J\n" +
+ "\asubject\x18\x03 \x01(\v2 .authzed.api.v1.SubjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\asubject\x12A\n" +
+ "\acontext\x18\x04 \x01(\v2\x17.google.protobuf.StructB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\acontext\"\xc1\x01\n" +
+ "\x1cCheckBulkPermissionsResponse\x12G\n" +
+ "\n" +
+ "checked_at\x18\x01 \x01(\v2\x18.authzed.api.v1.ZedTokenB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\tcheckedAt\x12X\n" +
+ "\x05pairs\x18\x02 \x03(\v2(.authzed.api.v1.CheckBulkPermissionsPairB\x18\xfaB\n" +
+ "\x92\x01\a\"\x05\x8a\x01\x02\x10\x01\xbaH\b\x92\x01\x05\"\x03\xc8\x01\x01R\x05pairs\"\xe5\x01\n" +
+ "\x18CheckBulkPermissionsPair\x12I\n" +
+ "\arequest\x18\x01 \x01(\v2/.authzed.api.v1.CheckBulkPermissionsRequestItemR\arequest\x12F\n" +
+ "\x04item\x18\x02 \x01(\v20.authzed.api.v1.CheckBulkPermissionsResponseItemH\x00R\x04item\x12*\n" +
+ "\x05error\x18\x03 \x01(\v2\x12.google.rpc.StatusH\x00R\x05errorB\n" +
+ "\n" +
+ "\bresponse\"\xbe\x02\n" +
+ " CheckBulkPermissionsResponseItem\x12t\n" +
+ "\x0epermissionship\x18\x01 \x01(\x0e26.authzed.api.v1.CheckPermissionResponse.PermissionshipB\x14\xfaB\a\x82\x01\x04\x10\x01 \x00\xbaH\a\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12a\n" +
+ "\x13partial_caveat_info\x18\x02 \x01(\v2!.authzed.api.v1.PartialCaveatInfoB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\x11partialCaveatInfo\x12A\n" +
+ "\vdebug_trace\x18\x03 \x01(\v2 .authzed.api.v1.DebugInformationR\n" +
+ "debugTrace\"\x9f\x02\n" +
+ "\x1bExpandPermissionTreeRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x12K\n" +
+ "\bresource\x18\x02 \x01(\v2\x1f.authzed.api.v1.ObjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\bresource\x12t\n" +
+ "\n" +
+ "permission\x18\x03 \x01(\tBT\xfaB'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\xbaH'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\n" +
+ "permission\"\xa2\x01\n" +
+ "\x1cExpandPermissionTreeResponse\x129\n" +
+ "\vexpanded_at\x18\x01 \x01(\v2\x18.authzed.api.v1.ZedTokenR\n" +
+ "expandedAt\x12G\n" +
+ "\ttree_root\x18\x02 \x01(\v2*.authzed.api.v1.PermissionRelationshipTreeR\btreeRoot\"\x94\x05\n" +
+ "\x16LookupResourcesRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x12\xc3\x01\n" +
+ "\x14resource_object_type\x18\x02 \x01(\tB\x90\x01\xfaBErC(\x80\x012>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\xbaHErC(\x80\x012>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x12resourceObjectType\x12n\n" +
+ "\n" +
+ "permission\x18\x03 \x01(\tBN\xfaB$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$\xbaH$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$R\n" +
+ "permission\x12J\n" +
+ "\asubject\x18\x04 \x01(\v2 .authzed.api.v1.SubjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\asubject\x12A\n" +
+ "\acontext\x18\x05 \x01(\v2\x17.google.protobuf.StructB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\acontext\x125\n" +
+ "\x0eoptional_limit\x18\x06 \x01(\rB\x0e\xfaB\x04*\x02(\x00\xbaH\x04*\x02(\x00R\roptionalLimit\x12?\n" +
+ "\x0foptional_cursor\x18\a \x01(\v2\x16.authzed.api.v1.CursorR\x0eoptionalCursor\"\x92\x03\n" +
+ "\x17LookupResourcesResponse\x12:\n" +
+ "\flooked_up_at\x18\x01 \x01(\v2\x18.authzed.api.v1.ZedTokenR\n" +
+ "lookedUpAt\x12,\n" +
+ "\x12resource_object_id\x18\x02 \x01(\tR\x10resourceObjectId\x12b\n" +
+ "\x0epermissionship\x18\x03 \x01(\x0e2$.authzed.api.v1.LookupPermissionshipB\x14\xfaB\a\x82\x01\x04\x10\x01 \x00\xbaH\a\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12a\n" +
+ "\x13partial_caveat_info\x18\x04 \x01(\v2!.authzed.api.v1.PartialCaveatInfoB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\x11partialCaveatInfo\x12F\n" +
+ "\x13after_result_cursor\x18\x05 \x01(\v2\x16.authzed.api.v1.CursorR\x11afterResultCursor\"\x9c\b\n" +
+ "\x15LookupSubjectsRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x12K\n" +
+ "\bresource\x18\x02 \x01(\v2\x1f.authzed.api.v1.ObjectReferenceB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\bresource\x12t\n" +
+ "\n" +
+ "permission\x18\x03 \x01(\tBT\xfaB'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\xbaH'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\n" +
+ "permission\x12\xc1\x01\n" +
+ "\x13subject_object_type\x18\x04 \x01(\tB\x90\x01\xfaBErC(\x80\x012>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\xbaHErC(\x80\x012>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x11subjectObjectType\x12\x90\x01\n" +
+ "\x19optional_subject_relation\x18\x05 \x01(\tBT\xfaB'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\xbaH'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x17optionalSubjectRelation\x12A\n" +
+ "\acontext\x18\x06 \x01(\v2\x17.google.protobuf.StructB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\acontext\x12F\n" +
+ "\x17optional_concrete_limit\x18\a \x01(\rB\x0e\xfaB\x04*\x02(\x00\xbaH\x04*\x02(\x00R\x15optionalConcreteLimit\x12?\n" +
+ "\x0foptional_cursor\x18\b \x01(\v2\x16.authzed.api.v1.CursorR\x0eoptionalCursor\x12]\n" +
+ "\x0fwildcard_option\x18\t \x01(\x0e24.authzed.api.v1.LookupSubjectsRequest.WildcardOptionR\x0ewildcardOption\"\x7f\n" +
+ "\x0eWildcardOption\x12\x1f\n" +
+ "\x1bWILDCARD_OPTION_UNSPECIFIED\x10\x00\x12%\n" +
+ "!WILDCARD_OPTION_INCLUDE_WILDCARDS\x10\x01\x12%\n" +
+ "!WILDCARD_OPTION_EXCLUDE_WILDCARDS\x10\x02\"\xd6\x04\n" +
+ "\x16LookupSubjectsResponse\x12:\n" +
+ "\flooked_up_at\x18\x01 \x01(\v2\x18.authzed.api.v1.ZedTokenR\n" +
+ "lookedUpAt\x12.\n" +
+ "\x11subject_object_id\x18\x02 \x01(\tB\x02\x18\x01R\x0fsubjectObjectId\x124\n" +
+ "\x14excluded_subject_ids\x18\x03 \x03(\tB\x02\x18\x01R\x12excludedSubjectIds\x12d\n" +
+ "\x0epermissionship\x18\x04 \x01(\x0e2$.authzed.api.v1.LookupPermissionshipB\x16\xfaB\a\x82\x01\x04\x10\x01 \x00\xbaH\a\x82\x01\x04\x10\x01 \x00\x18\x01R\x0epermissionship\x12c\n" +
+ "\x13partial_caveat_info\x18\x05 \x01(\v2!.authzed.api.v1.PartialCaveatInfoB\x10\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00\x18\x01R\x11partialCaveatInfo\x129\n" +
+ "\asubject\x18\x06 \x01(\v2\x1f.authzed.api.v1.ResolvedSubjectR\asubject\x12L\n" +
+ "\x11excluded_subjects\x18\a \x03(\v2\x1f.authzed.api.v1.ResolvedSubjectR\x10excludedSubjects\x12F\n" +
+ "\x13after_result_cursor\x18\b \x01(\v2\x16.authzed.api.v1.CursorR\x11afterResultCursor\"\x84\x02\n" +
+ "\x0fResolvedSubject\x12*\n" +
+ "\x11subject_object_id\x18\x01 \x01(\tR\x0fsubjectObjectId\x12b\n" +
+ "\x0epermissionship\x18\x02 \x01(\x0e2$.authzed.api.v1.LookupPermissionshipB\x14\xfaB\a\x82\x01\x04\x10\x01 \x00\xbaH\a\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12a\n" +
+ "\x13partial_caveat_info\x18\x03 \x01(\v2!.authzed.api.v1.PartialCaveatInfoB\x0e\xfaB\x05\x8a\x01\x02\x10\x00\xbaH\x03\xc8\x01\x00R\x11partialCaveatInfo\"~\n" +
+ "\x1eImportBulkRelationshipsRequest\x12\\\n" +
+ "\rrelationships\x18\x01 \x03(\v2\x1c.authzed.api.v1.RelationshipB\x18\xfaB\n" +
+ "\x92\x01\a\"\x05\x8a\x01\x02\x10\x01\xbaH\b\x92\x01\x05\"\x03\xc8\x01\x01R\rrelationships\"@\n" +
+ "\x1fImportBulkRelationshipsResponse\x12\x1d\n" +
+ "\n" +
+ "num_loaded\x18\x01 \x01(\x04R\tnumLoaded\"\xbd\x02\n" +
+ "\x1eExportBulkRelationshipsRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x125\n" +
+ "\x0eoptional_limit\x18\x02 \x01(\rB\x0e\xfaB\x04*\x02(\x00\xbaH\x04*\x02(\x00R\roptionalLimit\x12?\n" +
+ "\x0foptional_cursor\x18\x03 \x01(\v2\x16.authzed.api.v1.CursorR\x0eoptionalCursor\x12d\n" +
+ "\x1coptional_relationship_filter\x18\x04 \x01(\v2\".authzed.api.v1.RelationshipFilterR\x1aoptionalRelationshipFilter\"\xad\x01\n" +
+ "\x1fExportBulkRelationshipsResponse\x12F\n" +
+ "\x13after_result_cursor\x18\x01 \x01(\v2\x16.authzed.api.v1.CursorR\x11afterResultCursor\x12B\n" +
+ "\rrelationships\x18\x02 \x03(\v2\x1c.authzed.api.v1.RelationshipR\rrelationships*\x99\x01\n" +
+ "\x14LookupPermissionship\x12%\n" +
+ "!LOOKUP_PERMISSIONSHIP_UNSPECIFIED\x10\x00\x12(\n" +
+ "$LOOKUP_PERMISSIONSHIP_HAS_PERMISSION\x10\x01\x120\n" +
+ ",LOOKUP_PERMISSIONSHIP_CONDITIONAL_PERMISSION\x10\x022\xea\v\n" +
+ "\x12PermissionsService\x12\x8d\x01\n" +
+ "\x11ReadRelationships\x12(.authzed.api.v1.ReadRelationshipsRequest\x1a).authzed.api.v1.ReadRelationshipsResponse\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/v1/relationships/read0\x01\x12\x8f\x01\n" +
+ "\x12WriteRelationships\x12).authzed.api.v1.WriteRelationshipsRequest\x1a*.authzed.api.v1.WriteRelationshipsResponse\"\"\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/v1/relationships/write\x12\x93\x01\n" +
+ "\x13DeleteRelationships\x12*.authzed.api.v1.DeleteRelationshipsRequest\x1a+.authzed.api.v1.DeleteRelationshipsResponse\"#\x82\xd3\xe4\x93\x02\x1d:\x01*\"\x18/v1/relationships/delete\x12\x84\x01\n" +
+ "\x0fCheckPermission\x12&.authzed.api.v1.CheckPermissionRequest\x1a'.authzed.api.v1.CheckPermissionResponse\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/v1/permissions/check\x12\x97\x01\n" +
+ "\x14CheckBulkPermissions\x12+.authzed.api.v1.CheckBulkPermissionsRequest\x1a,.authzed.api.v1.CheckBulkPermissionsResponse\"$\x82\xd3\xe4\x93\x02\x1e:\x01*\"\x19/v1/permissions/checkbulk\x12\x94\x01\n" +
+ "\x14ExpandPermissionTree\x12+.authzed.api.v1.ExpandPermissionTreeRequest\x1a,.authzed.api.v1.ExpandPermissionTreeResponse\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/v1/permissions/expand\x12\x8a\x01\n" +
+ "\x0fLookupResources\x12&.authzed.api.v1.LookupResourcesRequest\x1a'.authzed.api.v1.LookupResourcesResponse\"$\x82\xd3\xe4\x93\x02\x1e:\x01*\"\x19/v1/permissions/resources0\x01\x12\x86\x01\n" +
+ "\x0eLookupSubjects\x12%.authzed.api.v1.LookupSubjectsRequest\x1a&.authzed.api.v1.LookupSubjectsResponse\"#\x82\xd3\xe4\x93\x02\x1d:\x01*\"\x18/v1/permissions/subjects0\x01\x12\xa5\x01\n" +
+ "\x17ImportBulkRelationships\x12..authzed.api.v1.ImportBulkRelationshipsRequest\x1a/.authzed.api.v1.ImportBulkRelationshipsResponse\"'\x82\xd3\xe4\x93\x02!:\x01*\"\x1c/v1/relationships/importbulk(\x01\x12\xa5\x01\n" +
+ "\x17ExportBulkRelationships\x12..authzed.api.v1.ExportBulkRelationshipsRequest\x1a/.authzed.api.v1.ExportBulkRelationshipsResponse\"'\x82\xd3\xe4\x93\x02!:\x01*\"\x1c/v1/relationships/exportbulk0\x01BJ\n" +
+ "\x12com.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
+
+var (
+ file_authzed_api_v1_permission_service_proto_rawDescOnce sync.Once
+ file_authzed_api_v1_permission_service_proto_rawDescData []byte
+)
+
+func file_authzed_api_v1_permission_service_proto_rawDescGZIP() []byte {
+ file_authzed_api_v1_permission_service_proto_rawDescOnce.Do(func() {
+ file_authzed_api_v1_permission_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authzed_api_v1_permission_service_proto_rawDesc), len(file_authzed_api_v1_permission_service_proto_rawDesc)))
+ })
+ return file_authzed_api_v1_permission_service_proto_rawDescData
+}
+
+var file_authzed_api_v1_permission_service_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
+var file_authzed_api_v1_permission_service_proto_msgTypes = make([]protoimpl.MessageInfo, 29)
+var file_authzed_api_v1_permission_service_proto_goTypes = []any{
+ (LookupPermissionship)(0), // 0: authzed.api.v1.LookupPermissionship
+ (Precondition_Operation)(0), // 1: authzed.api.v1.Precondition.Operation
+ (DeleteRelationshipsResponse_DeletionProgress)(0), // 2: authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress
+ (CheckPermissionResponse_Permissionship)(0), // 3: authzed.api.v1.CheckPermissionResponse.Permissionship
+ (LookupSubjectsRequest_WildcardOption)(0), // 4: authzed.api.v1.LookupSubjectsRequest.WildcardOption
+ (*Consistency)(nil), // 5: authzed.api.v1.Consistency
+ (*RelationshipFilter)(nil), // 6: authzed.api.v1.RelationshipFilter
+ (*SubjectFilter)(nil), // 7: authzed.api.v1.SubjectFilter
+ (*ReadRelationshipsRequest)(nil), // 8: authzed.api.v1.ReadRelationshipsRequest
+ (*ReadRelationshipsResponse)(nil), // 9: authzed.api.v1.ReadRelationshipsResponse
+ (*Precondition)(nil), // 10: authzed.api.v1.Precondition
+ (*WriteRelationshipsRequest)(nil), // 11: authzed.api.v1.WriteRelationshipsRequest
+ (*WriteRelationshipsResponse)(nil), // 12: authzed.api.v1.WriteRelationshipsResponse
+ (*DeleteRelationshipsRequest)(nil), // 13: authzed.api.v1.DeleteRelationshipsRequest
+ (*DeleteRelationshipsResponse)(nil), // 14: authzed.api.v1.DeleteRelationshipsResponse
+ (*CheckPermissionRequest)(nil), // 15: authzed.api.v1.CheckPermissionRequest
+ (*CheckPermissionResponse)(nil), // 16: authzed.api.v1.CheckPermissionResponse
+ (*CheckBulkPermissionsRequest)(nil), // 17: authzed.api.v1.CheckBulkPermissionsRequest
+ (*CheckBulkPermissionsRequestItem)(nil), // 18: authzed.api.v1.CheckBulkPermissionsRequestItem
+ (*CheckBulkPermissionsResponse)(nil), // 19: authzed.api.v1.CheckBulkPermissionsResponse
+ (*CheckBulkPermissionsPair)(nil), // 20: authzed.api.v1.CheckBulkPermissionsPair
+ (*CheckBulkPermissionsResponseItem)(nil), // 21: authzed.api.v1.CheckBulkPermissionsResponseItem
+ (*ExpandPermissionTreeRequest)(nil), // 22: authzed.api.v1.ExpandPermissionTreeRequest
+ (*ExpandPermissionTreeResponse)(nil), // 23: authzed.api.v1.ExpandPermissionTreeResponse
+ (*LookupResourcesRequest)(nil), // 24: authzed.api.v1.LookupResourcesRequest
+ (*LookupResourcesResponse)(nil), // 25: authzed.api.v1.LookupResourcesResponse
+ (*LookupSubjectsRequest)(nil), // 26: authzed.api.v1.LookupSubjectsRequest
+ (*LookupSubjectsResponse)(nil), // 27: authzed.api.v1.LookupSubjectsResponse
+ (*ResolvedSubject)(nil), // 28: authzed.api.v1.ResolvedSubject
+ (*ImportBulkRelationshipsRequest)(nil), // 29: authzed.api.v1.ImportBulkRelationshipsRequest
+ (*ImportBulkRelationshipsResponse)(nil), // 30: authzed.api.v1.ImportBulkRelationshipsResponse
+ (*ExportBulkRelationshipsRequest)(nil), // 31: authzed.api.v1.ExportBulkRelationshipsRequest
+ (*ExportBulkRelationshipsResponse)(nil), // 32: authzed.api.v1.ExportBulkRelationshipsResponse
+ (*SubjectFilter_RelationFilter)(nil), // 33: authzed.api.v1.SubjectFilter.RelationFilter
+ (*ZedToken)(nil), // 34: authzed.api.v1.ZedToken
+ (*Cursor)(nil), // 35: authzed.api.v1.Cursor
+ (*Relationship)(nil), // 36: authzed.api.v1.Relationship
+ (*RelationshipUpdate)(nil), // 37: authzed.api.v1.RelationshipUpdate
+ (*structpb.Struct)(nil), // 38: google.protobuf.Struct
+ (*ObjectReference)(nil), // 39: authzed.api.v1.ObjectReference
+ (*SubjectReference)(nil), // 40: authzed.api.v1.SubjectReference
+ (*PartialCaveatInfo)(nil), // 41: authzed.api.v1.PartialCaveatInfo
+ (*DebugInformation)(nil), // 42: authzed.api.v1.DebugInformation
+ (*timestamppb.Timestamp)(nil), // 43: google.protobuf.Timestamp
+ (*status.Status)(nil), // 44: google.rpc.Status
+ (*PermissionRelationshipTree)(nil), // 45: authzed.api.v1.PermissionRelationshipTree
+}
+var file_authzed_api_v1_permission_service_proto_depIdxs = []int32{
+ 34, // 0: authzed.api.v1.Consistency.at_least_as_fresh:type_name -> authzed.api.v1.ZedToken
+ 34, // 1: authzed.api.v1.Consistency.at_exact_snapshot:type_name -> authzed.api.v1.ZedToken
+ 7, // 2: authzed.api.v1.RelationshipFilter.optional_subject_filter:type_name -> authzed.api.v1.SubjectFilter
+ 33, // 3: authzed.api.v1.SubjectFilter.optional_relation:type_name -> authzed.api.v1.SubjectFilter.RelationFilter
+ 5, // 4: authzed.api.v1.ReadRelationshipsRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 6, // 5: authzed.api.v1.ReadRelationshipsRequest.relationship_filter:type_name -> authzed.api.v1.RelationshipFilter
+ 35, // 6: authzed.api.v1.ReadRelationshipsRequest.optional_cursor:type_name -> authzed.api.v1.Cursor
+ 34, // 7: authzed.api.v1.ReadRelationshipsResponse.read_at:type_name -> authzed.api.v1.ZedToken
+ 36, // 8: authzed.api.v1.ReadRelationshipsResponse.relationship:type_name -> authzed.api.v1.Relationship
+ 35, // 9: authzed.api.v1.ReadRelationshipsResponse.after_result_cursor:type_name -> authzed.api.v1.Cursor
+ 1, // 10: authzed.api.v1.Precondition.operation:type_name -> authzed.api.v1.Precondition.Operation
+ 6, // 11: authzed.api.v1.Precondition.filter:type_name -> authzed.api.v1.RelationshipFilter
+ 37, // 12: authzed.api.v1.WriteRelationshipsRequest.updates:type_name -> authzed.api.v1.RelationshipUpdate
+ 10, // 13: authzed.api.v1.WriteRelationshipsRequest.optional_preconditions:type_name -> authzed.api.v1.Precondition
+ 38, // 14: authzed.api.v1.WriteRelationshipsRequest.optional_transaction_metadata:type_name -> google.protobuf.Struct
+ 34, // 15: authzed.api.v1.WriteRelationshipsResponse.written_at:type_name -> authzed.api.v1.ZedToken
+ 6, // 16: authzed.api.v1.DeleteRelationshipsRequest.relationship_filter:type_name -> authzed.api.v1.RelationshipFilter
+ 10, // 17: authzed.api.v1.DeleteRelationshipsRequest.optional_preconditions:type_name -> authzed.api.v1.Precondition
+ 38, // 18: authzed.api.v1.DeleteRelationshipsRequest.optional_transaction_metadata:type_name -> google.protobuf.Struct
+ 34, // 19: authzed.api.v1.DeleteRelationshipsResponse.deleted_at:type_name -> authzed.api.v1.ZedToken
+ 2, // 20: authzed.api.v1.DeleteRelationshipsResponse.deletion_progress:type_name -> authzed.api.v1.DeleteRelationshipsResponse.DeletionProgress
+ 5, // 21: authzed.api.v1.CheckPermissionRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 39, // 22: authzed.api.v1.CheckPermissionRequest.resource:type_name -> authzed.api.v1.ObjectReference
+ 40, // 23: authzed.api.v1.CheckPermissionRequest.subject:type_name -> authzed.api.v1.SubjectReference
+ 38, // 24: authzed.api.v1.CheckPermissionRequest.context:type_name -> google.protobuf.Struct
+ 34, // 25: authzed.api.v1.CheckPermissionResponse.checked_at:type_name -> authzed.api.v1.ZedToken
+ 3, // 26: authzed.api.v1.CheckPermissionResponse.permissionship:type_name -> authzed.api.v1.CheckPermissionResponse.Permissionship
+ 41, // 27: authzed.api.v1.CheckPermissionResponse.partial_caveat_info:type_name -> authzed.api.v1.PartialCaveatInfo
+ 42, // 28: authzed.api.v1.CheckPermissionResponse.debug_trace:type_name -> authzed.api.v1.DebugInformation
+ 43, // 29: authzed.api.v1.CheckPermissionResponse.optional_expires_at:type_name -> google.protobuf.Timestamp
+ 5, // 30: authzed.api.v1.CheckBulkPermissionsRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 18, // 31: authzed.api.v1.CheckBulkPermissionsRequest.items:type_name -> authzed.api.v1.CheckBulkPermissionsRequestItem
+ 39, // 32: authzed.api.v1.CheckBulkPermissionsRequestItem.resource:type_name -> authzed.api.v1.ObjectReference
+ 40, // 33: authzed.api.v1.CheckBulkPermissionsRequestItem.subject:type_name -> authzed.api.v1.SubjectReference
+ 38, // 34: authzed.api.v1.CheckBulkPermissionsRequestItem.context:type_name -> google.protobuf.Struct
+ 34, // 35: authzed.api.v1.CheckBulkPermissionsResponse.checked_at:type_name -> authzed.api.v1.ZedToken
+ 20, // 36: authzed.api.v1.CheckBulkPermissionsResponse.pairs:type_name -> authzed.api.v1.CheckBulkPermissionsPair
+ 18, // 37: authzed.api.v1.CheckBulkPermissionsPair.request:type_name -> authzed.api.v1.CheckBulkPermissionsRequestItem
+ 21, // 38: authzed.api.v1.CheckBulkPermissionsPair.item:type_name -> authzed.api.v1.CheckBulkPermissionsResponseItem
+ 44, // 39: authzed.api.v1.CheckBulkPermissionsPair.error:type_name -> google.rpc.Status
+ 3, // 40: authzed.api.v1.CheckBulkPermissionsResponseItem.permissionship:type_name -> authzed.api.v1.CheckPermissionResponse.Permissionship
+ 41, // 41: authzed.api.v1.CheckBulkPermissionsResponseItem.partial_caveat_info:type_name -> authzed.api.v1.PartialCaveatInfo
+ 42, // 42: authzed.api.v1.CheckBulkPermissionsResponseItem.debug_trace:type_name -> authzed.api.v1.DebugInformation
+ 5, // 43: authzed.api.v1.ExpandPermissionTreeRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 39, // 44: authzed.api.v1.ExpandPermissionTreeRequest.resource:type_name -> authzed.api.v1.ObjectReference
+ 34, // 45: authzed.api.v1.ExpandPermissionTreeResponse.expanded_at:type_name -> authzed.api.v1.ZedToken
+ 45, // 46: authzed.api.v1.ExpandPermissionTreeResponse.tree_root:type_name -> authzed.api.v1.PermissionRelationshipTree
+ 5, // 47: authzed.api.v1.LookupResourcesRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 40, // 48: authzed.api.v1.LookupResourcesRequest.subject:type_name -> authzed.api.v1.SubjectReference
+ 38, // 49: authzed.api.v1.LookupResourcesRequest.context:type_name -> google.protobuf.Struct
+ 35, // 50: authzed.api.v1.LookupResourcesRequest.optional_cursor:type_name -> authzed.api.v1.Cursor
+ 34, // 51: authzed.api.v1.LookupResourcesResponse.looked_up_at:type_name -> authzed.api.v1.ZedToken
+ 0, // 52: authzed.api.v1.LookupResourcesResponse.permissionship:type_name -> authzed.api.v1.LookupPermissionship
+ 41, // 53: authzed.api.v1.LookupResourcesResponse.partial_caveat_info:type_name -> authzed.api.v1.PartialCaveatInfo
+ 35, // 54: authzed.api.v1.LookupResourcesResponse.after_result_cursor:type_name -> authzed.api.v1.Cursor
+ 5, // 55: authzed.api.v1.LookupSubjectsRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 39, // 56: authzed.api.v1.LookupSubjectsRequest.resource:type_name -> authzed.api.v1.ObjectReference
+ 38, // 57: authzed.api.v1.LookupSubjectsRequest.context:type_name -> google.protobuf.Struct
+ 35, // 58: authzed.api.v1.LookupSubjectsRequest.optional_cursor:type_name -> authzed.api.v1.Cursor
+ 4, // 59: authzed.api.v1.LookupSubjectsRequest.wildcard_option:type_name -> authzed.api.v1.LookupSubjectsRequest.WildcardOption
+ 34, // 60: authzed.api.v1.LookupSubjectsResponse.looked_up_at:type_name -> authzed.api.v1.ZedToken
+ 0, // 61: authzed.api.v1.LookupSubjectsResponse.permissionship:type_name -> authzed.api.v1.LookupPermissionship
+ 41, // 62: authzed.api.v1.LookupSubjectsResponse.partial_caveat_info:type_name -> authzed.api.v1.PartialCaveatInfo
+ 28, // 63: authzed.api.v1.LookupSubjectsResponse.subject:type_name -> authzed.api.v1.ResolvedSubject
+ 28, // 64: authzed.api.v1.LookupSubjectsResponse.excluded_subjects:type_name -> authzed.api.v1.ResolvedSubject
+ 35, // 65: authzed.api.v1.LookupSubjectsResponse.after_result_cursor:type_name -> authzed.api.v1.Cursor
+ 0, // 66: authzed.api.v1.ResolvedSubject.permissionship:type_name -> authzed.api.v1.LookupPermissionship
+ 41, // 67: authzed.api.v1.ResolvedSubject.partial_caveat_info:type_name -> authzed.api.v1.PartialCaveatInfo
+ 36, // 68: authzed.api.v1.ImportBulkRelationshipsRequest.relationships:type_name -> authzed.api.v1.Relationship
+ 5, // 69: authzed.api.v1.ExportBulkRelationshipsRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 35, // 70: authzed.api.v1.ExportBulkRelationshipsRequest.optional_cursor:type_name -> authzed.api.v1.Cursor
+ 6, // 71: authzed.api.v1.ExportBulkRelationshipsRequest.optional_relationship_filter:type_name -> authzed.api.v1.RelationshipFilter
+ 35, // 72: authzed.api.v1.ExportBulkRelationshipsResponse.after_result_cursor:type_name -> authzed.api.v1.Cursor
+ 36, // 73: authzed.api.v1.ExportBulkRelationshipsResponse.relationships:type_name -> authzed.api.v1.Relationship
+ 8, // 74: authzed.api.v1.PermissionsService.ReadRelationships:input_type -> authzed.api.v1.ReadRelationshipsRequest
+ 11, // 75: authzed.api.v1.PermissionsService.WriteRelationships:input_type -> authzed.api.v1.WriteRelationshipsRequest
+ 13, // 76: authzed.api.v1.PermissionsService.DeleteRelationships:input_type -> authzed.api.v1.DeleteRelationshipsRequest
+ 15, // 77: authzed.api.v1.PermissionsService.CheckPermission:input_type -> authzed.api.v1.CheckPermissionRequest
+ 17, // 78: authzed.api.v1.PermissionsService.CheckBulkPermissions:input_type -> authzed.api.v1.CheckBulkPermissionsRequest
+ 22, // 79: authzed.api.v1.PermissionsService.ExpandPermissionTree:input_type -> authzed.api.v1.ExpandPermissionTreeRequest
+ 24, // 80: authzed.api.v1.PermissionsService.LookupResources:input_type -> authzed.api.v1.LookupResourcesRequest
+ 26, // 81: authzed.api.v1.PermissionsService.LookupSubjects:input_type -> authzed.api.v1.LookupSubjectsRequest
+ 29, // 82: authzed.api.v1.PermissionsService.ImportBulkRelationships:input_type -> authzed.api.v1.ImportBulkRelationshipsRequest
+ 31, // 83: authzed.api.v1.PermissionsService.ExportBulkRelationships:input_type -> authzed.api.v1.ExportBulkRelationshipsRequest
+ 9, // 84: authzed.api.v1.PermissionsService.ReadRelationships:output_type -> authzed.api.v1.ReadRelationshipsResponse
+ 12, // 85: authzed.api.v1.PermissionsService.WriteRelationships:output_type -> authzed.api.v1.WriteRelationshipsResponse
+ 14, // 86: authzed.api.v1.PermissionsService.DeleteRelationships:output_type -> authzed.api.v1.DeleteRelationshipsResponse
+ 16, // 87: authzed.api.v1.PermissionsService.CheckPermission:output_type -> authzed.api.v1.CheckPermissionResponse
+ 19, // 88: authzed.api.v1.PermissionsService.CheckBulkPermissions:output_type -> authzed.api.v1.CheckBulkPermissionsResponse
+ 23, // 89: authzed.api.v1.PermissionsService.ExpandPermissionTree:output_type -> authzed.api.v1.ExpandPermissionTreeResponse
+ 25, // 90: authzed.api.v1.PermissionsService.LookupResources:output_type -> authzed.api.v1.LookupResourcesResponse
+ 27, // 91: authzed.api.v1.PermissionsService.LookupSubjects:output_type -> authzed.api.v1.LookupSubjectsResponse
+ 30, // 92: authzed.api.v1.PermissionsService.ImportBulkRelationships:output_type -> authzed.api.v1.ImportBulkRelationshipsResponse
+ 32, // 93: authzed.api.v1.PermissionsService.ExportBulkRelationships:output_type -> authzed.api.v1.ExportBulkRelationshipsResponse
+ 84, // [84:94] is the sub-list for method output_type
+ 74, // [74:84] is the sub-list for method input_type
+ 74, // [74:74] is the sub-list for extension type_name
+ 74, // [74:74] is the sub-list for extension extendee
+ 0, // [0:74] is the sub-list for field type_name
+}
+
+func init() { file_authzed_api_v1_permission_service_proto_init() }
+func file_authzed_api_v1_permission_service_proto_init() {
+ if File_authzed_api_v1_permission_service_proto != nil {
+ return
+ }
+ file_authzed_api_v1_core_proto_init()
+ file_authzed_api_v1_debug_proto_init()
+ file_authzed_api_v1_permission_service_proto_msgTypes[0].OneofWrappers = []any{
+ (*Consistency_MinimizeLatency)(nil),
+ (*Consistency_AtLeastAsFresh)(nil),
+ (*Consistency_AtExactSnapshot)(nil),
+ (*Consistency_FullyConsistent)(nil),
+ }
+ file_authzed_api_v1_permission_service_proto_msgTypes[15].OneofWrappers = []any{
+ (*CheckBulkPermissionsPair_Item)(nil),
+ (*CheckBulkPermissionsPair_Error)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_authzed_api_v1_permission_service_proto_rawDesc), len(file_authzed_api_v1_permission_service_proto_rawDesc)),
+ NumEnums: 5,
+ NumMessages: 29,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_authzed_api_v1_permission_service_proto_goTypes,
+ DependencyIndexes: file_authzed_api_v1_permission_service_proto_depIdxs,
+ EnumInfos: file_authzed_api_v1_permission_service_proto_enumTypes,
+ MessageInfos: file_authzed_api_v1_permission_service_proto_msgTypes,
+ }.Build()
+ File_authzed_api_v1_permission_service_proto = out.File
+ file_authzed_api_v1_permission_service_proto_goTypes = nil
+ file_authzed_api_v1_permission_service_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service.pb.gw.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service.pb.gw.go
new file mode 100644
index 0000000..f9bc66f
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service.pb.gw.go
@@ -0,0 +1,656 @@
+// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
+// source: authzed/api/v1/permission_service.proto
+
+/*
+Package v1 is a reverse proxy.
+
+It translates gRPC into RESTful JSON APIs.
+*/
+package v1
+
+import (
+ "context"
+ "errors"
+ "io"
+ "net/http"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+)
+
+// Suppress "imported and not used" errors
+var (
+ _ codes.Code
+ _ io.Reader
+ _ status.Status
+ _ = errors.New
+ _ = runtime.String
+ _ = utilities.NewDoubleArray
+ _ = metadata.Join
+)
+
+func request_PermissionsService_ReadRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionsServiceClient, req *http.Request, pathParams map[string]string) (PermissionsService_ReadRelationshipsClient, runtime.ServerMetadata, error) {
+ var (
+ protoReq ReadRelationshipsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ stream, err := client.ReadRelationships(ctx, &protoReq)
+ if err != nil {
+ return nil, metadata, err
+ }
+ header, err := stream.Header()
+ if err != nil {
+ return nil, metadata, err
+ }
+ metadata.HeaderMD = header
+ return stream, metadata, nil
+}
+
+func request_PermissionsService_WriteRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq WriteRelationshipsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.WriteRelationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_PermissionsService_WriteRelationships_0(ctx context.Context, marshaler runtime.Marshaler, server PermissionsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq WriteRelationshipsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.WriteRelationships(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_PermissionsService_DeleteRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq DeleteRelationshipsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.DeleteRelationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_PermissionsService_DeleteRelationships_0(ctx context.Context, marshaler runtime.Marshaler, server PermissionsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq DeleteRelationshipsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.DeleteRelationships(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_PermissionsService_CheckPermission_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq CheckPermissionRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.CheckPermission(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_PermissionsService_CheckPermission_0(ctx context.Context, marshaler runtime.Marshaler, server PermissionsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq CheckPermissionRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.CheckPermission(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_PermissionsService_CheckBulkPermissions_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq CheckBulkPermissionsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.CheckBulkPermissions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_PermissionsService_CheckBulkPermissions_0(ctx context.Context, marshaler runtime.Marshaler, server PermissionsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq CheckBulkPermissionsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.CheckBulkPermissions(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_PermissionsService_ExpandPermissionTree_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExpandPermissionTreeRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.ExpandPermissionTree(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_PermissionsService_ExpandPermissionTree_0(ctx context.Context, marshaler runtime.Marshaler, server PermissionsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExpandPermissionTreeRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.ExpandPermissionTree(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_PermissionsService_LookupResources_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionsServiceClient, req *http.Request, pathParams map[string]string) (PermissionsService_LookupResourcesClient, runtime.ServerMetadata, error) {
+ var (
+ protoReq LookupResourcesRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ stream, err := client.LookupResources(ctx, &protoReq)
+ if err != nil {
+ return nil, metadata, err
+ }
+ header, err := stream.Header()
+ if err != nil {
+ return nil, metadata, err
+ }
+ metadata.HeaderMD = header
+ return stream, metadata, nil
+}
+
+func request_PermissionsService_LookupSubjects_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionsServiceClient, req *http.Request, pathParams map[string]string) (PermissionsService_LookupSubjectsClient, runtime.ServerMetadata, error) {
+ var (
+ protoReq LookupSubjectsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ stream, err := client.LookupSubjects(ctx, &protoReq)
+ if err != nil {
+ return nil, metadata, err
+ }
+ header, err := stream.Header()
+ if err != nil {
+ return nil, metadata, err
+ }
+ metadata.HeaderMD = header
+ return stream, metadata, nil
+}
+
+func request_PermissionsService_ImportBulkRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var metadata runtime.ServerMetadata
+ stream, err := client.ImportBulkRelationships(ctx)
+ if err != nil {
+ grpclog.Errorf("Failed to start streaming: %v", err)
+ return nil, metadata, err
+ }
+ dec := marshaler.NewDecoder(req.Body)
+ for {
+ var protoReq ImportBulkRelationshipsRequest
+ err = dec.Decode(&protoReq)
+ if errors.Is(err, io.EOF) {
+ break
+ }
+ if err != nil {
+ grpclog.Errorf("Failed to decode request: %v", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err = stream.Send(&protoReq); err != nil {
+ if errors.Is(err, io.EOF) {
+ break
+ }
+ grpclog.Errorf("Failed to send request: %v", err)
+ return nil, metadata, err
+ }
+ }
+ if err := stream.CloseSend(); err != nil {
+ grpclog.Errorf("Failed to terminate client stream: %v", err)
+ return nil, metadata, err
+ }
+ header, err := stream.Header()
+ if err != nil {
+ grpclog.Errorf("Failed to get header from client: %v", err)
+ return nil, metadata, err
+ }
+ metadata.HeaderMD = header
+ msg, err := stream.CloseAndRecv()
+ metadata.TrailerMD = stream.Trailer()
+ return msg, metadata, err
+}
+
+func request_PermissionsService_ExportBulkRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionsServiceClient, req *http.Request, pathParams map[string]string) (PermissionsService_ExportBulkRelationshipsClient, runtime.ServerMetadata, error) {
+ var (
+ protoReq ExportBulkRelationshipsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ stream, err := client.ExportBulkRelationships(ctx, &protoReq)
+ if err != nil {
+ return nil, metadata, err
+ }
+ header, err := stream.Header()
+ if err != nil {
+ return nil, metadata, err
+ }
+ metadata.HeaderMD = header
+ return stream, metadata, nil
+}
+
+// RegisterPermissionsServiceHandlerServer registers the http handlers for service PermissionsService to "mux".
+// UnaryRPC :call PermissionsServiceServer directly.
+// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPermissionsServiceHandlerFromEndpoint instead.
+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
+func RegisterPermissionsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PermissionsServiceServer) error {
+ mux.Handle(http.MethodPost, pattern_PermissionsService_ReadRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
+ _, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ })
+ mux.Handle(http.MethodPost, pattern_PermissionsService_WriteRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.PermissionsService/WriteRelationships", runtime.WithHTTPPathPattern("/v1/relationships/write"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_PermissionsService_WriteRelationships_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_PermissionsService_WriteRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_PermissionsService_DeleteRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.PermissionsService/DeleteRelationships", runtime.WithHTTPPathPattern("/v1/relationships/delete"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_PermissionsService_DeleteRelationships_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_PermissionsService_DeleteRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_PermissionsService_CheckPermission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.PermissionsService/CheckPermission", runtime.WithHTTPPathPattern("/v1/permissions/check"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_PermissionsService_CheckPermission_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_PermissionsService_CheckPermission_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_PermissionsService_CheckBulkPermissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.PermissionsService/CheckBulkPermissions", runtime.WithHTTPPathPattern("/v1/permissions/checkbulk"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_PermissionsService_CheckBulkPermissions_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_PermissionsService_CheckBulkPermissions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_PermissionsService_ExpandPermissionTree_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.PermissionsService/ExpandPermissionTree", runtime.WithHTTPPathPattern("/v1/permissions/expand"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_PermissionsService_ExpandPermissionTree_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_PermissionsService_ExpandPermissionTree_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+
+ mux.Handle(http.MethodPost, pattern_PermissionsService_LookupResources_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
+ _, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ })
+
+ mux.Handle(http.MethodPost, pattern_PermissionsService_LookupSubjects_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
+ _, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ })
+
+ mux.Handle(http.MethodPost, pattern_PermissionsService_ImportBulkRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
+ _, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ })
+
+ mux.Handle(http.MethodPost, pattern_PermissionsService_ExportBulkRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
+ _, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ })
+
+ return nil
+}
+
+// RegisterPermissionsServiceHandlerFromEndpoint is same as RegisterPermissionsServiceHandler but
+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
+func RegisterPermissionsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
+ conn, err := grpc.NewClient(endpoint, opts...)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err != nil {
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ return
+ }
+ go func() {
+ <-ctx.Done()
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ }()
+ }()
+ return RegisterPermissionsServiceHandler(ctx, mux, conn)
+}
+
+// RegisterPermissionsServiceHandler registers the http handlers for service PermissionsService to "mux".
+// The handlers forward requests to the grpc endpoint over "conn".
+func RegisterPermissionsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterPermissionsServiceHandlerClient(ctx, mux, NewPermissionsServiceClient(conn))
+}
+
+// RegisterPermissionsServiceHandlerClient registers the http handlers for service PermissionsService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PermissionsServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PermissionsServiceClient"
+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
+// "PermissionsServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
+func RegisterPermissionsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PermissionsServiceClient) error {
+ mux.Handle(http.MethodPost, pattern_PermissionsService_ReadRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.PermissionsService/ReadRelationships", runtime.WithHTTPPathPattern("/v1/relationships/read"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_PermissionsService_ReadRelationships_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_PermissionsService_ReadRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_PermissionsService_WriteRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.PermissionsService/WriteRelationships", runtime.WithHTTPPathPattern("/v1/relationships/write"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_PermissionsService_WriteRelationships_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_PermissionsService_WriteRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_PermissionsService_DeleteRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.PermissionsService/DeleteRelationships", runtime.WithHTTPPathPattern("/v1/relationships/delete"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_PermissionsService_DeleteRelationships_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_PermissionsService_DeleteRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_PermissionsService_CheckPermission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.PermissionsService/CheckPermission", runtime.WithHTTPPathPattern("/v1/permissions/check"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_PermissionsService_CheckPermission_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_PermissionsService_CheckPermission_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_PermissionsService_CheckBulkPermissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.PermissionsService/CheckBulkPermissions", runtime.WithHTTPPathPattern("/v1/permissions/checkbulk"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_PermissionsService_CheckBulkPermissions_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_PermissionsService_CheckBulkPermissions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_PermissionsService_ExpandPermissionTree_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.PermissionsService/ExpandPermissionTree", runtime.WithHTTPPathPattern("/v1/permissions/expand"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_PermissionsService_ExpandPermissionTree_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_PermissionsService_ExpandPermissionTree_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_PermissionsService_LookupResources_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.PermissionsService/LookupResources", runtime.WithHTTPPathPattern("/v1/permissions/resources"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_PermissionsService_LookupResources_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_PermissionsService_LookupResources_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_PermissionsService_LookupSubjects_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.PermissionsService/LookupSubjects", runtime.WithHTTPPathPattern("/v1/permissions/subjects"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_PermissionsService_LookupSubjects_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_PermissionsService_LookupSubjects_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_PermissionsService_ImportBulkRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.PermissionsService/ImportBulkRelationships", runtime.WithHTTPPathPattern("/v1/relationships/importbulk"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_PermissionsService_ImportBulkRelationships_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_PermissionsService_ImportBulkRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_PermissionsService_ExportBulkRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.PermissionsService/ExportBulkRelationships", runtime.WithHTTPPathPattern("/v1/relationships/exportbulk"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_PermissionsService_ExportBulkRelationships_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_PermissionsService_ExportBulkRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ })
+ return nil
+}
+
+var (
+ pattern_PermissionsService_ReadRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "relationships", "read"}, ""))
+ pattern_PermissionsService_WriteRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "relationships", "write"}, ""))
+ pattern_PermissionsService_DeleteRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "relationships", "delete"}, ""))
+ pattern_PermissionsService_CheckPermission_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "permissions", "check"}, ""))
+ pattern_PermissionsService_CheckBulkPermissions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "permissions", "checkbulk"}, ""))
+ pattern_PermissionsService_ExpandPermissionTree_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "permissions", "expand"}, ""))
+ pattern_PermissionsService_LookupResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "permissions", "resources"}, ""))
+ pattern_PermissionsService_LookupSubjects_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "permissions", "subjects"}, ""))
+ pattern_PermissionsService_ImportBulkRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "relationships", "importbulk"}, ""))
+ pattern_PermissionsService_ExportBulkRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "relationships", "exportbulk"}, ""))
+)
+
+var (
+ forward_PermissionsService_ReadRelationships_0 = runtime.ForwardResponseStream
+ forward_PermissionsService_WriteRelationships_0 = runtime.ForwardResponseMessage
+ forward_PermissionsService_DeleteRelationships_0 = runtime.ForwardResponseMessage
+ forward_PermissionsService_CheckPermission_0 = runtime.ForwardResponseMessage
+ forward_PermissionsService_CheckBulkPermissions_0 = runtime.ForwardResponseMessage
+ forward_PermissionsService_ExpandPermissionTree_0 = runtime.ForwardResponseMessage
+ forward_PermissionsService_LookupResources_0 = runtime.ForwardResponseStream
+ forward_PermissionsService_LookupSubjects_0 = runtime.ForwardResponseStream
+ forward_PermissionsService_ImportBulkRelationships_0 = runtime.ForwardResponseMessage
+ forward_PermissionsService_ExportBulkRelationships_0 = runtime.ForwardResponseStream
+)
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service.pb.validate.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service.pb.validate.go
new file mode 100644
index 0000000..d41face
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service.pb.validate.go
@@ -0,0 +1,5860 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: authzed/api/v1/permission_service.proto
+
+package v1
+
+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 Consistency 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 *Consistency) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Consistency 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 ConsistencyMultiError, or
+// nil if none found.
+func (m *Consistency) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Consistency) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofRequirementPresent := false
+ switch v := m.Requirement.(type) {
+ case *Consistency_MinimizeLatency:
+ if v == nil {
+ err := ConsistencyValidationError{
+ field: "Requirement",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofRequirementPresent = true
+
+ if m.GetMinimizeLatency() != true {
+ err := ConsistencyValidationError{
+ field: "MinimizeLatency",
+ reason: "value must equal true",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ case *Consistency_AtLeastAsFresh:
+ if v == nil {
+ err := ConsistencyValidationError{
+ field: "Requirement",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofRequirementPresent = true
+
+ if all {
+ switch v := interface{}(m.GetAtLeastAsFresh()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ConsistencyValidationError{
+ field: "AtLeastAsFresh",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ConsistencyValidationError{
+ field: "AtLeastAsFresh",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetAtLeastAsFresh()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ConsistencyValidationError{
+ field: "AtLeastAsFresh",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Consistency_AtExactSnapshot:
+ if v == nil {
+ err := ConsistencyValidationError{
+ field: "Requirement",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofRequirementPresent = true
+
+ if all {
+ switch v := interface{}(m.GetAtExactSnapshot()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ConsistencyValidationError{
+ field: "AtExactSnapshot",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ConsistencyValidationError{
+ field: "AtExactSnapshot",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetAtExactSnapshot()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ConsistencyValidationError{
+ field: "AtExactSnapshot",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Consistency_FullyConsistent:
+ if v == nil {
+ err := ConsistencyValidationError{
+ field: "Requirement",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofRequirementPresent = true
+
+ if m.GetFullyConsistent() != true {
+ err := ConsistencyValidationError{
+ field: "FullyConsistent",
+ reason: "value must equal true",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofRequirementPresent {
+ err := ConsistencyValidationError{
+ field: "Requirement",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return ConsistencyMultiError(errors)
+ }
+
+ return nil
+}
+
+// ConsistencyMultiError is an error wrapping multiple validation errors
+// returned by Consistency.ValidateAll() if the designated constraints aren't met.
+type ConsistencyMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ConsistencyMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ConsistencyMultiError) AllErrors() []error { return m }
+
+// ConsistencyValidationError is the validation error returned by
+// Consistency.Validate if the designated constraints aren't met.
+type ConsistencyValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ConsistencyValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ConsistencyValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ConsistencyValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ConsistencyValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ConsistencyValidationError) ErrorName() string { return "ConsistencyValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ConsistencyValidationError) 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 %sConsistency.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ConsistencyValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ConsistencyValidationError{}
+
+// Validate checks the field values on RelationshipFilter 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 *RelationshipFilter) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on RelationshipFilter 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
+// RelationshipFilterMultiError, or nil if none found.
+func (m *RelationshipFilter) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *RelationshipFilter) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetResourceType()) > 128 {
+ err := RelationshipFilterValidationError{
+ field: "ResourceType",
+ reason: "value length must be at most 128 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_RelationshipFilter_ResourceType_Pattern.MatchString(m.GetResourceType()) {
+ err := RelationshipFilterValidationError{
+ field: "ResourceType",
+ reason: "value does not match regex pattern \"^(([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9])?$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(m.GetOptionalResourceId()) > 1024 {
+ err := RelationshipFilterValidationError{
+ field: "OptionalResourceId",
+ reason: "value length must be at most 1024 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_RelationshipFilter_OptionalResourceId_Pattern.MatchString(m.GetOptionalResourceId()) {
+ err := RelationshipFilterValidationError{
+ field: "OptionalResourceId",
+ reason: "value does not match regex pattern \"^([a-zA-Z0-9/_|\\\\-=+]{1,})?$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(m.GetOptionalResourceIdPrefix()) > 1024 {
+ err := RelationshipFilterValidationError{
+ field: "OptionalResourceIdPrefix",
+ reason: "value length must be at most 1024 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_RelationshipFilter_OptionalResourceIdPrefix_Pattern.MatchString(m.GetOptionalResourceIdPrefix()) {
+ err := RelationshipFilterValidationError{
+ field: "OptionalResourceIdPrefix",
+ reason: "value does not match regex pattern \"^([a-zA-Z0-9/_|\\\\-=+]{1,})?$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(m.GetOptionalRelation()) > 64 {
+ err := RelationshipFilterValidationError{
+ field: "OptionalRelation",
+ reason: "value length must be at most 64 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_RelationshipFilter_OptionalRelation_Pattern.MatchString(m.GetOptionalRelation()) {
+ err := RelationshipFilterValidationError{
+ field: "OptionalRelation",
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetOptionalSubjectFilter()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RelationshipFilterValidationError{
+ field: "OptionalSubjectFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RelationshipFilterValidationError{
+ field: "OptionalSubjectFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalSubjectFilter()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RelationshipFilterValidationError{
+ field: "OptionalSubjectFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return RelationshipFilterMultiError(errors)
+ }
+
+ return nil
+}
+
+// RelationshipFilterMultiError is an error wrapping multiple validation errors
+// returned by RelationshipFilter.ValidateAll() if the designated constraints
+// aren't met.
+type RelationshipFilterMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m RelationshipFilterMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m RelationshipFilterMultiError) AllErrors() []error { return m }
+
+// RelationshipFilterValidationError is the validation error returned by
+// RelationshipFilter.Validate if the designated constraints aren't met.
+type RelationshipFilterValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e RelationshipFilterValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e RelationshipFilterValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e RelationshipFilterValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e RelationshipFilterValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e RelationshipFilterValidationError) ErrorName() string {
+ return "RelationshipFilterValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e RelationshipFilterValidationError) 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 %sRelationshipFilter.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = RelationshipFilterValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = RelationshipFilterValidationError{}
+
+var _RelationshipFilter_ResourceType_Pattern = regexp.MustCompile("^(([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9])?$")
+
+var _RelationshipFilter_OptionalResourceId_Pattern = regexp.MustCompile("^([a-zA-Z0-9/_|\\-=+]{1,})?$")
+
+var _RelationshipFilter_OptionalResourceIdPrefix_Pattern = regexp.MustCompile("^([a-zA-Z0-9/_|\\-=+]{1,})?$")
+
+var _RelationshipFilter_OptionalRelation_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])?$")
+
+// Validate checks the field values on SubjectFilter 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 *SubjectFilter) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on SubjectFilter 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 SubjectFilterMultiError, or
+// nil if none found.
+func (m *SubjectFilter) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SubjectFilter) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetSubjectType()) > 128 {
+ err := SubjectFilterValidationError{
+ field: "SubjectType",
+ reason: "value length must be at most 128 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_SubjectFilter_SubjectType_Pattern.MatchString(m.GetSubjectType()) {
+ err := SubjectFilterValidationError{
+ field: "SubjectType",
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(m.GetOptionalSubjectId()) > 1024 {
+ err := SubjectFilterValidationError{
+ field: "OptionalSubjectId",
+ reason: "value length must be at most 1024 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_SubjectFilter_OptionalSubjectId_Pattern.MatchString(m.GetOptionalSubjectId()) {
+ err := SubjectFilterValidationError{
+ field: "OptionalSubjectId",
+ reason: "value does not match regex pattern \"^(([a-zA-Z0-9/_|\\\\-=+]{1,})|\\\\*)?$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetOptionalRelation()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SubjectFilterValidationError{
+ field: "OptionalRelation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SubjectFilterValidationError{
+ field: "OptionalRelation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalRelation()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SubjectFilterValidationError{
+ field: "OptionalRelation",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return SubjectFilterMultiError(errors)
+ }
+
+ return nil
+}
+
+// SubjectFilterMultiError is an error wrapping multiple validation errors
+// returned by SubjectFilter.ValidateAll() if the designated constraints
+// aren't met.
+type SubjectFilterMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SubjectFilterMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SubjectFilterMultiError) AllErrors() []error { return m }
+
+// SubjectFilterValidationError is the validation error returned by
+// SubjectFilter.Validate if the designated constraints aren't met.
+type SubjectFilterValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SubjectFilterValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SubjectFilterValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e SubjectFilterValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SubjectFilterValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SubjectFilterValidationError) ErrorName() string { return "SubjectFilterValidationError" }
+
+// Error satisfies the builtin error interface
+func (e SubjectFilterValidationError) 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 %sSubjectFilter.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SubjectFilterValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SubjectFilterValidationError{}
+
+var _SubjectFilter_SubjectType_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$")
+
+var _SubjectFilter_OptionalSubjectId_Pattern = regexp.MustCompile("^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)?$")
+
+// Validate checks the field values on ReadRelationshipsRequest 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 *ReadRelationshipsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReadRelationshipsRequest 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
+// ReadRelationshipsRequestMultiError, or nil if none found.
+func (m *ReadRelationshipsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReadRelationshipsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReadRelationshipsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReadRelationshipsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReadRelationshipsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if m.GetRelationshipFilter() == nil {
+ err := ReadRelationshipsRequestValidationError{
+ field: "RelationshipFilter",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRelationshipFilter()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReadRelationshipsRequestValidationError{
+ field: "RelationshipFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReadRelationshipsRequestValidationError{
+ field: "RelationshipFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelationshipFilter()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReadRelationshipsRequestValidationError{
+ field: "RelationshipFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if m.GetOptionalLimit() < 0 {
+ err := ReadRelationshipsRequestValidationError{
+ field: "OptionalLimit",
+ reason: "value must be greater than or equal to 0",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetOptionalCursor()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReadRelationshipsRequestValidationError{
+ field: "OptionalCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReadRelationshipsRequestValidationError{
+ field: "OptionalCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalCursor()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReadRelationshipsRequestValidationError{
+ field: "OptionalCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ReadRelationshipsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReadRelationshipsRequestMultiError is an error wrapping multiple validation
+// errors returned by ReadRelationshipsRequest.ValidateAll() if the designated
+// constraints aren't met.
+type ReadRelationshipsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReadRelationshipsRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReadRelationshipsRequestMultiError) AllErrors() []error { return m }
+
+// ReadRelationshipsRequestValidationError is the validation error returned by
+// ReadRelationshipsRequest.Validate if the designated constraints aren't met.
+type ReadRelationshipsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReadRelationshipsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReadRelationshipsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReadRelationshipsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReadRelationshipsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReadRelationshipsRequestValidationError) ErrorName() string {
+ return "ReadRelationshipsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ReadRelationshipsRequestValidationError) 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 %sReadRelationshipsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReadRelationshipsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReadRelationshipsRequestValidationError{}
+
+// Validate checks the field values on ReadRelationshipsResponse 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 *ReadRelationshipsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReadRelationshipsResponse 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
+// ReadRelationshipsResponseMultiError, or nil if none found.
+func (m *ReadRelationshipsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReadRelationshipsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetReadAt() == nil {
+ err := ReadRelationshipsResponseValidationError{
+ field: "ReadAt",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetReadAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReadRelationshipsResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReadRelationshipsResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetReadAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReadRelationshipsResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if m.GetRelationship() == nil {
+ err := ReadRelationshipsResponseValidationError{
+ field: "Relationship",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRelationship()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReadRelationshipsResponseValidationError{
+ field: "Relationship",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReadRelationshipsResponseValidationError{
+ field: "Relationship",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelationship()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReadRelationshipsResponseValidationError{
+ field: "Relationship",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetAfterResultCursor()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReadRelationshipsResponseValidationError{
+ field: "AfterResultCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReadRelationshipsResponseValidationError{
+ field: "AfterResultCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetAfterResultCursor()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReadRelationshipsResponseValidationError{
+ field: "AfterResultCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ReadRelationshipsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReadRelationshipsResponseMultiError is an error wrapping multiple validation
+// errors returned by ReadRelationshipsResponse.ValidateAll() if the
+// designated constraints aren't met.
+type ReadRelationshipsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReadRelationshipsResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReadRelationshipsResponseMultiError) AllErrors() []error { return m }
+
+// ReadRelationshipsResponseValidationError is the validation error returned by
+// ReadRelationshipsResponse.Validate if the designated constraints aren't met.
+type ReadRelationshipsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReadRelationshipsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReadRelationshipsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReadRelationshipsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReadRelationshipsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReadRelationshipsResponseValidationError) ErrorName() string {
+ return "ReadRelationshipsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ReadRelationshipsResponseValidationError) 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 %sReadRelationshipsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReadRelationshipsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReadRelationshipsResponseValidationError{}
+
+// Validate checks the field values on Precondition 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 *Precondition) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Precondition 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 PreconditionMultiError, or
+// nil if none found.
+func (m *Precondition) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Precondition) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if _, ok := _Precondition_Operation_NotInLookup[m.GetOperation()]; ok {
+ err := PreconditionValidationError{
+ field: "Operation",
+ reason: "value must not be in list [OPERATION_UNSPECIFIED]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if _, ok := Precondition_Operation_name[int32(m.GetOperation())]; !ok {
+ err := PreconditionValidationError{
+ field: "Operation",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if m.GetFilter() == nil {
+ err := PreconditionValidationError{
+ field: "Filter",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetFilter()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, PreconditionValidationError{
+ field: "Filter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, PreconditionValidationError{
+ field: "Filter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return PreconditionValidationError{
+ field: "Filter",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return PreconditionMultiError(errors)
+ }
+
+ return nil
+}
+
+// PreconditionMultiError is an error wrapping multiple validation errors
+// returned by Precondition.ValidateAll() if the designated constraints aren't met.
+type PreconditionMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m PreconditionMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m PreconditionMultiError) AllErrors() []error { return m }
+
+// PreconditionValidationError is the validation error returned by
+// Precondition.Validate if the designated constraints aren't met.
+type PreconditionValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e PreconditionValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e PreconditionValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e PreconditionValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e PreconditionValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e PreconditionValidationError) ErrorName() string { return "PreconditionValidationError" }
+
+// Error satisfies the builtin error interface
+func (e PreconditionValidationError) 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 %sPrecondition.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = PreconditionValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = PreconditionValidationError{}
+
+var _Precondition_Operation_NotInLookup = map[Precondition_Operation]struct{}{
+ 0: {},
+}
+
+// Validate checks the field values on WriteRelationshipsRequest 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 *WriteRelationshipsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on WriteRelationshipsRequest 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
+// WriteRelationshipsRequestMultiError, or nil if none found.
+func (m *WriteRelationshipsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *WriteRelationshipsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetUpdates() {
+ _, _ = idx, item
+
+ if item == nil {
+ err := WriteRelationshipsRequestValidationError{
+ field: fmt.Sprintf("Updates[%v]", idx),
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, WriteRelationshipsRequestValidationError{
+ field: fmt.Sprintf("Updates[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, WriteRelationshipsRequestValidationError{
+ field: fmt.Sprintf("Updates[%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 WriteRelationshipsRequestValidationError{
+ field: fmt.Sprintf("Updates[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ for idx, item := range m.GetOptionalPreconditions() {
+ _, _ = idx, item
+
+ if item == nil {
+ err := WriteRelationshipsRequestValidationError{
+ field: fmt.Sprintf("OptionalPreconditions[%v]", idx),
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, WriteRelationshipsRequestValidationError{
+ field: fmt.Sprintf("OptionalPreconditions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, WriteRelationshipsRequestValidationError{
+ field: fmt.Sprintf("OptionalPreconditions[%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 WriteRelationshipsRequestValidationError{
+ field: fmt.Sprintf("OptionalPreconditions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetOptionalTransactionMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, WriteRelationshipsRequestValidationError{
+ field: "OptionalTransactionMetadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, WriteRelationshipsRequestValidationError{
+ field: "OptionalTransactionMetadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalTransactionMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return WriteRelationshipsRequestValidationError{
+ field: "OptionalTransactionMetadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return WriteRelationshipsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// WriteRelationshipsRequestMultiError is an error wrapping multiple validation
+// errors returned by WriteRelationshipsRequest.ValidateAll() if the
+// designated constraints aren't met.
+type WriteRelationshipsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m WriteRelationshipsRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m WriteRelationshipsRequestMultiError) AllErrors() []error { return m }
+
+// WriteRelationshipsRequestValidationError is the validation error returned by
+// WriteRelationshipsRequest.Validate if the designated constraints aren't met.
+type WriteRelationshipsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e WriteRelationshipsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e WriteRelationshipsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e WriteRelationshipsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e WriteRelationshipsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e WriteRelationshipsRequestValidationError) ErrorName() string {
+ return "WriteRelationshipsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e WriteRelationshipsRequestValidationError) 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 %sWriteRelationshipsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = WriteRelationshipsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = WriteRelationshipsRequestValidationError{}
+
+// Validate checks the field values on WriteRelationshipsResponse 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 *WriteRelationshipsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on WriteRelationshipsResponse 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
+// WriteRelationshipsResponseMultiError, or nil if none found.
+func (m *WriteRelationshipsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *WriteRelationshipsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetWrittenAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, WriteRelationshipsResponseValidationError{
+ field: "WrittenAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, WriteRelationshipsResponseValidationError{
+ field: "WrittenAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetWrittenAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return WriteRelationshipsResponseValidationError{
+ field: "WrittenAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return WriteRelationshipsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// WriteRelationshipsResponseMultiError is an error wrapping multiple
+// validation errors returned by WriteRelationshipsResponse.ValidateAll() if
+// the designated constraints aren't met.
+type WriteRelationshipsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m WriteRelationshipsResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m WriteRelationshipsResponseMultiError) AllErrors() []error { return m }
+
+// WriteRelationshipsResponseValidationError is the validation error returned
+// by WriteRelationshipsResponse.Validate if the designated constraints aren't met.
+type WriteRelationshipsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e WriteRelationshipsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e WriteRelationshipsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e WriteRelationshipsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e WriteRelationshipsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e WriteRelationshipsResponseValidationError) ErrorName() string {
+ return "WriteRelationshipsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e WriteRelationshipsResponseValidationError) 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 %sWriteRelationshipsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = WriteRelationshipsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = WriteRelationshipsResponseValidationError{}
+
+// Validate checks the field values on DeleteRelationshipsRequest 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 *DeleteRelationshipsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DeleteRelationshipsRequest 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
+// DeleteRelationshipsRequestMultiError, or nil if none found.
+func (m *DeleteRelationshipsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DeleteRelationshipsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetRelationshipFilter() == nil {
+ err := DeleteRelationshipsRequestValidationError{
+ field: "RelationshipFilter",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRelationshipFilter()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DeleteRelationshipsRequestValidationError{
+ field: "RelationshipFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DeleteRelationshipsRequestValidationError{
+ field: "RelationshipFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelationshipFilter()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DeleteRelationshipsRequestValidationError{
+ field: "RelationshipFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetOptionalPreconditions() {
+ _, _ = idx, item
+
+ if item == nil {
+ err := DeleteRelationshipsRequestValidationError{
+ field: fmt.Sprintf("OptionalPreconditions[%v]", idx),
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DeleteRelationshipsRequestValidationError{
+ field: fmt.Sprintf("OptionalPreconditions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DeleteRelationshipsRequestValidationError{
+ field: fmt.Sprintf("OptionalPreconditions[%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 DeleteRelationshipsRequestValidationError{
+ field: fmt.Sprintf("OptionalPreconditions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if m.GetOptionalLimit() < 0 {
+ err := DeleteRelationshipsRequestValidationError{
+ field: "OptionalLimit",
+ reason: "value must be greater than or equal to 0",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ // no validation rules for OptionalAllowPartialDeletions
+
+ if all {
+ switch v := interface{}(m.GetOptionalTransactionMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DeleteRelationshipsRequestValidationError{
+ field: "OptionalTransactionMetadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DeleteRelationshipsRequestValidationError{
+ field: "OptionalTransactionMetadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalTransactionMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DeleteRelationshipsRequestValidationError{
+ field: "OptionalTransactionMetadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return DeleteRelationshipsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// DeleteRelationshipsRequestMultiError is an error wrapping multiple
+// validation errors returned by DeleteRelationshipsRequest.ValidateAll() if
+// the designated constraints aren't met.
+type DeleteRelationshipsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DeleteRelationshipsRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DeleteRelationshipsRequestMultiError) AllErrors() []error { return m }
+
+// DeleteRelationshipsRequestValidationError is the validation error returned
+// by DeleteRelationshipsRequest.Validate if the designated constraints aren't met.
+type DeleteRelationshipsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DeleteRelationshipsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DeleteRelationshipsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DeleteRelationshipsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DeleteRelationshipsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DeleteRelationshipsRequestValidationError) ErrorName() string {
+ return "DeleteRelationshipsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DeleteRelationshipsRequestValidationError) 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 %sDeleteRelationshipsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DeleteRelationshipsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DeleteRelationshipsRequestValidationError{}
+
+// Validate checks the field values on DeleteRelationshipsResponse 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 *DeleteRelationshipsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DeleteRelationshipsResponse 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
+// DeleteRelationshipsResponseMultiError, or nil if none found.
+func (m *DeleteRelationshipsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DeleteRelationshipsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetDeletedAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DeleteRelationshipsResponseValidationError{
+ field: "DeletedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DeleteRelationshipsResponseValidationError{
+ field: "DeletedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetDeletedAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DeleteRelationshipsResponseValidationError{
+ field: "DeletedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for DeletionProgress
+
+ // no validation rules for RelationshipsDeletedCount
+
+ if len(errors) > 0 {
+ return DeleteRelationshipsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// DeleteRelationshipsResponseMultiError is an error wrapping multiple
+// validation errors returned by DeleteRelationshipsResponse.ValidateAll() if
+// the designated constraints aren't met.
+type DeleteRelationshipsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DeleteRelationshipsResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DeleteRelationshipsResponseMultiError) AllErrors() []error { return m }
+
+// DeleteRelationshipsResponseValidationError is the validation error returned
+// by DeleteRelationshipsResponse.Validate if the designated constraints
+// aren't met.
+type DeleteRelationshipsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DeleteRelationshipsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DeleteRelationshipsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DeleteRelationshipsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DeleteRelationshipsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DeleteRelationshipsResponseValidationError) ErrorName() string {
+ return "DeleteRelationshipsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DeleteRelationshipsResponseValidationError) 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 %sDeleteRelationshipsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DeleteRelationshipsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DeleteRelationshipsResponseValidationError{}
+
+// Validate checks the field values on CheckPermissionRequest 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 *CheckPermissionRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CheckPermissionRequest 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
+// CheckPermissionRequestMultiError, or nil if none found.
+func (m *CheckPermissionRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CheckPermissionRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckPermissionRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckPermissionRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CheckPermissionRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if m.GetResource() == nil {
+ err := CheckPermissionRequestValidationError{
+ field: "Resource",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetResource()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckPermissionRequestValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckPermissionRequestValidationError{
+ 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 CheckPermissionRequestValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(m.GetPermission()) > 64 {
+ err := CheckPermissionRequestValidationError{
+ field: "Permission",
+ reason: "value length must be at most 64 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_CheckPermissionRequest_Permission_Pattern.MatchString(m.GetPermission()) {
+ err := CheckPermissionRequestValidationError{
+ field: "Permission",
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if m.GetSubject() == nil {
+ err := CheckPermissionRequestValidationError{
+ field: "Subject",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetSubject()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckPermissionRequestValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckPermissionRequestValidationError{
+ 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 CheckPermissionRequestValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetContext()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckPermissionRequestValidationError{
+ field: "Context",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckPermissionRequestValidationError{
+ 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 CheckPermissionRequestValidationError{
+ field: "Context",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for WithTracing
+
+ if len(errors) > 0 {
+ return CheckPermissionRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// CheckPermissionRequestMultiError is an error wrapping multiple validation
+// errors returned by CheckPermissionRequest.ValidateAll() if the designated
+// constraints aren't met.
+type CheckPermissionRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CheckPermissionRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CheckPermissionRequestMultiError) AllErrors() []error { return m }
+
+// CheckPermissionRequestValidationError is the validation error returned by
+// CheckPermissionRequest.Validate if the designated constraints aren't met.
+type CheckPermissionRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CheckPermissionRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CheckPermissionRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CheckPermissionRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CheckPermissionRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CheckPermissionRequestValidationError) ErrorName() string {
+ return "CheckPermissionRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CheckPermissionRequestValidationError) 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 %sCheckPermissionRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CheckPermissionRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CheckPermissionRequestValidationError{}
+
+var _CheckPermissionRequest_Permission_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])?$")
+
+// Validate checks the field values on CheckPermissionResponse 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 *CheckPermissionResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CheckPermissionResponse 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
+// CheckPermissionResponseMultiError, or nil if none found.
+func (m *CheckPermissionResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CheckPermissionResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetCheckedAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckPermissionResponseValidationError{
+ field: "CheckedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckPermissionResponseValidationError{
+ field: "CheckedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCheckedAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CheckPermissionResponseValidationError{
+ field: "CheckedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if _, ok := _CheckPermissionResponse_Permissionship_NotInLookup[m.GetPermissionship()]; ok {
+ err := CheckPermissionResponseValidationError{
+ field: "Permissionship",
+ reason: "value must not be in list [PERMISSIONSHIP_UNSPECIFIED]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if _, ok := CheckPermissionResponse_Permissionship_name[int32(m.GetPermissionship())]; !ok {
+ err := CheckPermissionResponseValidationError{
+ field: "Permissionship",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPartialCaveatInfo()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckPermissionResponseValidationError{
+ field: "PartialCaveatInfo",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckPermissionResponseValidationError{
+ 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 CheckPermissionResponseValidationError{
+ field: "PartialCaveatInfo",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetDebugTrace()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckPermissionResponseValidationError{
+ field: "DebugTrace",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckPermissionResponseValidationError{
+ field: "DebugTrace",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetDebugTrace()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CheckPermissionResponseValidationError{
+ field: "DebugTrace",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetOptionalExpiresAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckPermissionResponseValidationError{
+ field: "OptionalExpiresAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckPermissionResponseValidationError{
+ field: "OptionalExpiresAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalExpiresAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CheckPermissionResponseValidationError{
+ field: "OptionalExpiresAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return CheckPermissionResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// CheckPermissionResponseMultiError is an error wrapping multiple validation
+// errors returned by CheckPermissionResponse.ValidateAll() if the designated
+// constraints aren't met.
+type CheckPermissionResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CheckPermissionResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CheckPermissionResponseMultiError) AllErrors() []error { return m }
+
+// CheckPermissionResponseValidationError is the validation error returned by
+// CheckPermissionResponse.Validate if the designated constraints aren't met.
+type CheckPermissionResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CheckPermissionResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CheckPermissionResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CheckPermissionResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CheckPermissionResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CheckPermissionResponseValidationError) ErrorName() string {
+ return "CheckPermissionResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CheckPermissionResponseValidationError) 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 %sCheckPermissionResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CheckPermissionResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CheckPermissionResponseValidationError{}
+
+var _CheckPermissionResponse_Permissionship_NotInLookup = map[CheckPermissionResponse_Permissionship]struct{}{
+ 0: {},
+}
+
+// Validate checks the field values on CheckBulkPermissionsRequest 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 *CheckBulkPermissionsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CheckBulkPermissionsRequest 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
+// CheckBulkPermissionsRequestMultiError, or nil if none found.
+func (m *CheckBulkPermissionsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CheckBulkPermissionsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckBulkPermissionsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckBulkPermissionsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CheckBulkPermissionsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetItems() {
+ _, _ = idx, item
+
+ if item == nil {
+ err := CheckBulkPermissionsRequestValidationError{
+ field: fmt.Sprintf("Items[%v]", idx),
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckBulkPermissionsRequestValidationError{
+ field: fmt.Sprintf("Items[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckBulkPermissionsRequestValidationError{
+ field: fmt.Sprintf("Items[%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 CheckBulkPermissionsRequestValidationError{
+ field: fmt.Sprintf("Items[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ // no validation rules for WithTracing
+
+ if len(errors) > 0 {
+ return CheckBulkPermissionsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// CheckBulkPermissionsRequestMultiError is an error wrapping multiple
+// validation errors returned by CheckBulkPermissionsRequest.ValidateAll() if
+// the designated constraints aren't met.
+type CheckBulkPermissionsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CheckBulkPermissionsRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CheckBulkPermissionsRequestMultiError) AllErrors() []error { return m }
+
+// CheckBulkPermissionsRequestValidationError is the validation error returned
+// by CheckBulkPermissionsRequest.Validate if the designated constraints
+// aren't met.
+type CheckBulkPermissionsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CheckBulkPermissionsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CheckBulkPermissionsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CheckBulkPermissionsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CheckBulkPermissionsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CheckBulkPermissionsRequestValidationError) ErrorName() string {
+ return "CheckBulkPermissionsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CheckBulkPermissionsRequestValidationError) 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 %sCheckBulkPermissionsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CheckBulkPermissionsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CheckBulkPermissionsRequestValidationError{}
+
+// Validate checks the field values on CheckBulkPermissionsRequestItem 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 *CheckBulkPermissionsRequestItem) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CheckBulkPermissionsRequestItem 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
+// CheckBulkPermissionsRequestItemMultiError, or nil if none found.
+func (m *CheckBulkPermissionsRequestItem) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CheckBulkPermissionsRequestItem) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetResource() == nil {
+ err := CheckBulkPermissionsRequestItemValidationError{
+ field: "Resource",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetResource()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckBulkPermissionsRequestItemValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckBulkPermissionsRequestItemValidationError{
+ 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 CheckBulkPermissionsRequestItemValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(m.GetPermission()) > 64 {
+ err := CheckBulkPermissionsRequestItemValidationError{
+ field: "Permission",
+ reason: "value length must be at most 64 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_CheckBulkPermissionsRequestItem_Permission_Pattern.MatchString(m.GetPermission()) {
+ err := CheckBulkPermissionsRequestItemValidationError{
+ field: "Permission",
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if m.GetSubject() == nil {
+ err := CheckBulkPermissionsRequestItemValidationError{
+ field: "Subject",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetSubject()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckBulkPermissionsRequestItemValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckBulkPermissionsRequestItemValidationError{
+ 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 CheckBulkPermissionsRequestItemValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetContext()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckBulkPermissionsRequestItemValidationError{
+ field: "Context",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckBulkPermissionsRequestItemValidationError{
+ 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 CheckBulkPermissionsRequestItemValidationError{
+ field: "Context",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return CheckBulkPermissionsRequestItemMultiError(errors)
+ }
+
+ return nil
+}
+
+// CheckBulkPermissionsRequestItemMultiError is an error wrapping multiple
+// validation errors returned by CheckBulkPermissionsRequestItem.ValidateAll()
+// if the designated constraints aren't met.
+type CheckBulkPermissionsRequestItemMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CheckBulkPermissionsRequestItemMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CheckBulkPermissionsRequestItemMultiError) AllErrors() []error { return m }
+
+// CheckBulkPermissionsRequestItemValidationError is the validation error
+// returned by CheckBulkPermissionsRequestItem.Validate if the designated
+// constraints aren't met.
+type CheckBulkPermissionsRequestItemValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CheckBulkPermissionsRequestItemValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CheckBulkPermissionsRequestItemValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CheckBulkPermissionsRequestItemValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CheckBulkPermissionsRequestItemValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CheckBulkPermissionsRequestItemValidationError) ErrorName() string {
+ return "CheckBulkPermissionsRequestItemValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CheckBulkPermissionsRequestItemValidationError) 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 %sCheckBulkPermissionsRequestItem.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CheckBulkPermissionsRequestItemValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CheckBulkPermissionsRequestItemValidationError{}
+
+var _CheckBulkPermissionsRequestItem_Permission_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])?$")
+
+// Validate checks the field values on CheckBulkPermissionsResponse 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 *CheckBulkPermissionsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CheckBulkPermissionsResponse 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
+// CheckBulkPermissionsResponseMultiError, or nil if none found.
+func (m *CheckBulkPermissionsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CheckBulkPermissionsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetCheckedAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckBulkPermissionsResponseValidationError{
+ field: "CheckedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckBulkPermissionsResponseValidationError{
+ field: "CheckedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCheckedAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CheckBulkPermissionsResponseValidationError{
+ field: "CheckedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetPairs() {
+ _, _ = idx, item
+
+ if item == nil {
+ err := CheckBulkPermissionsResponseValidationError{
+ field: fmt.Sprintf("Pairs[%v]", idx),
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckBulkPermissionsResponseValidationError{
+ field: fmt.Sprintf("Pairs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckBulkPermissionsResponseValidationError{
+ field: fmt.Sprintf("Pairs[%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 CheckBulkPermissionsResponseValidationError{
+ field: fmt.Sprintf("Pairs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return CheckBulkPermissionsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// CheckBulkPermissionsResponseMultiError is an error wrapping multiple
+// validation errors returned by CheckBulkPermissionsResponse.ValidateAll() if
+// the designated constraints aren't met.
+type CheckBulkPermissionsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CheckBulkPermissionsResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CheckBulkPermissionsResponseMultiError) AllErrors() []error { return m }
+
+// CheckBulkPermissionsResponseValidationError is the validation error returned
+// by CheckBulkPermissionsResponse.Validate if the designated constraints
+// aren't met.
+type CheckBulkPermissionsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CheckBulkPermissionsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CheckBulkPermissionsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CheckBulkPermissionsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CheckBulkPermissionsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CheckBulkPermissionsResponseValidationError) ErrorName() string {
+ return "CheckBulkPermissionsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CheckBulkPermissionsResponseValidationError) 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 %sCheckBulkPermissionsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CheckBulkPermissionsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CheckBulkPermissionsResponseValidationError{}
+
+// Validate checks the field values on CheckBulkPermissionsPair 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 *CheckBulkPermissionsPair) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CheckBulkPermissionsPair 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
+// CheckBulkPermissionsPairMultiError, or nil if none found.
+func (m *CheckBulkPermissionsPair) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CheckBulkPermissionsPair) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetRequest()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckBulkPermissionsPairValidationError{
+ field: "Request",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckBulkPermissionsPairValidationError{
+ field: "Request",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CheckBulkPermissionsPairValidationError{
+ field: "Request",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ switch v := m.Response.(type) {
+ case *CheckBulkPermissionsPair_Item:
+ if v == nil {
+ err := CheckBulkPermissionsPairValidationError{
+ field: "Response",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetItem()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckBulkPermissionsPairValidationError{
+ field: "Item",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckBulkPermissionsPairValidationError{
+ field: "Item",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetItem()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CheckBulkPermissionsPairValidationError{
+ field: "Item",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *CheckBulkPermissionsPair_Error:
+ if v == nil {
+ err := CheckBulkPermissionsPairValidationError{
+ field: "Response",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetError()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckBulkPermissionsPairValidationError{
+ field: "Error",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckBulkPermissionsPairValidationError{
+ field: "Error",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CheckBulkPermissionsPairValidationError{
+ field: "Error",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return CheckBulkPermissionsPairMultiError(errors)
+ }
+
+ return nil
+}
+
+// CheckBulkPermissionsPairMultiError is an error wrapping multiple validation
+// errors returned by CheckBulkPermissionsPair.ValidateAll() if the designated
+// constraints aren't met.
+type CheckBulkPermissionsPairMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CheckBulkPermissionsPairMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CheckBulkPermissionsPairMultiError) AllErrors() []error { return m }
+
+// CheckBulkPermissionsPairValidationError is the validation error returned by
+// CheckBulkPermissionsPair.Validate if the designated constraints aren't met.
+type CheckBulkPermissionsPairValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CheckBulkPermissionsPairValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CheckBulkPermissionsPairValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CheckBulkPermissionsPairValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CheckBulkPermissionsPairValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CheckBulkPermissionsPairValidationError) ErrorName() string {
+ return "CheckBulkPermissionsPairValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CheckBulkPermissionsPairValidationError) 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 %sCheckBulkPermissionsPair.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CheckBulkPermissionsPairValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CheckBulkPermissionsPairValidationError{}
+
+// Validate checks the field values on CheckBulkPermissionsResponseItem 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 *CheckBulkPermissionsResponseItem) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CheckBulkPermissionsResponseItem 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
+// CheckBulkPermissionsResponseItemMultiError, or nil if none found.
+func (m *CheckBulkPermissionsResponseItem) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CheckBulkPermissionsResponseItem) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if _, ok := _CheckBulkPermissionsResponseItem_Permissionship_NotInLookup[m.GetPermissionship()]; ok {
+ err := CheckBulkPermissionsResponseItemValidationError{
+ field: "Permissionship",
+ reason: "value must not be in list [PERMISSIONSHIP_UNSPECIFIED]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if _, ok := CheckPermissionResponse_Permissionship_name[int32(m.GetPermissionship())]; !ok {
+ err := CheckBulkPermissionsResponseItemValidationError{
+ field: "Permissionship",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPartialCaveatInfo()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckBulkPermissionsResponseItemValidationError{
+ field: "PartialCaveatInfo",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckBulkPermissionsResponseItemValidationError{
+ 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 CheckBulkPermissionsResponseItemValidationError{
+ field: "PartialCaveatInfo",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetDebugTrace()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CheckBulkPermissionsResponseItemValidationError{
+ field: "DebugTrace",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CheckBulkPermissionsResponseItemValidationError{
+ field: "DebugTrace",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetDebugTrace()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CheckBulkPermissionsResponseItemValidationError{
+ field: "DebugTrace",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return CheckBulkPermissionsResponseItemMultiError(errors)
+ }
+
+ return nil
+}
+
+// CheckBulkPermissionsResponseItemMultiError is an error wrapping multiple
+// validation errors returned by
+// CheckBulkPermissionsResponseItem.ValidateAll() if the designated
+// constraints aren't met.
+type CheckBulkPermissionsResponseItemMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CheckBulkPermissionsResponseItemMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CheckBulkPermissionsResponseItemMultiError) AllErrors() []error { return m }
+
+// CheckBulkPermissionsResponseItemValidationError is the validation error
+// returned by CheckBulkPermissionsResponseItem.Validate if the designated
+// constraints aren't met.
+type CheckBulkPermissionsResponseItemValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CheckBulkPermissionsResponseItemValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CheckBulkPermissionsResponseItemValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CheckBulkPermissionsResponseItemValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CheckBulkPermissionsResponseItemValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CheckBulkPermissionsResponseItemValidationError) ErrorName() string {
+ return "CheckBulkPermissionsResponseItemValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CheckBulkPermissionsResponseItemValidationError) 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 %sCheckBulkPermissionsResponseItem.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CheckBulkPermissionsResponseItemValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CheckBulkPermissionsResponseItemValidationError{}
+
+var _CheckBulkPermissionsResponseItem_Permissionship_NotInLookup = map[CheckPermissionResponse_Permissionship]struct{}{
+ 0: {},
+}
+
+// Validate checks the field values on ExpandPermissionTreeRequest 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 *ExpandPermissionTreeRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExpandPermissionTreeRequest 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
+// ExpandPermissionTreeRequestMultiError, or nil if none found.
+func (m *ExpandPermissionTreeRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExpandPermissionTreeRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpandPermissionTreeRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpandPermissionTreeRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpandPermissionTreeRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if m.GetResource() == nil {
+ err := ExpandPermissionTreeRequestValidationError{
+ field: "Resource",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetResource()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpandPermissionTreeRequestValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpandPermissionTreeRequestValidationError{
+ 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 ExpandPermissionTreeRequestValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(m.GetPermission()) > 64 {
+ err := ExpandPermissionTreeRequestValidationError{
+ field: "Permission",
+ reason: "value length must be at most 64 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_ExpandPermissionTreeRequest_Permission_Pattern.MatchString(m.GetPermission()) {
+ err := ExpandPermissionTreeRequestValidationError{
+ field: "Permission",
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return ExpandPermissionTreeRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExpandPermissionTreeRequestMultiError is an error wrapping multiple
+// validation errors returned by ExpandPermissionTreeRequest.ValidateAll() if
+// the designated constraints aren't met.
+type ExpandPermissionTreeRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExpandPermissionTreeRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExpandPermissionTreeRequestMultiError) AllErrors() []error { return m }
+
+// ExpandPermissionTreeRequestValidationError is the validation error returned
+// by ExpandPermissionTreeRequest.Validate if the designated constraints
+// aren't met.
+type ExpandPermissionTreeRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExpandPermissionTreeRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExpandPermissionTreeRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExpandPermissionTreeRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExpandPermissionTreeRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExpandPermissionTreeRequestValidationError) ErrorName() string {
+ return "ExpandPermissionTreeRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExpandPermissionTreeRequestValidationError) 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 %sExpandPermissionTreeRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExpandPermissionTreeRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExpandPermissionTreeRequestValidationError{}
+
+var _ExpandPermissionTreeRequest_Permission_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])?$")
+
+// Validate checks the field values on ExpandPermissionTreeResponse 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 *ExpandPermissionTreeResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExpandPermissionTreeResponse 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
+// ExpandPermissionTreeResponseMultiError, or nil if none found.
+func (m *ExpandPermissionTreeResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExpandPermissionTreeResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetExpandedAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpandPermissionTreeResponseValidationError{
+ field: "ExpandedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpandPermissionTreeResponseValidationError{
+ field: "ExpandedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetExpandedAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpandPermissionTreeResponseValidationError{
+ field: "ExpandedAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetTreeRoot()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExpandPermissionTreeResponseValidationError{
+ field: "TreeRoot",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExpandPermissionTreeResponseValidationError{
+ field: "TreeRoot",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTreeRoot()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExpandPermissionTreeResponseValidationError{
+ field: "TreeRoot",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ExpandPermissionTreeResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExpandPermissionTreeResponseMultiError is an error wrapping multiple
+// validation errors returned by ExpandPermissionTreeResponse.ValidateAll() if
+// the designated constraints aren't met.
+type ExpandPermissionTreeResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExpandPermissionTreeResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExpandPermissionTreeResponseMultiError) AllErrors() []error { return m }
+
+// ExpandPermissionTreeResponseValidationError is the validation error returned
+// by ExpandPermissionTreeResponse.Validate if the designated constraints
+// aren't met.
+type ExpandPermissionTreeResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExpandPermissionTreeResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExpandPermissionTreeResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExpandPermissionTreeResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExpandPermissionTreeResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExpandPermissionTreeResponseValidationError) ErrorName() string {
+ return "ExpandPermissionTreeResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExpandPermissionTreeResponseValidationError) 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 %sExpandPermissionTreeResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExpandPermissionTreeResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExpandPermissionTreeResponseValidationError{}
+
+// Validate checks the field values on LookupResourcesRequest 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 *LookupResourcesRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on LookupResourcesRequest 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
+// LookupResourcesRequestMultiError, or nil if none found.
+func (m *LookupResourcesRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *LookupResourcesRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LookupResourcesRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LookupResourcesRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LookupResourcesRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(m.GetResourceObjectType()) > 128 {
+ err := LookupResourcesRequestValidationError{
+ field: "ResourceObjectType",
+ reason: "value length must be at most 128 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_LookupResourcesRequest_ResourceObjectType_Pattern.MatchString(m.GetResourceObjectType()) {
+ err := LookupResourcesRequestValidationError{
+ field: "ResourceObjectType",
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(m.GetPermission()) > 64 {
+ err := LookupResourcesRequestValidationError{
+ field: "Permission",
+ reason: "value length must be at most 64 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_LookupResourcesRequest_Permission_Pattern.MatchString(m.GetPermission()) {
+ err := LookupResourcesRequestValidationError{
+ field: "Permission",
+ reason: "value does not match regex pattern \"^[a-z][a-z0-9_]{1,62}[a-z0-9]$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if m.GetSubject() == nil {
+ err := LookupResourcesRequestValidationError{
+ field: "Subject",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetSubject()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LookupResourcesRequestValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LookupResourcesRequestValidationError{
+ 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 LookupResourcesRequestValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetContext()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LookupResourcesRequestValidationError{
+ field: "Context",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LookupResourcesRequestValidationError{
+ 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 LookupResourcesRequestValidationError{
+ field: "Context",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if m.GetOptionalLimit() < 0 {
+ err := LookupResourcesRequestValidationError{
+ field: "OptionalLimit",
+ reason: "value must be greater than or equal to 0",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetOptionalCursor()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LookupResourcesRequestValidationError{
+ field: "OptionalCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LookupResourcesRequestValidationError{
+ field: "OptionalCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalCursor()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LookupResourcesRequestValidationError{
+ field: "OptionalCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return LookupResourcesRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// LookupResourcesRequestMultiError is an error wrapping multiple validation
+// errors returned by LookupResourcesRequest.ValidateAll() if the designated
+// constraints aren't met.
+type LookupResourcesRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m LookupResourcesRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m LookupResourcesRequestMultiError) AllErrors() []error { return m }
+
+// LookupResourcesRequestValidationError is the validation error returned by
+// LookupResourcesRequest.Validate if the designated constraints aren't met.
+type LookupResourcesRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e LookupResourcesRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e LookupResourcesRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e LookupResourcesRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e LookupResourcesRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e LookupResourcesRequestValidationError) ErrorName() string {
+ return "LookupResourcesRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e LookupResourcesRequestValidationError) 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 %sLookupResourcesRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = LookupResourcesRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = LookupResourcesRequestValidationError{}
+
+var _LookupResourcesRequest_ResourceObjectType_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$")
+
+var _LookupResourcesRequest_Permission_Pattern = regexp.MustCompile("^[a-z][a-z0-9_]{1,62}[a-z0-9]$")
+
+// Validate checks the field values on LookupResourcesResponse 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 *LookupResourcesResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on LookupResourcesResponse 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
+// LookupResourcesResponseMultiError, or nil if none found.
+func (m *LookupResourcesResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *LookupResourcesResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetLookedUpAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LookupResourcesResponseValidationError{
+ field: "LookedUpAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LookupResourcesResponseValidationError{
+ field: "LookedUpAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetLookedUpAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LookupResourcesResponseValidationError{
+ field: "LookedUpAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for ResourceObjectId
+
+ if _, ok := _LookupResourcesResponse_Permissionship_NotInLookup[m.GetPermissionship()]; ok {
+ err := LookupResourcesResponseValidationError{
+ field: "Permissionship",
+ reason: "value must not be in list [LOOKUP_PERMISSIONSHIP_UNSPECIFIED]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if _, ok := LookupPermissionship_name[int32(m.GetPermissionship())]; !ok {
+ err := LookupResourcesResponseValidationError{
+ field: "Permissionship",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPartialCaveatInfo()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LookupResourcesResponseValidationError{
+ field: "PartialCaveatInfo",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LookupResourcesResponseValidationError{
+ 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 LookupResourcesResponseValidationError{
+ field: "PartialCaveatInfo",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetAfterResultCursor()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LookupResourcesResponseValidationError{
+ field: "AfterResultCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LookupResourcesResponseValidationError{
+ field: "AfterResultCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetAfterResultCursor()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LookupResourcesResponseValidationError{
+ field: "AfterResultCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return LookupResourcesResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// LookupResourcesResponseMultiError is an error wrapping multiple validation
+// errors returned by LookupResourcesResponse.ValidateAll() if the designated
+// constraints aren't met.
+type LookupResourcesResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m LookupResourcesResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m LookupResourcesResponseMultiError) AllErrors() []error { return m }
+
+// LookupResourcesResponseValidationError is the validation error returned by
+// LookupResourcesResponse.Validate if the designated constraints aren't met.
+type LookupResourcesResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e LookupResourcesResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e LookupResourcesResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e LookupResourcesResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e LookupResourcesResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e LookupResourcesResponseValidationError) ErrorName() string {
+ return "LookupResourcesResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e LookupResourcesResponseValidationError) 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 %sLookupResourcesResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = LookupResourcesResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = LookupResourcesResponseValidationError{}
+
+var _LookupResourcesResponse_Permissionship_NotInLookup = map[LookupPermissionship]struct{}{
+ 0: {},
+}
+
+// Validate checks the field values on LookupSubjectsRequest 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 *LookupSubjectsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on LookupSubjectsRequest 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
+// LookupSubjectsRequestMultiError, or nil if none found.
+func (m *LookupSubjectsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *LookupSubjectsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LookupSubjectsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LookupSubjectsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LookupSubjectsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if m.GetResource() == nil {
+ err := LookupSubjectsRequestValidationError{
+ field: "Resource",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetResource()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LookupSubjectsRequestValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LookupSubjectsRequestValidationError{
+ 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 LookupSubjectsRequestValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(m.GetPermission()) > 64 {
+ err := LookupSubjectsRequestValidationError{
+ field: "Permission",
+ reason: "value length must be at most 64 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_LookupSubjectsRequest_Permission_Pattern.MatchString(m.GetPermission()) {
+ err := LookupSubjectsRequestValidationError{
+ field: "Permission",
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(m.GetSubjectObjectType()) > 128 {
+ err := LookupSubjectsRequestValidationError{
+ field: "SubjectObjectType",
+ reason: "value length must be at most 128 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_LookupSubjectsRequest_SubjectObjectType_Pattern.MatchString(m.GetSubjectObjectType()) {
+ err := LookupSubjectsRequestValidationError{
+ field: "SubjectObjectType",
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(m.GetOptionalSubjectRelation()) > 64 {
+ err := LookupSubjectsRequestValidationError{
+ field: "OptionalSubjectRelation",
+ reason: "value length must be at most 64 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_LookupSubjectsRequest_OptionalSubjectRelation_Pattern.MatchString(m.GetOptionalSubjectRelation()) {
+ err := LookupSubjectsRequestValidationError{
+ field: "OptionalSubjectRelation",
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetContext()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LookupSubjectsRequestValidationError{
+ field: "Context",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LookupSubjectsRequestValidationError{
+ 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 LookupSubjectsRequestValidationError{
+ field: "Context",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if m.GetOptionalConcreteLimit() < 0 {
+ err := LookupSubjectsRequestValidationError{
+ field: "OptionalConcreteLimit",
+ reason: "value must be greater than or equal to 0",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetOptionalCursor()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LookupSubjectsRequestValidationError{
+ field: "OptionalCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LookupSubjectsRequestValidationError{
+ field: "OptionalCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalCursor()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LookupSubjectsRequestValidationError{
+ field: "OptionalCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for WildcardOption
+
+ if len(errors) > 0 {
+ return LookupSubjectsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// LookupSubjectsRequestMultiError is an error wrapping multiple validation
+// errors returned by LookupSubjectsRequest.ValidateAll() if the designated
+// constraints aren't met.
+type LookupSubjectsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m LookupSubjectsRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m LookupSubjectsRequestMultiError) AllErrors() []error { return m }
+
+// LookupSubjectsRequestValidationError is the validation error returned by
+// LookupSubjectsRequest.Validate if the designated constraints aren't met.
+type LookupSubjectsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e LookupSubjectsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e LookupSubjectsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e LookupSubjectsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e LookupSubjectsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e LookupSubjectsRequestValidationError) ErrorName() string {
+ return "LookupSubjectsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e LookupSubjectsRequestValidationError) 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 %sLookupSubjectsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = LookupSubjectsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = LookupSubjectsRequestValidationError{}
+
+var _LookupSubjectsRequest_Permission_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])?$")
+
+var _LookupSubjectsRequest_SubjectObjectType_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$")
+
+var _LookupSubjectsRequest_OptionalSubjectRelation_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])?$")
+
+// Validate checks the field values on LookupSubjectsResponse 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 *LookupSubjectsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on LookupSubjectsResponse 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
+// LookupSubjectsResponseMultiError, or nil if none found.
+func (m *LookupSubjectsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *LookupSubjectsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetLookedUpAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LookupSubjectsResponseValidationError{
+ field: "LookedUpAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LookupSubjectsResponseValidationError{
+ field: "LookedUpAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetLookedUpAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LookupSubjectsResponseValidationError{
+ field: "LookedUpAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for SubjectObjectId
+
+ if _, ok := _LookupSubjectsResponse_Permissionship_NotInLookup[m.GetPermissionship()]; ok {
+ err := LookupSubjectsResponseValidationError{
+ field: "Permissionship",
+ reason: "value must not be in list [LOOKUP_PERMISSIONSHIP_UNSPECIFIED]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if _, ok := LookupPermissionship_name[int32(m.GetPermissionship())]; !ok {
+ err := LookupSubjectsResponseValidationError{
+ field: "Permissionship",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPartialCaveatInfo()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LookupSubjectsResponseValidationError{
+ field: "PartialCaveatInfo",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LookupSubjectsResponseValidationError{
+ 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 LookupSubjectsResponseValidationError{
+ field: "PartialCaveatInfo",
+ 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, LookupSubjectsResponseValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LookupSubjectsResponseValidationError{
+ 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 LookupSubjectsResponseValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetExcludedSubjects() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LookupSubjectsResponseValidationError{
+ field: fmt.Sprintf("ExcludedSubjects[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LookupSubjectsResponseValidationError{
+ field: fmt.Sprintf("ExcludedSubjects[%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 LookupSubjectsResponseValidationError{
+ field: fmt.Sprintf("ExcludedSubjects[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetAfterResultCursor()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LookupSubjectsResponseValidationError{
+ field: "AfterResultCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LookupSubjectsResponseValidationError{
+ field: "AfterResultCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetAfterResultCursor()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LookupSubjectsResponseValidationError{
+ field: "AfterResultCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return LookupSubjectsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// LookupSubjectsResponseMultiError is an error wrapping multiple validation
+// errors returned by LookupSubjectsResponse.ValidateAll() if the designated
+// constraints aren't met.
+type LookupSubjectsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m LookupSubjectsResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m LookupSubjectsResponseMultiError) AllErrors() []error { return m }
+
+// LookupSubjectsResponseValidationError is the validation error returned by
+// LookupSubjectsResponse.Validate if the designated constraints aren't met.
+type LookupSubjectsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e LookupSubjectsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e LookupSubjectsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e LookupSubjectsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e LookupSubjectsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e LookupSubjectsResponseValidationError) ErrorName() string {
+ return "LookupSubjectsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e LookupSubjectsResponseValidationError) 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 %sLookupSubjectsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = LookupSubjectsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = LookupSubjectsResponseValidationError{}
+
+var _LookupSubjectsResponse_Permissionship_NotInLookup = map[LookupPermissionship]struct{}{
+ 0: {},
+}
+
+// Validate checks the field values on ResolvedSubject 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 *ResolvedSubject) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ResolvedSubject 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
+// ResolvedSubjectMultiError, or nil if none found.
+func (m *ResolvedSubject) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ResolvedSubject) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for SubjectObjectId
+
+ if _, ok := _ResolvedSubject_Permissionship_NotInLookup[m.GetPermissionship()]; ok {
+ err := ResolvedSubjectValidationError{
+ field: "Permissionship",
+ reason: "value must not be in list [LOOKUP_PERMISSIONSHIP_UNSPECIFIED]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if _, ok := LookupPermissionship_name[int32(m.GetPermissionship())]; !ok {
+ err := ResolvedSubjectValidationError{
+ field: "Permissionship",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPartialCaveatInfo()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResolvedSubjectValidationError{
+ field: "PartialCaveatInfo",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResolvedSubjectValidationError{
+ 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 ResolvedSubjectValidationError{
+ field: "PartialCaveatInfo",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ResolvedSubjectMultiError(errors)
+ }
+
+ return nil
+}
+
+// ResolvedSubjectMultiError is an error wrapping multiple validation errors
+// returned by ResolvedSubject.ValidateAll() if the designated constraints
+// aren't met.
+type ResolvedSubjectMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ResolvedSubjectMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ResolvedSubjectMultiError) AllErrors() []error { return m }
+
+// ResolvedSubjectValidationError is the validation error returned by
+// ResolvedSubject.Validate if the designated constraints aren't met.
+type ResolvedSubjectValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ResolvedSubjectValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ResolvedSubjectValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ResolvedSubjectValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ResolvedSubjectValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ResolvedSubjectValidationError) ErrorName() string { return "ResolvedSubjectValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ResolvedSubjectValidationError) 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 %sResolvedSubject.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ResolvedSubjectValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ResolvedSubjectValidationError{}
+
+var _ResolvedSubject_Permissionship_NotInLookup = map[LookupPermissionship]struct{}{
+ 0: {},
+}
+
+// Validate checks the field values on ImportBulkRelationshipsRequest 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 *ImportBulkRelationshipsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ImportBulkRelationshipsRequest 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
+// ImportBulkRelationshipsRequestMultiError, or nil if none found.
+func (m *ImportBulkRelationshipsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ImportBulkRelationshipsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetRelationships() {
+ _, _ = idx, item
+
+ if item == nil {
+ err := ImportBulkRelationshipsRequestValidationError{
+ field: fmt.Sprintf("Relationships[%v]", idx),
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ImportBulkRelationshipsRequestValidationError{
+ 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, ImportBulkRelationshipsRequestValidationError{
+ 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 ImportBulkRelationshipsRequestValidationError{
+ field: fmt.Sprintf("Relationships[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ImportBulkRelationshipsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ImportBulkRelationshipsRequestMultiError is an error wrapping multiple
+// validation errors returned by ImportBulkRelationshipsRequest.ValidateAll()
+// if the designated constraints aren't met.
+type ImportBulkRelationshipsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ImportBulkRelationshipsRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ImportBulkRelationshipsRequestMultiError) AllErrors() []error { return m }
+
+// ImportBulkRelationshipsRequestValidationError is the validation error
+// returned by ImportBulkRelationshipsRequest.Validate if the designated
+// constraints aren't met.
+type ImportBulkRelationshipsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ImportBulkRelationshipsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ImportBulkRelationshipsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ImportBulkRelationshipsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ImportBulkRelationshipsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ImportBulkRelationshipsRequestValidationError) ErrorName() string {
+ return "ImportBulkRelationshipsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ImportBulkRelationshipsRequestValidationError) 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 %sImportBulkRelationshipsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ImportBulkRelationshipsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ImportBulkRelationshipsRequestValidationError{}
+
+// Validate checks the field values on ImportBulkRelationshipsResponse 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 *ImportBulkRelationshipsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ImportBulkRelationshipsResponse 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
+// ImportBulkRelationshipsResponseMultiError, or nil if none found.
+func (m *ImportBulkRelationshipsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ImportBulkRelationshipsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for NumLoaded
+
+ if len(errors) > 0 {
+ return ImportBulkRelationshipsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ImportBulkRelationshipsResponseMultiError is an error wrapping multiple
+// validation errors returned by ImportBulkRelationshipsResponse.ValidateAll()
+// if the designated constraints aren't met.
+type ImportBulkRelationshipsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ImportBulkRelationshipsResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ImportBulkRelationshipsResponseMultiError) AllErrors() []error { return m }
+
+// ImportBulkRelationshipsResponseValidationError is the validation error
+// returned by ImportBulkRelationshipsResponse.Validate if the designated
+// constraints aren't met.
+type ImportBulkRelationshipsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ImportBulkRelationshipsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ImportBulkRelationshipsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ImportBulkRelationshipsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ImportBulkRelationshipsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ImportBulkRelationshipsResponseValidationError) ErrorName() string {
+ return "ImportBulkRelationshipsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ImportBulkRelationshipsResponseValidationError) 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 %sImportBulkRelationshipsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ImportBulkRelationshipsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ImportBulkRelationshipsResponseValidationError{}
+
+// Validate checks the field values on ExportBulkRelationshipsRequest 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 *ExportBulkRelationshipsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExportBulkRelationshipsRequest 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
+// ExportBulkRelationshipsRequestMultiError, or nil if none found.
+func (m *ExportBulkRelationshipsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExportBulkRelationshipsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExportBulkRelationshipsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExportBulkRelationshipsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExportBulkRelationshipsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if m.GetOptionalLimit() < 0 {
+ err := ExportBulkRelationshipsRequestValidationError{
+ field: "OptionalLimit",
+ reason: "value must be greater than or equal to 0",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetOptionalCursor()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExportBulkRelationshipsRequestValidationError{
+ field: "OptionalCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExportBulkRelationshipsRequestValidationError{
+ field: "OptionalCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalCursor()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExportBulkRelationshipsRequestValidationError{
+ field: "OptionalCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetOptionalRelationshipFilter()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExportBulkRelationshipsRequestValidationError{
+ field: "OptionalRelationshipFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExportBulkRelationshipsRequestValidationError{
+ field: "OptionalRelationshipFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalRelationshipFilter()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExportBulkRelationshipsRequestValidationError{
+ field: "OptionalRelationshipFilter",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ExportBulkRelationshipsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExportBulkRelationshipsRequestMultiError is an error wrapping multiple
+// validation errors returned by ExportBulkRelationshipsRequest.ValidateAll()
+// if the designated constraints aren't met.
+type ExportBulkRelationshipsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExportBulkRelationshipsRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExportBulkRelationshipsRequestMultiError) AllErrors() []error { return m }
+
+// ExportBulkRelationshipsRequestValidationError is the validation error
+// returned by ExportBulkRelationshipsRequest.Validate if the designated
+// constraints aren't met.
+type ExportBulkRelationshipsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExportBulkRelationshipsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExportBulkRelationshipsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExportBulkRelationshipsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExportBulkRelationshipsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExportBulkRelationshipsRequestValidationError) ErrorName() string {
+ return "ExportBulkRelationshipsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExportBulkRelationshipsRequestValidationError) 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 %sExportBulkRelationshipsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExportBulkRelationshipsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExportBulkRelationshipsRequestValidationError{}
+
+// Validate checks the field values on ExportBulkRelationshipsResponse 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 *ExportBulkRelationshipsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ExportBulkRelationshipsResponse 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
+// ExportBulkRelationshipsResponseMultiError, or nil if none found.
+func (m *ExportBulkRelationshipsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ExportBulkRelationshipsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetAfterResultCursor()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ExportBulkRelationshipsResponseValidationError{
+ field: "AfterResultCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ExportBulkRelationshipsResponseValidationError{
+ field: "AfterResultCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetAfterResultCursor()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ExportBulkRelationshipsResponseValidationError{
+ field: "AfterResultCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ 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, ExportBulkRelationshipsResponseValidationError{
+ 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, ExportBulkRelationshipsResponseValidationError{
+ 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 ExportBulkRelationshipsResponseValidationError{
+ field: fmt.Sprintf("Relationships[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ExportBulkRelationshipsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ExportBulkRelationshipsResponseMultiError is an error wrapping multiple
+// validation errors returned by ExportBulkRelationshipsResponse.ValidateAll()
+// if the designated constraints aren't met.
+type ExportBulkRelationshipsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ExportBulkRelationshipsResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ExportBulkRelationshipsResponseMultiError) AllErrors() []error { return m }
+
+// ExportBulkRelationshipsResponseValidationError is the validation error
+// returned by ExportBulkRelationshipsResponse.Validate if the designated
+// constraints aren't met.
+type ExportBulkRelationshipsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ExportBulkRelationshipsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ExportBulkRelationshipsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ExportBulkRelationshipsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ExportBulkRelationshipsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ExportBulkRelationshipsResponseValidationError) ErrorName() string {
+ return "ExportBulkRelationshipsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ExportBulkRelationshipsResponseValidationError) 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 %sExportBulkRelationshipsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ExportBulkRelationshipsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ExportBulkRelationshipsResponseValidationError{}
+
+// Validate checks the field values on SubjectFilter_RelationFilter 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 *SubjectFilter_RelationFilter) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on SubjectFilter_RelationFilter 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
+// SubjectFilter_RelationFilterMultiError, or nil if none found.
+func (m *SubjectFilter_RelationFilter) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SubjectFilter_RelationFilter) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetRelation()) > 64 {
+ err := SubjectFilter_RelationFilterValidationError{
+ field: "Relation",
+ reason: "value length must be at most 64 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_SubjectFilter_RelationFilter_Relation_Pattern.MatchString(m.GetRelation()) {
+ err := SubjectFilter_RelationFilterValidationError{
+ field: "Relation",
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])?$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return SubjectFilter_RelationFilterMultiError(errors)
+ }
+
+ return nil
+}
+
+// SubjectFilter_RelationFilterMultiError is an error wrapping multiple
+// validation errors returned by SubjectFilter_RelationFilter.ValidateAll() if
+// the designated constraints aren't met.
+type SubjectFilter_RelationFilterMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SubjectFilter_RelationFilterMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SubjectFilter_RelationFilterMultiError) AllErrors() []error { return m }
+
+// SubjectFilter_RelationFilterValidationError is the validation error returned
+// by SubjectFilter_RelationFilter.Validate if the designated constraints
+// aren't met.
+type SubjectFilter_RelationFilterValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SubjectFilter_RelationFilterValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SubjectFilter_RelationFilterValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e SubjectFilter_RelationFilterValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SubjectFilter_RelationFilterValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SubjectFilter_RelationFilterValidationError) ErrorName() string {
+ return "SubjectFilter_RelationFilterValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e SubjectFilter_RelationFilterValidationError) 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 %sSubjectFilter_RelationFilter.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SubjectFilter_RelationFilterValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SubjectFilter_RelationFilterValidationError{}
+
+var _SubjectFilter_RelationFilter_Relation_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])?$")
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service_grpc.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service_grpc.pb.go
new file mode 100644
index 0000000..3d630de
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service_grpc.pb.go
@@ -0,0 +1,535 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.5.1
+// - protoc (unknown)
+// source: authzed/api/v1/permission_service.proto
+
+package v1
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ PermissionsService_ReadRelationships_FullMethodName = "/authzed.api.v1.PermissionsService/ReadRelationships"
+ PermissionsService_WriteRelationships_FullMethodName = "/authzed.api.v1.PermissionsService/WriteRelationships"
+ PermissionsService_DeleteRelationships_FullMethodName = "/authzed.api.v1.PermissionsService/DeleteRelationships"
+ PermissionsService_CheckPermission_FullMethodName = "/authzed.api.v1.PermissionsService/CheckPermission"
+ PermissionsService_CheckBulkPermissions_FullMethodName = "/authzed.api.v1.PermissionsService/CheckBulkPermissions"
+ PermissionsService_ExpandPermissionTree_FullMethodName = "/authzed.api.v1.PermissionsService/ExpandPermissionTree"
+ PermissionsService_LookupResources_FullMethodName = "/authzed.api.v1.PermissionsService/LookupResources"
+ PermissionsService_LookupSubjects_FullMethodName = "/authzed.api.v1.PermissionsService/LookupSubjects"
+ PermissionsService_ImportBulkRelationships_FullMethodName = "/authzed.api.v1.PermissionsService/ImportBulkRelationships"
+ PermissionsService_ExportBulkRelationships_FullMethodName = "/authzed.api.v1.PermissionsService/ExportBulkRelationships"
+)
+
+// PermissionsServiceClient is the client API for PermissionsService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+//
+// PermissionsService implements a set of RPCs that perform operations on
+// relationships and permissions.
+type PermissionsServiceClient interface {
+ // ReadRelationships reads a set of the relationships matching one or more
+ // filters.
+ ReadRelationships(ctx context.Context, in *ReadRelationshipsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ReadRelationshipsResponse], error)
+ // WriteRelationships atomically writes and/or deletes a set of specified
+ // relationships. An optional set of preconditions can be provided that must
+ // be satisfied for the operation to commit.
+ WriteRelationships(ctx context.Context, in *WriteRelationshipsRequest, opts ...grpc.CallOption) (*WriteRelationshipsResponse, error)
+ // DeleteRelationships atomically bulk deletes all relationships matching the
+ // provided filter. If no relationships match, none will be deleted and the
+ // operation will succeed. An optional set of preconditions can be provided that must
+ // be satisfied for the operation to commit.
+ DeleteRelationships(ctx context.Context, in *DeleteRelationshipsRequest, opts ...grpc.CallOption) (*DeleteRelationshipsResponse, error)
+ // CheckPermission determines for a given resource whether a subject computes
+ // to having a permission or is a direct member of a particular relation.
+ CheckPermission(ctx context.Context, in *CheckPermissionRequest, opts ...grpc.CallOption) (*CheckPermissionResponse, error)
+ // CheckBulkPermissions evaluates the given list of permission checks
+ // and returns the list of results.
+ CheckBulkPermissions(ctx context.Context, in *CheckBulkPermissionsRequest, opts ...grpc.CallOption) (*CheckBulkPermissionsResponse, error)
+ // ExpandPermissionTree reveals the graph structure for a resource's
+ // permission or relation. This RPC does not recurse infinitely deep and may
+ // require multiple calls to fully unnest a deeply nested graph.
+ ExpandPermissionTree(ctx context.Context, in *ExpandPermissionTreeRequest, opts ...grpc.CallOption) (*ExpandPermissionTreeResponse, error)
+ // LookupResources returns all the resources of a given type that a subject
+ // can access whether via a computed permission or relation membership.
+ LookupResources(ctx context.Context, in *LookupResourcesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LookupResourcesResponse], error)
+ // LookupSubjects returns all the subjects of a given type that
+ // have access whether via a computed permission or relation membership.
+ LookupSubjects(ctx context.Context, in *LookupSubjectsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LookupSubjectsResponse], error)
+ // ImportBulkRelationships is a faster path to writing a large number of
+ // relationships at once. It is both batched and streaming. For maximum
+ // performance, the caller should attempt to write relationships in as close
+ // to relationship sort order as possible: (resource.object_type,
+ // resource.object_id, relation, subject.object.object_type,
+ // subject.object.object_id, subject.optional_relation). All relationships
+ // written are done so under a single transaction.
+ ImportBulkRelationships(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[ImportBulkRelationshipsRequest, ImportBulkRelationshipsResponse], error)
+ // ExportBulkRelationships is the fastest path available to exporting
+ // relationships from the server. It is resumable, and will return results
+ // in an order determined by the server.
+ ExportBulkRelationships(ctx context.Context, in *ExportBulkRelationshipsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ExportBulkRelationshipsResponse], error)
+}
+
+type permissionsServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewPermissionsServiceClient(cc grpc.ClientConnInterface) PermissionsServiceClient {
+ return &permissionsServiceClient{cc}
+}
+
+func (c *permissionsServiceClient) ReadRelationships(ctx context.Context, in *ReadRelationshipsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ReadRelationshipsResponse], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &PermissionsService_ServiceDesc.Streams[0], PermissionsService_ReadRelationships_FullMethodName, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &grpc.GenericClientStream[ReadRelationshipsRequest, ReadRelationshipsResponse]{ClientStream: stream}
+ if err := x.ClientStream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type PermissionsService_ReadRelationshipsClient = grpc.ServerStreamingClient[ReadRelationshipsResponse]
+
+func (c *permissionsServiceClient) WriteRelationships(ctx context.Context, in *WriteRelationshipsRequest, opts ...grpc.CallOption) (*WriteRelationshipsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(WriteRelationshipsResponse)
+ err := c.cc.Invoke(ctx, PermissionsService_WriteRelationships_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *permissionsServiceClient) DeleteRelationships(ctx context.Context, in *DeleteRelationshipsRequest, opts ...grpc.CallOption) (*DeleteRelationshipsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(DeleteRelationshipsResponse)
+ err := c.cc.Invoke(ctx, PermissionsService_DeleteRelationships_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *permissionsServiceClient) CheckPermission(ctx context.Context, in *CheckPermissionRequest, opts ...grpc.CallOption) (*CheckPermissionResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(CheckPermissionResponse)
+ err := c.cc.Invoke(ctx, PermissionsService_CheckPermission_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *permissionsServiceClient) CheckBulkPermissions(ctx context.Context, in *CheckBulkPermissionsRequest, opts ...grpc.CallOption) (*CheckBulkPermissionsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(CheckBulkPermissionsResponse)
+ err := c.cc.Invoke(ctx, PermissionsService_CheckBulkPermissions_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *permissionsServiceClient) ExpandPermissionTree(ctx context.Context, in *ExpandPermissionTreeRequest, opts ...grpc.CallOption) (*ExpandPermissionTreeResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ExpandPermissionTreeResponse)
+ err := c.cc.Invoke(ctx, PermissionsService_ExpandPermissionTree_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *permissionsServiceClient) LookupResources(ctx context.Context, in *LookupResourcesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LookupResourcesResponse], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &PermissionsService_ServiceDesc.Streams[1], PermissionsService_LookupResources_FullMethodName, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &grpc.GenericClientStream[LookupResourcesRequest, LookupResourcesResponse]{ClientStream: stream}
+ if err := x.ClientStream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type PermissionsService_LookupResourcesClient = grpc.ServerStreamingClient[LookupResourcesResponse]
+
+func (c *permissionsServiceClient) LookupSubjects(ctx context.Context, in *LookupSubjectsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LookupSubjectsResponse], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &PermissionsService_ServiceDesc.Streams[2], PermissionsService_LookupSubjects_FullMethodName, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &grpc.GenericClientStream[LookupSubjectsRequest, LookupSubjectsResponse]{ClientStream: stream}
+ if err := x.ClientStream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type PermissionsService_LookupSubjectsClient = grpc.ServerStreamingClient[LookupSubjectsResponse]
+
+func (c *permissionsServiceClient) ImportBulkRelationships(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[ImportBulkRelationshipsRequest, ImportBulkRelationshipsResponse], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &PermissionsService_ServiceDesc.Streams[3], PermissionsService_ImportBulkRelationships_FullMethodName, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &grpc.GenericClientStream[ImportBulkRelationshipsRequest, ImportBulkRelationshipsResponse]{ClientStream: stream}
+ return x, nil
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type PermissionsService_ImportBulkRelationshipsClient = grpc.ClientStreamingClient[ImportBulkRelationshipsRequest, ImportBulkRelationshipsResponse]
+
+func (c *permissionsServiceClient) ExportBulkRelationships(ctx context.Context, in *ExportBulkRelationshipsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ExportBulkRelationshipsResponse], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &PermissionsService_ServiceDesc.Streams[4], PermissionsService_ExportBulkRelationships_FullMethodName, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &grpc.GenericClientStream[ExportBulkRelationshipsRequest, ExportBulkRelationshipsResponse]{ClientStream: stream}
+ if err := x.ClientStream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type PermissionsService_ExportBulkRelationshipsClient = grpc.ServerStreamingClient[ExportBulkRelationshipsResponse]
+
+// PermissionsServiceServer is the server API for PermissionsService service.
+// All implementations must embed UnimplementedPermissionsServiceServer
+// for forward compatibility.
+//
+// PermissionsService implements a set of RPCs that perform operations on
+// relationships and permissions.
+type PermissionsServiceServer interface {
+ // ReadRelationships reads a set of the relationships matching one or more
+ // filters.
+ ReadRelationships(*ReadRelationshipsRequest, grpc.ServerStreamingServer[ReadRelationshipsResponse]) error
+ // WriteRelationships atomically writes and/or deletes a set of specified
+ // relationships. An optional set of preconditions can be provided that must
+ // be satisfied for the operation to commit.
+ WriteRelationships(context.Context, *WriteRelationshipsRequest) (*WriteRelationshipsResponse, error)
+ // DeleteRelationships atomically bulk deletes all relationships matching the
+ // provided filter. If no relationships match, none will be deleted and the
+ // operation will succeed. An optional set of preconditions can be provided that must
+ // be satisfied for the operation to commit.
+ DeleteRelationships(context.Context, *DeleteRelationshipsRequest) (*DeleteRelationshipsResponse, error)
+ // CheckPermission determines for a given resource whether a subject computes
+ // to having a permission or is a direct member of a particular relation.
+ CheckPermission(context.Context, *CheckPermissionRequest) (*CheckPermissionResponse, error)
+ // CheckBulkPermissions evaluates the given list of permission checks
+ // and returns the list of results.
+ CheckBulkPermissions(context.Context, *CheckBulkPermissionsRequest) (*CheckBulkPermissionsResponse, error)
+ // ExpandPermissionTree reveals the graph structure for a resource's
+ // permission or relation. This RPC does not recurse infinitely deep and may
+ // require multiple calls to fully unnest a deeply nested graph.
+ ExpandPermissionTree(context.Context, *ExpandPermissionTreeRequest) (*ExpandPermissionTreeResponse, error)
+ // LookupResources returns all the resources of a given type that a subject
+ // can access whether via a computed permission or relation membership.
+ LookupResources(*LookupResourcesRequest, grpc.ServerStreamingServer[LookupResourcesResponse]) error
+ // LookupSubjects returns all the subjects of a given type that
+ // have access whether via a computed permission or relation membership.
+ LookupSubjects(*LookupSubjectsRequest, grpc.ServerStreamingServer[LookupSubjectsResponse]) error
+ // ImportBulkRelationships is a faster path to writing a large number of
+ // relationships at once. It is both batched and streaming. For maximum
+ // performance, the caller should attempt to write relationships in as close
+ // to relationship sort order as possible: (resource.object_type,
+ // resource.object_id, relation, subject.object.object_type,
+ // subject.object.object_id, subject.optional_relation). All relationships
+ // written are done so under a single transaction.
+ ImportBulkRelationships(grpc.ClientStreamingServer[ImportBulkRelationshipsRequest, ImportBulkRelationshipsResponse]) error
+ // ExportBulkRelationships is the fastest path available to exporting
+ // relationships from the server. It is resumable, and will return results
+ // in an order determined by the server.
+ ExportBulkRelationships(*ExportBulkRelationshipsRequest, grpc.ServerStreamingServer[ExportBulkRelationshipsResponse]) error
+ mustEmbedUnimplementedPermissionsServiceServer()
+}
+
+// UnimplementedPermissionsServiceServer must be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedPermissionsServiceServer struct{}
+
+func (UnimplementedPermissionsServiceServer) ReadRelationships(*ReadRelationshipsRequest, grpc.ServerStreamingServer[ReadRelationshipsResponse]) error {
+ return status.Errorf(codes.Unimplemented, "method ReadRelationships not implemented")
+}
+func (UnimplementedPermissionsServiceServer) WriteRelationships(context.Context, *WriteRelationshipsRequest) (*WriteRelationshipsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method WriteRelationships not implemented")
+}
+func (UnimplementedPermissionsServiceServer) DeleteRelationships(context.Context, *DeleteRelationshipsRequest) (*DeleteRelationshipsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DeleteRelationships not implemented")
+}
+func (UnimplementedPermissionsServiceServer) CheckPermission(context.Context, *CheckPermissionRequest) (*CheckPermissionResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CheckPermission not implemented")
+}
+func (UnimplementedPermissionsServiceServer) CheckBulkPermissions(context.Context, *CheckBulkPermissionsRequest) (*CheckBulkPermissionsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CheckBulkPermissions not implemented")
+}
+func (UnimplementedPermissionsServiceServer) ExpandPermissionTree(context.Context, *ExpandPermissionTreeRequest) (*ExpandPermissionTreeResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ExpandPermissionTree not implemented")
+}
+func (UnimplementedPermissionsServiceServer) LookupResources(*LookupResourcesRequest, grpc.ServerStreamingServer[LookupResourcesResponse]) error {
+ return status.Errorf(codes.Unimplemented, "method LookupResources not implemented")
+}
+func (UnimplementedPermissionsServiceServer) LookupSubjects(*LookupSubjectsRequest, grpc.ServerStreamingServer[LookupSubjectsResponse]) error {
+ return status.Errorf(codes.Unimplemented, "method LookupSubjects not implemented")
+}
+func (UnimplementedPermissionsServiceServer) ImportBulkRelationships(grpc.ClientStreamingServer[ImportBulkRelationshipsRequest, ImportBulkRelationshipsResponse]) error {
+ return status.Errorf(codes.Unimplemented, "method ImportBulkRelationships not implemented")
+}
+func (UnimplementedPermissionsServiceServer) ExportBulkRelationships(*ExportBulkRelationshipsRequest, grpc.ServerStreamingServer[ExportBulkRelationshipsResponse]) error {
+ return status.Errorf(codes.Unimplemented, "method ExportBulkRelationships not implemented")
+}
+func (UnimplementedPermissionsServiceServer) mustEmbedUnimplementedPermissionsServiceServer() {}
+func (UnimplementedPermissionsServiceServer) testEmbeddedByValue() {}
+
+// UnsafePermissionsServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to PermissionsServiceServer will
+// result in compilation errors.
+type UnsafePermissionsServiceServer interface {
+ mustEmbedUnimplementedPermissionsServiceServer()
+}
+
+func RegisterPermissionsServiceServer(s grpc.ServiceRegistrar, srv PermissionsServiceServer) {
+ // If the following call pancis, it indicates UnimplementedPermissionsServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
+ s.RegisterService(&PermissionsService_ServiceDesc, srv)
+}
+
+func _PermissionsService_ReadRelationships_Handler(srv interface{}, stream grpc.ServerStream) error {
+ m := new(ReadRelationshipsRequest)
+ if err := stream.RecvMsg(m); err != nil {
+ return err
+ }
+ return srv.(PermissionsServiceServer).ReadRelationships(m, &grpc.GenericServerStream[ReadRelationshipsRequest, ReadRelationshipsResponse]{ServerStream: stream})
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type PermissionsService_ReadRelationshipsServer = grpc.ServerStreamingServer[ReadRelationshipsResponse]
+
+func _PermissionsService_WriteRelationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(WriteRelationshipsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(PermissionsServiceServer).WriteRelationships(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: PermissionsService_WriteRelationships_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(PermissionsServiceServer).WriteRelationships(ctx, req.(*WriteRelationshipsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _PermissionsService_DeleteRelationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DeleteRelationshipsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(PermissionsServiceServer).DeleteRelationships(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: PermissionsService_DeleteRelationships_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(PermissionsServiceServer).DeleteRelationships(ctx, req.(*DeleteRelationshipsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _PermissionsService_CheckPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CheckPermissionRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(PermissionsServiceServer).CheckPermission(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: PermissionsService_CheckPermission_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(PermissionsServiceServer).CheckPermission(ctx, req.(*CheckPermissionRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _PermissionsService_CheckBulkPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CheckBulkPermissionsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(PermissionsServiceServer).CheckBulkPermissions(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: PermissionsService_CheckBulkPermissions_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(PermissionsServiceServer).CheckBulkPermissions(ctx, req.(*CheckBulkPermissionsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _PermissionsService_ExpandPermissionTree_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ExpandPermissionTreeRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(PermissionsServiceServer).ExpandPermissionTree(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: PermissionsService_ExpandPermissionTree_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(PermissionsServiceServer).ExpandPermissionTree(ctx, req.(*ExpandPermissionTreeRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _PermissionsService_LookupResources_Handler(srv interface{}, stream grpc.ServerStream) error {
+ m := new(LookupResourcesRequest)
+ if err := stream.RecvMsg(m); err != nil {
+ return err
+ }
+ return srv.(PermissionsServiceServer).LookupResources(m, &grpc.GenericServerStream[LookupResourcesRequest, LookupResourcesResponse]{ServerStream: stream})
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type PermissionsService_LookupResourcesServer = grpc.ServerStreamingServer[LookupResourcesResponse]
+
+func _PermissionsService_LookupSubjects_Handler(srv interface{}, stream grpc.ServerStream) error {
+ m := new(LookupSubjectsRequest)
+ if err := stream.RecvMsg(m); err != nil {
+ return err
+ }
+ return srv.(PermissionsServiceServer).LookupSubjects(m, &grpc.GenericServerStream[LookupSubjectsRequest, LookupSubjectsResponse]{ServerStream: stream})
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type PermissionsService_LookupSubjectsServer = grpc.ServerStreamingServer[LookupSubjectsResponse]
+
+func _PermissionsService_ImportBulkRelationships_Handler(srv interface{}, stream grpc.ServerStream) error {
+ return srv.(PermissionsServiceServer).ImportBulkRelationships(&grpc.GenericServerStream[ImportBulkRelationshipsRequest, ImportBulkRelationshipsResponse]{ServerStream: stream})
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type PermissionsService_ImportBulkRelationshipsServer = grpc.ClientStreamingServer[ImportBulkRelationshipsRequest, ImportBulkRelationshipsResponse]
+
+func _PermissionsService_ExportBulkRelationships_Handler(srv interface{}, stream grpc.ServerStream) error {
+ m := new(ExportBulkRelationshipsRequest)
+ if err := stream.RecvMsg(m); err != nil {
+ return err
+ }
+ return srv.(PermissionsServiceServer).ExportBulkRelationships(m, &grpc.GenericServerStream[ExportBulkRelationshipsRequest, ExportBulkRelationshipsResponse]{ServerStream: stream})
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type PermissionsService_ExportBulkRelationshipsServer = grpc.ServerStreamingServer[ExportBulkRelationshipsResponse]
+
+// PermissionsService_ServiceDesc is the grpc.ServiceDesc for PermissionsService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var PermissionsService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "authzed.api.v1.PermissionsService",
+ HandlerType: (*PermissionsServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "WriteRelationships",
+ Handler: _PermissionsService_WriteRelationships_Handler,
+ },
+ {
+ MethodName: "DeleteRelationships",
+ Handler: _PermissionsService_DeleteRelationships_Handler,
+ },
+ {
+ MethodName: "CheckPermission",
+ Handler: _PermissionsService_CheckPermission_Handler,
+ },
+ {
+ MethodName: "CheckBulkPermissions",
+ Handler: _PermissionsService_CheckBulkPermissions_Handler,
+ },
+ {
+ MethodName: "ExpandPermissionTree",
+ Handler: _PermissionsService_ExpandPermissionTree_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "ReadRelationships",
+ Handler: _PermissionsService_ReadRelationships_Handler,
+ ServerStreams: true,
+ },
+ {
+ StreamName: "LookupResources",
+ Handler: _PermissionsService_LookupResources_Handler,
+ ServerStreams: true,
+ },
+ {
+ StreamName: "LookupSubjects",
+ Handler: _PermissionsService_LookupSubjects_Handler,
+ ServerStreams: true,
+ },
+ {
+ StreamName: "ImportBulkRelationships",
+ Handler: _PermissionsService_ImportBulkRelationships_Handler,
+ ClientStreams: true,
+ },
+ {
+ StreamName: "ExportBulkRelationships",
+ Handler: _PermissionsService_ExportBulkRelationships_Handler,
+ ServerStreams: true,
+ },
+ },
+ Metadata: "authzed/api/v1/permission_service.proto",
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service_vtproto.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service_vtproto.pb.go
new file mode 100644
index 0000000..15f71ed
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/permission_service_vtproto.pb.go
@@ -0,0 +1,9383 @@
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// protoc-gen-go-vtproto version: v0.6.1-0.20240319094008-0393e58bdf10
+// source: authzed/api/v1/permission_service.proto
+
+package v1
+
+import (
+ fmt "fmt"
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ structpb1 "github.com/planetscale/vtprotobuf/types/known/structpb"
+ timestamppb1 "github.com/planetscale/vtprotobuf/types/known/timestamppb"
+ status "google.golang.org/genproto/googleapis/rpc/status"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ io "io"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *Consistency) CloneVT() *Consistency {
+ if m == nil {
+ return (*Consistency)(nil)
+ }
+ r := new(Consistency)
+ if m.Requirement != nil {
+ r.Requirement = m.Requirement.(interface {
+ CloneVT() isConsistency_Requirement
+ }).CloneVT()
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *Consistency) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *Consistency_MinimizeLatency) CloneVT() isConsistency_Requirement {
+ if m == nil {
+ return (*Consistency_MinimizeLatency)(nil)
+ }
+ r := new(Consistency_MinimizeLatency)
+ r.MinimizeLatency = m.MinimizeLatency
+ return r
+}
+
+func (m *Consistency_AtLeastAsFresh) CloneVT() isConsistency_Requirement {
+ if m == nil {
+ return (*Consistency_AtLeastAsFresh)(nil)
+ }
+ r := new(Consistency_AtLeastAsFresh)
+ r.AtLeastAsFresh = m.AtLeastAsFresh.CloneVT()
+ return r
+}
+
+func (m *Consistency_AtExactSnapshot) CloneVT() isConsistency_Requirement {
+ if m == nil {
+ return (*Consistency_AtExactSnapshot)(nil)
+ }
+ r := new(Consistency_AtExactSnapshot)
+ r.AtExactSnapshot = m.AtExactSnapshot.CloneVT()
+ return r
+}
+
+func (m *Consistency_FullyConsistent) CloneVT() isConsistency_Requirement {
+ if m == nil {
+ return (*Consistency_FullyConsistent)(nil)
+ }
+ r := new(Consistency_FullyConsistent)
+ r.FullyConsistent = m.FullyConsistent
+ return r
+}
+
+func (m *RelationshipFilter) CloneVT() *RelationshipFilter {
+ if m == nil {
+ return (*RelationshipFilter)(nil)
+ }
+ r := new(RelationshipFilter)
+ r.ResourceType = m.ResourceType
+ r.OptionalResourceId = m.OptionalResourceId
+ r.OptionalResourceIdPrefix = m.OptionalResourceIdPrefix
+ r.OptionalRelation = m.OptionalRelation
+ r.OptionalSubjectFilter = m.OptionalSubjectFilter.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *RelationshipFilter) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *SubjectFilter_RelationFilter) CloneVT() *SubjectFilter_RelationFilter {
+ if m == nil {
+ return (*SubjectFilter_RelationFilter)(nil)
+ }
+ r := new(SubjectFilter_RelationFilter)
+ r.Relation = m.Relation
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *SubjectFilter_RelationFilter) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *SubjectFilter) CloneVT() *SubjectFilter {
+ if m == nil {
+ return (*SubjectFilter)(nil)
+ }
+ r := new(SubjectFilter)
+ r.SubjectType = m.SubjectType
+ r.OptionalSubjectId = m.OptionalSubjectId
+ r.OptionalRelation = m.OptionalRelation.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *SubjectFilter) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReadRelationshipsRequest) CloneVT() *ReadRelationshipsRequest {
+ if m == nil {
+ return (*ReadRelationshipsRequest)(nil)
+ }
+ r := new(ReadRelationshipsRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ r.RelationshipFilter = m.RelationshipFilter.CloneVT()
+ r.OptionalLimit = m.OptionalLimit
+ r.OptionalCursor = m.OptionalCursor.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReadRelationshipsRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReadRelationshipsResponse) CloneVT() *ReadRelationshipsResponse {
+ if m == nil {
+ return (*ReadRelationshipsResponse)(nil)
+ }
+ r := new(ReadRelationshipsResponse)
+ r.ReadAt = m.ReadAt.CloneVT()
+ r.Relationship = m.Relationship.CloneVT()
+ r.AfterResultCursor = m.AfterResultCursor.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReadRelationshipsResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *Precondition) CloneVT() *Precondition {
+ if m == nil {
+ return (*Precondition)(nil)
+ }
+ r := new(Precondition)
+ r.Operation = m.Operation
+ r.Filter = m.Filter.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *Precondition) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *WriteRelationshipsRequest) CloneVT() *WriteRelationshipsRequest {
+ if m == nil {
+ return (*WriteRelationshipsRequest)(nil)
+ }
+ r := new(WriteRelationshipsRequest)
+ r.OptionalTransactionMetadata = (*structpb.Struct)((*structpb1.Struct)(m.OptionalTransactionMetadata).CloneVT())
+ if rhs := m.Updates; rhs != nil {
+ tmpContainer := make([]*RelationshipUpdate, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Updates = tmpContainer
+ }
+ if rhs := m.OptionalPreconditions; rhs != nil {
+ tmpContainer := make([]*Precondition, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.OptionalPreconditions = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *WriteRelationshipsRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *WriteRelationshipsResponse) CloneVT() *WriteRelationshipsResponse {
+ if m == nil {
+ return (*WriteRelationshipsResponse)(nil)
+ }
+ r := new(WriteRelationshipsResponse)
+ r.WrittenAt = m.WrittenAt.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *WriteRelationshipsResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *DeleteRelationshipsRequest) CloneVT() *DeleteRelationshipsRequest {
+ if m == nil {
+ return (*DeleteRelationshipsRequest)(nil)
+ }
+ r := new(DeleteRelationshipsRequest)
+ r.RelationshipFilter = m.RelationshipFilter.CloneVT()
+ r.OptionalLimit = m.OptionalLimit
+ r.OptionalAllowPartialDeletions = m.OptionalAllowPartialDeletions
+ r.OptionalTransactionMetadata = (*structpb.Struct)((*structpb1.Struct)(m.OptionalTransactionMetadata).CloneVT())
+ if rhs := m.OptionalPreconditions; rhs != nil {
+ tmpContainer := make([]*Precondition, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.OptionalPreconditions = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *DeleteRelationshipsRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *DeleteRelationshipsResponse) CloneVT() *DeleteRelationshipsResponse {
+ if m == nil {
+ return (*DeleteRelationshipsResponse)(nil)
+ }
+ r := new(DeleteRelationshipsResponse)
+ r.DeletedAt = m.DeletedAt.CloneVT()
+ r.DeletionProgress = m.DeletionProgress
+ r.RelationshipsDeletedCount = m.RelationshipsDeletedCount
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *DeleteRelationshipsResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *CheckPermissionRequest) CloneVT() *CheckPermissionRequest {
+ if m == nil {
+ return (*CheckPermissionRequest)(nil)
+ }
+ r := new(CheckPermissionRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ r.Resource = m.Resource.CloneVT()
+ r.Permission = m.Permission
+ r.Subject = m.Subject.CloneVT()
+ r.Context = (*structpb.Struct)((*structpb1.Struct)(m.Context).CloneVT())
+ r.WithTracing = m.WithTracing
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *CheckPermissionRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *CheckPermissionResponse) CloneVT() *CheckPermissionResponse {
+ if m == nil {
+ return (*CheckPermissionResponse)(nil)
+ }
+ r := new(CheckPermissionResponse)
+ r.CheckedAt = m.CheckedAt.CloneVT()
+ r.Permissionship = m.Permissionship
+ r.PartialCaveatInfo = m.PartialCaveatInfo.CloneVT()
+ r.DebugTrace = m.DebugTrace.CloneVT()
+ r.OptionalExpiresAt = (*timestamppb.Timestamp)((*timestamppb1.Timestamp)(m.OptionalExpiresAt).CloneVT())
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *CheckPermissionResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *CheckBulkPermissionsRequest) CloneVT() *CheckBulkPermissionsRequest {
+ if m == nil {
+ return (*CheckBulkPermissionsRequest)(nil)
+ }
+ r := new(CheckBulkPermissionsRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ r.WithTracing = m.WithTracing
+ if rhs := m.Items; rhs != nil {
+ tmpContainer := make([]*CheckBulkPermissionsRequestItem, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Items = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *CheckBulkPermissionsRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *CheckBulkPermissionsRequestItem) CloneVT() *CheckBulkPermissionsRequestItem {
+ if m == nil {
+ return (*CheckBulkPermissionsRequestItem)(nil)
+ }
+ r := new(CheckBulkPermissionsRequestItem)
+ r.Resource = m.Resource.CloneVT()
+ r.Permission = m.Permission
+ r.Subject = m.Subject.CloneVT()
+ r.Context = (*structpb.Struct)((*structpb1.Struct)(m.Context).CloneVT())
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *CheckBulkPermissionsRequestItem) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *CheckBulkPermissionsResponse) CloneVT() *CheckBulkPermissionsResponse {
+ if m == nil {
+ return (*CheckBulkPermissionsResponse)(nil)
+ }
+ r := new(CheckBulkPermissionsResponse)
+ r.CheckedAt = m.CheckedAt.CloneVT()
+ if rhs := m.Pairs; rhs != nil {
+ tmpContainer := make([]*CheckBulkPermissionsPair, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Pairs = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *CheckBulkPermissionsResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *CheckBulkPermissionsPair) CloneVT() *CheckBulkPermissionsPair {
+ if m == nil {
+ return (*CheckBulkPermissionsPair)(nil)
+ }
+ r := new(CheckBulkPermissionsPair)
+ r.Request = m.Request.CloneVT()
+ if m.Response != nil {
+ r.Response = m.Response.(interface {
+ CloneVT() isCheckBulkPermissionsPair_Response
+ }).CloneVT()
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *CheckBulkPermissionsPair) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *CheckBulkPermissionsPair_Item) CloneVT() isCheckBulkPermissionsPair_Response {
+ if m == nil {
+ return (*CheckBulkPermissionsPair_Item)(nil)
+ }
+ r := new(CheckBulkPermissionsPair_Item)
+ r.Item = m.Item.CloneVT()
+ return r
+}
+
+func (m *CheckBulkPermissionsPair_Error) CloneVT() isCheckBulkPermissionsPair_Response {
+ if m == nil {
+ return (*CheckBulkPermissionsPair_Error)(nil)
+ }
+ r := new(CheckBulkPermissionsPair_Error)
+ if rhs := m.Error; rhs != nil {
+ if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *status.Status }); ok {
+ r.Error = vtpb.CloneVT()
+ } else {
+ r.Error = proto.Clone(rhs).(*status.Status)
+ }
+ }
+ return r
+}
+
+func (m *CheckBulkPermissionsResponseItem) CloneVT() *CheckBulkPermissionsResponseItem {
+ if m == nil {
+ return (*CheckBulkPermissionsResponseItem)(nil)
+ }
+ r := new(CheckBulkPermissionsResponseItem)
+ r.Permissionship = m.Permissionship
+ r.PartialCaveatInfo = m.PartialCaveatInfo.CloneVT()
+ r.DebugTrace = m.DebugTrace.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *CheckBulkPermissionsResponseItem) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExpandPermissionTreeRequest) CloneVT() *ExpandPermissionTreeRequest {
+ if m == nil {
+ return (*ExpandPermissionTreeRequest)(nil)
+ }
+ r := new(ExpandPermissionTreeRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ r.Resource = m.Resource.CloneVT()
+ r.Permission = m.Permission
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExpandPermissionTreeRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExpandPermissionTreeResponse) CloneVT() *ExpandPermissionTreeResponse {
+ if m == nil {
+ return (*ExpandPermissionTreeResponse)(nil)
+ }
+ r := new(ExpandPermissionTreeResponse)
+ r.ExpandedAt = m.ExpandedAt.CloneVT()
+ r.TreeRoot = m.TreeRoot.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExpandPermissionTreeResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *LookupResourcesRequest) CloneVT() *LookupResourcesRequest {
+ if m == nil {
+ return (*LookupResourcesRequest)(nil)
+ }
+ r := new(LookupResourcesRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ r.ResourceObjectType = m.ResourceObjectType
+ r.Permission = m.Permission
+ r.Subject = m.Subject.CloneVT()
+ r.Context = (*structpb.Struct)((*structpb1.Struct)(m.Context).CloneVT())
+ r.OptionalLimit = m.OptionalLimit
+ r.OptionalCursor = m.OptionalCursor.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *LookupResourcesRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *LookupResourcesResponse) CloneVT() *LookupResourcesResponse {
+ if m == nil {
+ return (*LookupResourcesResponse)(nil)
+ }
+ r := new(LookupResourcesResponse)
+ r.LookedUpAt = m.LookedUpAt.CloneVT()
+ r.ResourceObjectId = m.ResourceObjectId
+ r.Permissionship = m.Permissionship
+ r.PartialCaveatInfo = m.PartialCaveatInfo.CloneVT()
+ r.AfterResultCursor = m.AfterResultCursor.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *LookupResourcesResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *LookupSubjectsRequest) CloneVT() *LookupSubjectsRequest {
+ if m == nil {
+ return (*LookupSubjectsRequest)(nil)
+ }
+ r := new(LookupSubjectsRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ r.Resource = m.Resource.CloneVT()
+ r.Permission = m.Permission
+ r.SubjectObjectType = m.SubjectObjectType
+ r.OptionalSubjectRelation = m.OptionalSubjectRelation
+ r.Context = (*structpb.Struct)((*structpb1.Struct)(m.Context).CloneVT())
+ r.OptionalConcreteLimit = m.OptionalConcreteLimit
+ r.OptionalCursor = m.OptionalCursor.CloneVT()
+ r.WildcardOption = m.WildcardOption
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *LookupSubjectsRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *LookupSubjectsResponse) CloneVT() *LookupSubjectsResponse {
+ if m == nil {
+ return (*LookupSubjectsResponse)(nil)
+ }
+ r := new(LookupSubjectsResponse)
+ r.LookedUpAt = m.LookedUpAt.CloneVT()
+ r.SubjectObjectId = m.SubjectObjectId
+ r.Permissionship = m.Permissionship
+ r.PartialCaveatInfo = m.PartialCaveatInfo.CloneVT()
+ r.Subject = m.Subject.CloneVT()
+ r.AfterResultCursor = m.AfterResultCursor.CloneVT()
+ if rhs := m.ExcludedSubjectIds; rhs != nil {
+ tmpContainer := make([]string, len(rhs))
+ copy(tmpContainer, rhs)
+ r.ExcludedSubjectIds = tmpContainer
+ }
+ if rhs := m.ExcludedSubjects; rhs != nil {
+ tmpContainer := make([]*ResolvedSubject, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.ExcludedSubjects = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *LookupSubjectsResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ResolvedSubject) CloneVT() *ResolvedSubject {
+ if m == nil {
+ return (*ResolvedSubject)(nil)
+ }
+ r := new(ResolvedSubject)
+ r.SubjectObjectId = m.SubjectObjectId
+ r.Permissionship = m.Permissionship
+ r.PartialCaveatInfo = m.PartialCaveatInfo.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ResolvedSubject) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ImportBulkRelationshipsRequest) CloneVT() *ImportBulkRelationshipsRequest {
+ if m == nil {
+ return (*ImportBulkRelationshipsRequest)(nil)
+ }
+ r := new(ImportBulkRelationshipsRequest)
+ if rhs := m.Relationships; rhs != nil {
+ tmpContainer := make([]*Relationship, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Relationships = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ImportBulkRelationshipsRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ImportBulkRelationshipsResponse) CloneVT() *ImportBulkRelationshipsResponse {
+ if m == nil {
+ return (*ImportBulkRelationshipsResponse)(nil)
+ }
+ r := new(ImportBulkRelationshipsResponse)
+ r.NumLoaded = m.NumLoaded
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ImportBulkRelationshipsResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExportBulkRelationshipsRequest) CloneVT() *ExportBulkRelationshipsRequest {
+ if m == nil {
+ return (*ExportBulkRelationshipsRequest)(nil)
+ }
+ r := new(ExportBulkRelationshipsRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ r.OptionalLimit = m.OptionalLimit
+ r.OptionalCursor = m.OptionalCursor.CloneVT()
+ r.OptionalRelationshipFilter = m.OptionalRelationshipFilter.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExportBulkRelationshipsRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ExportBulkRelationshipsResponse) CloneVT() *ExportBulkRelationshipsResponse {
+ if m == nil {
+ return (*ExportBulkRelationshipsResponse)(nil)
+ }
+ r := new(ExportBulkRelationshipsResponse)
+ r.AfterResultCursor = m.AfterResultCursor.CloneVT()
+ if rhs := m.Relationships; rhs != nil {
+ tmpContainer := make([]*Relationship, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Relationships = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ExportBulkRelationshipsResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (this *Consistency) EqualVT(that *Consistency) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Requirement == nil && that.Requirement != nil {
+ return false
+ } else if this.Requirement != nil {
+ if that.Requirement == nil {
+ return false
+ }
+ if !this.Requirement.(interface {
+ EqualVT(isConsistency_Requirement) bool
+ }).EqualVT(that.Requirement) {
+ return false
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *Consistency) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*Consistency)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *Consistency_MinimizeLatency) EqualVT(thatIface isConsistency_Requirement) bool {
+ that, ok := thatIface.(*Consistency_MinimizeLatency)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if this.MinimizeLatency != that.MinimizeLatency {
+ return false
+ }
+ return true
+}
+
+func (this *Consistency_AtLeastAsFresh) EqualVT(thatIface isConsistency_Requirement) bool {
+ that, ok := thatIface.(*Consistency_AtLeastAsFresh)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.AtLeastAsFresh, that.AtLeastAsFresh; p != q {
+ if p == nil {
+ p = &ZedToken{}
+ }
+ if q == nil {
+ q = &ZedToken{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *Consistency_AtExactSnapshot) EqualVT(thatIface isConsistency_Requirement) bool {
+ that, ok := thatIface.(*Consistency_AtExactSnapshot)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.AtExactSnapshot, that.AtExactSnapshot; p != q {
+ if p == nil {
+ p = &ZedToken{}
+ }
+ if q == nil {
+ q = &ZedToken{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *Consistency_FullyConsistent) EqualVT(thatIface isConsistency_Requirement) bool {
+ that, ok := thatIface.(*Consistency_FullyConsistent)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if this.FullyConsistent != that.FullyConsistent {
+ return false
+ }
+ return true
+}
+
+func (this *RelationshipFilter) EqualVT(that *RelationshipFilter) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.ResourceType != that.ResourceType {
+ return false
+ }
+ if this.OptionalResourceId != that.OptionalResourceId {
+ return false
+ }
+ if this.OptionalRelation != that.OptionalRelation {
+ return false
+ }
+ if !this.OptionalSubjectFilter.EqualVT(that.OptionalSubjectFilter) {
+ return false
+ }
+ if this.OptionalResourceIdPrefix != that.OptionalResourceIdPrefix {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *RelationshipFilter) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*RelationshipFilter)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *SubjectFilter_RelationFilter) EqualVT(that *SubjectFilter_RelationFilter) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Relation != that.Relation {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *SubjectFilter_RelationFilter) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*SubjectFilter_RelationFilter)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *SubjectFilter) EqualVT(that *SubjectFilter) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.SubjectType != that.SubjectType {
+ return false
+ }
+ if this.OptionalSubjectId != that.OptionalSubjectId {
+ return false
+ }
+ if !this.OptionalRelation.EqualVT(that.OptionalRelation) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *SubjectFilter) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*SubjectFilter)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReadRelationshipsRequest) EqualVT(that *ReadRelationshipsRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if !this.RelationshipFilter.EqualVT(that.RelationshipFilter) {
+ return false
+ }
+ if this.OptionalLimit != that.OptionalLimit {
+ return false
+ }
+ if !this.OptionalCursor.EqualVT(that.OptionalCursor) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReadRelationshipsRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReadRelationshipsRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReadRelationshipsResponse) EqualVT(that *ReadRelationshipsResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.ReadAt.EqualVT(that.ReadAt) {
+ return false
+ }
+ if !this.Relationship.EqualVT(that.Relationship) {
+ return false
+ }
+ if !this.AfterResultCursor.EqualVT(that.AfterResultCursor) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReadRelationshipsResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReadRelationshipsResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *Precondition) EqualVT(that *Precondition) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Operation != that.Operation {
+ return false
+ }
+ if !this.Filter.EqualVT(that.Filter) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *Precondition) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*Precondition)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *WriteRelationshipsRequest) EqualVT(that *WriteRelationshipsRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if len(this.Updates) != len(that.Updates) {
+ return false
+ }
+ for i, vx := range this.Updates {
+ vy := that.Updates[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &RelationshipUpdate{}
+ }
+ if q == nil {
+ q = &RelationshipUpdate{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if len(this.OptionalPreconditions) != len(that.OptionalPreconditions) {
+ return false
+ }
+ for i, vx := range this.OptionalPreconditions {
+ vy := that.OptionalPreconditions[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &Precondition{}
+ }
+ if q == nil {
+ q = &Precondition{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if !(*structpb1.Struct)(this.OptionalTransactionMetadata).EqualVT((*structpb1.Struct)(that.OptionalTransactionMetadata)) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *WriteRelationshipsRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*WriteRelationshipsRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *WriteRelationshipsResponse) EqualVT(that *WriteRelationshipsResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.WrittenAt.EqualVT(that.WrittenAt) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *WriteRelationshipsResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*WriteRelationshipsResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *DeleteRelationshipsRequest) EqualVT(that *DeleteRelationshipsRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.RelationshipFilter.EqualVT(that.RelationshipFilter) {
+ return false
+ }
+ if len(this.OptionalPreconditions) != len(that.OptionalPreconditions) {
+ return false
+ }
+ for i, vx := range this.OptionalPreconditions {
+ vy := that.OptionalPreconditions[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &Precondition{}
+ }
+ if q == nil {
+ q = &Precondition{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if this.OptionalLimit != that.OptionalLimit {
+ return false
+ }
+ if this.OptionalAllowPartialDeletions != that.OptionalAllowPartialDeletions {
+ return false
+ }
+ if !(*structpb1.Struct)(this.OptionalTransactionMetadata).EqualVT((*structpb1.Struct)(that.OptionalTransactionMetadata)) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *DeleteRelationshipsRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*DeleteRelationshipsRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *DeleteRelationshipsResponse) EqualVT(that *DeleteRelationshipsResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.DeletedAt.EqualVT(that.DeletedAt) {
+ return false
+ }
+ if this.DeletionProgress != that.DeletionProgress {
+ return false
+ }
+ if this.RelationshipsDeletedCount != that.RelationshipsDeletedCount {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *DeleteRelationshipsResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*DeleteRelationshipsResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *CheckPermissionRequest) EqualVT(that *CheckPermissionRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if !this.Resource.EqualVT(that.Resource) {
+ return false
+ }
+ if this.Permission != that.Permission {
+ return false
+ }
+ if !this.Subject.EqualVT(that.Subject) {
+ return false
+ }
+ if !(*structpb1.Struct)(this.Context).EqualVT((*structpb1.Struct)(that.Context)) {
+ return false
+ }
+ if this.WithTracing != that.WithTracing {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *CheckPermissionRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*CheckPermissionRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *CheckPermissionResponse) EqualVT(that *CheckPermissionResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.CheckedAt.EqualVT(that.CheckedAt) {
+ return false
+ }
+ if this.Permissionship != that.Permissionship {
+ return false
+ }
+ if !this.PartialCaveatInfo.EqualVT(that.PartialCaveatInfo) {
+ return false
+ }
+ if !this.DebugTrace.EqualVT(that.DebugTrace) {
+ return false
+ }
+ if !(*timestamppb1.Timestamp)(this.OptionalExpiresAt).EqualVT((*timestamppb1.Timestamp)(that.OptionalExpiresAt)) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *CheckPermissionResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*CheckPermissionResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *CheckBulkPermissionsRequest) EqualVT(that *CheckBulkPermissionsRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if len(this.Items) != len(that.Items) {
+ return false
+ }
+ for i, vx := range this.Items {
+ vy := that.Items[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &CheckBulkPermissionsRequestItem{}
+ }
+ if q == nil {
+ q = &CheckBulkPermissionsRequestItem{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if this.WithTracing != that.WithTracing {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *CheckBulkPermissionsRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*CheckBulkPermissionsRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *CheckBulkPermissionsRequestItem) EqualVT(that *CheckBulkPermissionsRequestItem) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Resource.EqualVT(that.Resource) {
+ return false
+ }
+ if this.Permission != that.Permission {
+ return false
+ }
+ if !this.Subject.EqualVT(that.Subject) {
+ return false
+ }
+ if !(*structpb1.Struct)(this.Context).EqualVT((*structpb1.Struct)(that.Context)) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *CheckBulkPermissionsRequestItem) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*CheckBulkPermissionsRequestItem)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *CheckBulkPermissionsResponse) EqualVT(that *CheckBulkPermissionsResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.CheckedAt.EqualVT(that.CheckedAt) {
+ return false
+ }
+ if len(this.Pairs) != len(that.Pairs) {
+ return false
+ }
+ for i, vx := range this.Pairs {
+ vy := that.Pairs[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &CheckBulkPermissionsPair{}
+ }
+ if q == nil {
+ q = &CheckBulkPermissionsPair{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *CheckBulkPermissionsResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*CheckBulkPermissionsResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *CheckBulkPermissionsPair) EqualVT(that *CheckBulkPermissionsPair) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Response == nil && that.Response != nil {
+ return false
+ } else if this.Response != nil {
+ if that.Response == nil {
+ return false
+ }
+ if !this.Response.(interface {
+ EqualVT(isCheckBulkPermissionsPair_Response) bool
+ }).EqualVT(that.Response) {
+ return false
+ }
+ }
+ if !this.Request.EqualVT(that.Request) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *CheckBulkPermissionsPair) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*CheckBulkPermissionsPair)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *CheckBulkPermissionsPair_Item) EqualVT(thatIface isCheckBulkPermissionsPair_Response) bool {
+ that, ok := thatIface.(*CheckBulkPermissionsPair_Item)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.Item, that.Item; p != q {
+ if p == nil {
+ p = &CheckBulkPermissionsResponseItem{}
+ }
+ if q == nil {
+ q = &CheckBulkPermissionsResponseItem{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *CheckBulkPermissionsPair_Error) EqualVT(thatIface isCheckBulkPermissionsPair_Response) bool {
+ that, ok := thatIface.(*CheckBulkPermissionsPair_Error)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.Error, that.Error; p != q {
+ if p == nil {
+ p = &status.Status{}
+ }
+ if q == nil {
+ q = &status.Status{}
+ }
+ if equal, ok := interface{}(p).(interface{ EqualVT(*status.Status) bool }); ok {
+ if !equal.EqualVT(q) {
+ return false
+ }
+ } else if !proto.Equal(p, q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *CheckBulkPermissionsResponseItem) EqualVT(that *CheckBulkPermissionsResponseItem) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Permissionship != that.Permissionship {
+ return false
+ }
+ if !this.PartialCaveatInfo.EqualVT(that.PartialCaveatInfo) {
+ return false
+ }
+ if !this.DebugTrace.EqualVT(that.DebugTrace) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *CheckBulkPermissionsResponseItem) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*CheckBulkPermissionsResponseItem)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExpandPermissionTreeRequest) EqualVT(that *ExpandPermissionTreeRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if !this.Resource.EqualVT(that.Resource) {
+ return false
+ }
+ if this.Permission != that.Permission {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExpandPermissionTreeRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExpandPermissionTreeRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExpandPermissionTreeResponse) EqualVT(that *ExpandPermissionTreeResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.ExpandedAt.EqualVT(that.ExpandedAt) {
+ return false
+ }
+ if !this.TreeRoot.EqualVT(that.TreeRoot) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExpandPermissionTreeResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExpandPermissionTreeResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *LookupResourcesRequest) EqualVT(that *LookupResourcesRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if this.ResourceObjectType != that.ResourceObjectType {
+ return false
+ }
+ if this.Permission != that.Permission {
+ return false
+ }
+ if !this.Subject.EqualVT(that.Subject) {
+ return false
+ }
+ if !(*structpb1.Struct)(this.Context).EqualVT((*structpb1.Struct)(that.Context)) {
+ return false
+ }
+ if this.OptionalLimit != that.OptionalLimit {
+ return false
+ }
+ if !this.OptionalCursor.EqualVT(that.OptionalCursor) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *LookupResourcesRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*LookupResourcesRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *LookupResourcesResponse) EqualVT(that *LookupResourcesResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.LookedUpAt.EqualVT(that.LookedUpAt) {
+ return false
+ }
+ if this.ResourceObjectId != that.ResourceObjectId {
+ return false
+ }
+ if this.Permissionship != that.Permissionship {
+ return false
+ }
+ if !this.PartialCaveatInfo.EqualVT(that.PartialCaveatInfo) {
+ return false
+ }
+ if !this.AfterResultCursor.EqualVT(that.AfterResultCursor) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *LookupResourcesResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*LookupResourcesResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *LookupSubjectsRequest) EqualVT(that *LookupSubjectsRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if !this.Resource.EqualVT(that.Resource) {
+ return false
+ }
+ if this.Permission != that.Permission {
+ return false
+ }
+ if this.SubjectObjectType != that.SubjectObjectType {
+ return false
+ }
+ if this.OptionalSubjectRelation != that.OptionalSubjectRelation {
+ return false
+ }
+ if !(*structpb1.Struct)(this.Context).EqualVT((*structpb1.Struct)(that.Context)) {
+ return false
+ }
+ if this.OptionalConcreteLimit != that.OptionalConcreteLimit {
+ return false
+ }
+ if !this.OptionalCursor.EqualVT(that.OptionalCursor) {
+ return false
+ }
+ if this.WildcardOption != that.WildcardOption {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *LookupSubjectsRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*LookupSubjectsRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *LookupSubjectsResponse) EqualVT(that *LookupSubjectsResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.LookedUpAt.EqualVT(that.LookedUpAt) {
+ return false
+ }
+ if this.SubjectObjectId != that.SubjectObjectId {
+ return false
+ }
+ if len(this.ExcludedSubjectIds) != len(that.ExcludedSubjectIds) {
+ return false
+ }
+ for i, vx := range this.ExcludedSubjectIds {
+ vy := that.ExcludedSubjectIds[i]
+ if vx != vy {
+ return false
+ }
+ }
+ if this.Permissionship != that.Permissionship {
+ return false
+ }
+ if !this.PartialCaveatInfo.EqualVT(that.PartialCaveatInfo) {
+ return false
+ }
+ if !this.Subject.EqualVT(that.Subject) {
+ return false
+ }
+ if len(this.ExcludedSubjects) != len(that.ExcludedSubjects) {
+ return false
+ }
+ for i, vx := range this.ExcludedSubjects {
+ vy := that.ExcludedSubjects[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ResolvedSubject{}
+ }
+ if q == nil {
+ q = &ResolvedSubject{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if !this.AfterResultCursor.EqualVT(that.AfterResultCursor) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *LookupSubjectsResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*LookupSubjectsResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ResolvedSubject) EqualVT(that *ResolvedSubject) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.SubjectObjectId != that.SubjectObjectId {
+ return false
+ }
+ if this.Permissionship != that.Permissionship {
+ return false
+ }
+ if !this.PartialCaveatInfo.EqualVT(that.PartialCaveatInfo) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ResolvedSubject) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ResolvedSubject)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ImportBulkRelationshipsRequest) EqualVT(that *ImportBulkRelationshipsRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if len(this.Relationships) != len(that.Relationships) {
+ return false
+ }
+ for i, vx := range this.Relationships {
+ vy := that.Relationships[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &Relationship{}
+ }
+ if q == nil {
+ q = &Relationship{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ImportBulkRelationshipsRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ImportBulkRelationshipsRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ImportBulkRelationshipsResponse) EqualVT(that *ImportBulkRelationshipsResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.NumLoaded != that.NumLoaded {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ImportBulkRelationshipsResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ImportBulkRelationshipsResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExportBulkRelationshipsRequest) EqualVT(that *ExportBulkRelationshipsRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if this.OptionalLimit != that.OptionalLimit {
+ return false
+ }
+ if !this.OptionalCursor.EqualVT(that.OptionalCursor) {
+ return false
+ }
+ if !this.OptionalRelationshipFilter.EqualVT(that.OptionalRelationshipFilter) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExportBulkRelationshipsRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExportBulkRelationshipsRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ExportBulkRelationshipsResponse) EqualVT(that *ExportBulkRelationshipsResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.AfterResultCursor.EqualVT(that.AfterResultCursor) {
+ return false
+ }
+ if len(this.Relationships) != len(that.Relationships) {
+ return false
+ }
+ for i, vx := range this.Relationships {
+ vy := that.Relationships[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &Relationship{}
+ }
+ if q == nil {
+ q = &Relationship{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ExportBulkRelationshipsResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ExportBulkRelationshipsResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (m *Consistency) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Consistency) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *Consistency) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if vtmsg, ok := m.Requirement.(interface {
+ MarshalToSizedBufferVT([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Consistency_MinimizeLatency) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *Consistency_MinimizeLatency) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i--
+ if m.MinimizeLatency {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x8
+ return len(dAtA) - i, nil
+}
+func (m *Consistency_AtLeastAsFresh) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *Consistency_AtLeastAsFresh) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.AtLeastAsFresh != nil {
+ size, err := m.AtLeastAsFresh.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *Consistency_AtExactSnapshot) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *Consistency_AtExactSnapshot) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.AtExactSnapshot != nil {
+ size, err := m.AtExactSnapshot.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *Consistency_FullyConsistent) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *Consistency_FullyConsistent) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i--
+ if m.FullyConsistent {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x20
+ return len(dAtA) - i, nil
+}
+func (m *RelationshipFilter) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RelationshipFilter) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *RelationshipFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.OptionalResourceIdPrefix) > 0 {
+ i -= len(m.OptionalResourceIdPrefix)
+ copy(dAtA[i:], m.OptionalResourceIdPrefix)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalResourceIdPrefix)))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.OptionalSubjectFilter != nil {
+ size, err := m.OptionalSubjectFilter.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.OptionalRelation) > 0 {
+ i -= len(m.OptionalRelation)
+ copy(dAtA[i:], m.OptionalRelation)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalRelation)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.OptionalResourceId) > 0 {
+ i -= len(m.OptionalResourceId)
+ copy(dAtA[i:], m.OptionalResourceId)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalResourceId)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.ResourceType) > 0 {
+ i -= len(m.ResourceType)
+ copy(dAtA[i:], m.ResourceType)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceType)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *SubjectFilter_RelationFilter) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SubjectFilter_RelationFilter) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *SubjectFilter_RelationFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Relation) > 0 {
+ i -= len(m.Relation)
+ copy(dAtA[i:], m.Relation)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Relation)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *SubjectFilter) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SubjectFilter) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *SubjectFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.OptionalRelation != nil {
+ size, err := m.OptionalRelation.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.OptionalSubjectId) > 0 {
+ i -= len(m.OptionalSubjectId)
+ copy(dAtA[i:], m.OptionalSubjectId)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalSubjectId)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.SubjectType) > 0 {
+ i -= len(m.SubjectType)
+ copy(dAtA[i:], m.SubjectType)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SubjectType)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReadRelationshipsRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReadRelationshipsRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReadRelationshipsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.OptionalCursor != nil {
+ size, err := m.OptionalCursor.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.OptionalLimit != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalLimit))
+ i--
+ dAtA[i] = 0x18
+ }
+ if m.RelationshipFilter != nil {
+ size, err := m.RelationshipFilter.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReadRelationshipsResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReadRelationshipsResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReadRelationshipsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.AfterResultCursor != nil {
+ size, err := m.AfterResultCursor.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Relationship != nil {
+ size, err := m.Relationship.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.ReadAt != nil {
+ size, err := m.ReadAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Precondition) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Precondition) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *Precondition) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Filter != nil {
+ size, err := m.Filter.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Operation != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Operation))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *WriteRelationshipsRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *WriteRelationshipsRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *WriteRelationshipsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.OptionalTransactionMetadata != nil {
+ size, err := (*structpb1.Struct)(m.OptionalTransactionMetadata).MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.OptionalPreconditions) > 0 {
+ for iNdEx := len(m.OptionalPreconditions) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.OptionalPreconditions[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.Updates) > 0 {
+ for iNdEx := len(m.Updates) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Updates[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *WriteRelationshipsResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *WriteRelationshipsResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *WriteRelationshipsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.WrittenAt != nil {
+ size, err := m.WrittenAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DeleteRelationshipsRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeleteRelationshipsRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *DeleteRelationshipsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.OptionalTransactionMetadata != nil {
+ size, err := (*structpb1.Struct)(m.OptionalTransactionMetadata).MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.OptionalAllowPartialDeletions {
+ i--
+ if m.OptionalAllowPartialDeletions {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x20
+ }
+ if m.OptionalLimit != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalLimit))
+ i--
+ dAtA[i] = 0x18
+ }
+ if len(m.OptionalPreconditions) > 0 {
+ for iNdEx := len(m.OptionalPreconditions) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.OptionalPreconditions[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.RelationshipFilter != nil {
+ size, err := m.RelationshipFilter.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DeleteRelationshipsResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeleteRelationshipsResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *DeleteRelationshipsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.RelationshipsDeletedCount != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RelationshipsDeletedCount))
+ i--
+ dAtA[i] = 0x18
+ }
+ if m.DeletionProgress != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.DeletionProgress))
+ i--
+ dAtA[i] = 0x10
+ }
+ if m.DeletedAt != nil {
+ size, err := m.DeletedAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CheckPermissionRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CheckPermissionRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *CheckPermissionRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.WithTracing {
+ i--
+ if m.WithTracing {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x30
+ }
+ if m.Context != nil {
+ size, err := (*structpb1.Struct)(m.Context).MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.Subject != nil {
+ size, err := m.Subject.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.Permission) > 0 {
+ i -= len(m.Permission)
+ copy(dAtA[i:], m.Permission)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Permission)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Resource != nil {
+ size, err := m.Resource.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CheckPermissionResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CheckPermissionResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *CheckPermissionResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.OptionalExpiresAt != nil {
+ size, err := (*timestamppb1.Timestamp)(m.OptionalExpiresAt).MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.DebugTrace != nil {
+ size, err := m.DebugTrace.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.PartialCaveatInfo != nil {
+ size, err := m.PartialCaveatInfo.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Permissionship != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Permissionship))
+ i--
+ dAtA[i] = 0x10
+ }
+ if m.CheckedAt != nil {
+ size, err := m.CheckedAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CheckBulkPermissionsRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CheckBulkPermissionsRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *CheckBulkPermissionsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.WithTracing {
+ i--
+ if m.WithTracing {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x18
+ }
+ if len(m.Items) > 0 {
+ for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Items[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CheckBulkPermissionsRequestItem) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CheckBulkPermissionsRequestItem) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *CheckBulkPermissionsRequestItem) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Context != nil {
+ size, err := (*structpb1.Struct)(m.Context).MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.Subject != nil {
+ size, err := m.Subject.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Permission) > 0 {
+ i -= len(m.Permission)
+ copy(dAtA[i:], m.Permission)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Permission)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Resource != nil {
+ size, err := m.Resource.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CheckBulkPermissionsResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CheckBulkPermissionsResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *CheckBulkPermissionsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Pairs) > 0 {
+ for iNdEx := len(m.Pairs) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Pairs[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.CheckedAt != nil {
+ size, err := m.CheckedAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CheckBulkPermissionsPair) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CheckBulkPermissionsPair) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *CheckBulkPermissionsPair) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if vtmsg, ok := m.Response.(interface {
+ MarshalToSizedBufferVT([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if m.Request != nil {
+ size, err := m.Request.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CheckBulkPermissionsPair_Item) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *CheckBulkPermissionsPair_Item) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Item != nil {
+ size, err := m.Item.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *CheckBulkPermissionsPair_Error) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *CheckBulkPermissionsPair_Error) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Error != nil {
+ if vtmsg, ok := interface{}(m.Error).(interface {
+ MarshalToSizedBufferVT([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Error)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *CheckBulkPermissionsResponseItem) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CheckBulkPermissionsResponseItem) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *CheckBulkPermissionsResponseItem) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.DebugTrace != nil {
+ size, err := m.DebugTrace.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.PartialCaveatInfo != nil {
+ size, err := m.PartialCaveatInfo.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Permissionship != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Permissionship))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExpandPermissionTreeRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExpandPermissionTreeRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpandPermissionTreeRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Permission) > 0 {
+ i -= len(m.Permission)
+ copy(dAtA[i:], m.Permission)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Permission)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Resource != nil {
+ size, err := m.Resource.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExpandPermissionTreeResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExpandPermissionTreeResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExpandPermissionTreeResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.TreeRoot != nil {
+ size, err := m.TreeRoot.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.ExpandedAt != nil {
+ size, err := m.ExpandedAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *LookupResourcesRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LookupResourcesRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *LookupResourcesRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.OptionalCursor != nil {
+ size, err := m.OptionalCursor.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x3a
+ }
+ if m.OptionalLimit != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalLimit))
+ i--
+ dAtA[i] = 0x30
+ }
+ if m.Context != nil {
+ size, err := (*structpb1.Struct)(m.Context).MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.Subject != nil {
+ size, err := m.Subject.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.Permission) > 0 {
+ i -= len(m.Permission)
+ copy(dAtA[i:], m.Permission)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Permission)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.ResourceObjectType) > 0 {
+ i -= len(m.ResourceObjectType)
+ copy(dAtA[i:], m.ResourceObjectType)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceObjectType)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *LookupResourcesResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LookupResourcesResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *LookupResourcesResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.AfterResultCursor != nil {
+ size, err := m.AfterResultCursor.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.PartialCaveatInfo != nil {
+ size, err := m.PartialCaveatInfo.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.Permissionship != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Permissionship))
+ i--
+ dAtA[i] = 0x18
+ }
+ if len(m.ResourceObjectId) > 0 {
+ i -= len(m.ResourceObjectId)
+ copy(dAtA[i:], m.ResourceObjectId)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceObjectId)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.LookedUpAt != nil {
+ size, err := m.LookedUpAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *LookupSubjectsRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LookupSubjectsRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *LookupSubjectsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.WildcardOption != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.WildcardOption))
+ i--
+ dAtA[i] = 0x48
+ }
+ if m.OptionalCursor != nil {
+ size, err := m.OptionalCursor.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x42
+ }
+ if m.OptionalConcreteLimit != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalConcreteLimit))
+ i--
+ dAtA[i] = 0x38
+ }
+ if m.Context != nil {
+ size, err := (*structpb1.Struct)(m.Context).MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x32
+ }
+ if len(m.OptionalSubjectRelation) > 0 {
+ i -= len(m.OptionalSubjectRelation)
+ copy(dAtA[i:], m.OptionalSubjectRelation)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalSubjectRelation)))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if len(m.SubjectObjectType) > 0 {
+ i -= len(m.SubjectObjectType)
+ copy(dAtA[i:], m.SubjectObjectType)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SubjectObjectType)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.Permission) > 0 {
+ i -= len(m.Permission)
+ copy(dAtA[i:], m.Permission)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Permission)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Resource != nil {
+ size, err := m.Resource.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *LookupSubjectsResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LookupSubjectsResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *LookupSubjectsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.AfterResultCursor != nil {
+ size, err := m.AfterResultCursor.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x42
+ }
+ if len(m.ExcludedSubjects) > 0 {
+ for iNdEx := len(m.ExcludedSubjects) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.ExcludedSubjects[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x3a
+ }
+ }
+ if m.Subject != nil {
+ size, err := m.Subject.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x32
+ }
+ if m.PartialCaveatInfo != nil {
+ size, err := m.PartialCaveatInfo.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.Permissionship != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Permissionship))
+ i--
+ dAtA[i] = 0x20
+ }
+ if len(m.ExcludedSubjectIds) > 0 {
+ for iNdEx := len(m.ExcludedSubjectIds) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.ExcludedSubjectIds[iNdEx])
+ copy(dAtA[i:], m.ExcludedSubjectIds[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ExcludedSubjectIds[iNdEx])))
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if len(m.SubjectObjectId) > 0 {
+ i -= len(m.SubjectObjectId)
+ copy(dAtA[i:], m.SubjectObjectId)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SubjectObjectId)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.LookedUpAt != nil {
+ size, err := m.LookedUpAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ResolvedSubject) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResolvedSubject) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ResolvedSubject) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.PartialCaveatInfo != nil {
+ size, err := m.PartialCaveatInfo.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Permissionship != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Permissionship))
+ i--
+ dAtA[i] = 0x10
+ }
+ if len(m.SubjectObjectId) > 0 {
+ i -= len(m.SubjectObjectId)
+ copy(dAtA[i:], m.SubjectObjectId)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SubjectObjectId)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ImportBulkRelationshipsRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ImportBulkRelationshipsRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ImportBulkRelationshipsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Relationships) > 0 {
+ for iNdEx := len(m.Relationships) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Relationships[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ImportBulkRelationshipsResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ImportBulkRelationshipsResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ImportBulkRelationshipsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.NumLoaded != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.NumLoaded))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExportBulkRelationshipsRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExportBulkRelationshipsRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExportBulkRelationshipsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.OptionalRelationshipFilter != nil {
+ size, err := m.OptionalRelationshipFilter.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.OptionalCursor != nil {
+ size, err := m.OptionalCursor.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.OptionalLimit != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OptionalLimit))
+ i--
+ dAtA[i] = 0x10
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ExportBulkRelationshipsResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ExportBulkRelationshipsResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ExportBulkRelationshipsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Relationships) > 0 {
+ for iNdEx := len(m.Relationships) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Relationships[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.AfterResultCursor != nil {
+ size, err := m.AfterResultCursor.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Consistency) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.Requirement.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *Consistency_MinimizeLatency) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += 2
+ return n
+}
+func (m *Consistency_AtLeastAsFresh) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.AtLeastAsFresh != nil {
+ l = m.AtLeastAsFresh.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *Consistency_AtExactSnapshot) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.AtExactSnapshot != nil {
+ l = m.AtExactSnapshot.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *Consistency_FullyConsistent) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += 2
+ return n
+}
+func (m *RelationshipFilter) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.ResourceType)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.OptionalResourceId)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.OptionalRelation)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OptionalSubjectFilter != nil {
+ l = m.OptionalSubjectFilter.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.OptionalResourceIdPrefix)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *SubjectFilter_RelationFilter) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Relation)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *SubjectFilter) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.SubjectType)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.OptionalSubjectId)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OptionalRelation != nil {
+ l = m.OptionalRelation.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReadRelationshipsRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.RelationshipFilter != nil {
+ l = m.RelationshipFilter.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OptionalLimit != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.OptionalLimit))
+ }
+ if m.OptionalCursor != nil {
+ l = m.OptionalCursor.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReadRelationshipsResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ReadAt != nil {
+ l = m.ReadAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Relationship != nil {
+ l = m.Relationship.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.AfterResultCursor != nil {
+ l = m.AfterResultCursor.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *Precondition) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Operation != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Operation))
+ }
+ if m.Filter != nil {
+ l = m.Filter.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *WriteRelationshipsRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Updates) > 0 {
+ for _, e := range m.Updates {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if len(m.OptionalPreconditions) > 0 {
+ for _, e := range m.OptionalPreconditions {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.OptionalTransactionMetadata != nil {
+ l = (*structpb1.Struct)(m.OptionalTransactionMetadata).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *WriteRelationshipsResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.WrittenAt != nil {
+ l = m.WrittenAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DeleteRelationshipsRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RelationshipFilter != nil {
+ l = m.RelationshipFilter.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.OptionalPreconditions) > 0 {
+ for _, e := range m.OptionalPreconditions {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.OptionalLimit != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.OptionalLimit))
+ }
+ if m.OptionalAllowPartialDeletions {
+ n += 2
+ }
+ if m.OptionalTransactionMetadata != nil {
+ l = (*structpb1.Struct)(m.OptionalTransactionMetadata).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DeleteRelationshipsResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.DeletedAt != nil {
+ l = m.DeletedAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.DeletionProgress != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.DeletionProgress))
+ }
+ if m.RelationshipsDeletedCount != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.RelationshipsDeletedCount))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CheckPermissionRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Resource != nil {
+ l = m.Resource.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Permission)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Subject != nil {
+ l = m.Subject.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Context != nil {
+ l = (*structpb1.Struct)(m.Context).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.WithTracing {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CheckPermissionResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CheckedAt != nil {
+ l = m.CheckedAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Permissionship != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Permissionship))
+ }
+ if m.PartialCaveatInfo != nil {
+ l = m.PartialCaveatInfo.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.DebugTrace != nil {
+ l = m.DebugTrace.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OptionalExpiresAt != nil {
+ l = (*timestamppb1.Timestamp)(m.OptionalExpiresAt).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CheckBulkPermissionsRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.Items) > 0 {
+ for _, e := range m.Items {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.WithTracing {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CheckBulkPermissionsRequestItem) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Resource != nil {
+ l = m.Resource.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Permission)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Subject != nil {
+ l = m.Subject.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Context != nil {
+ l = (*structpb1.Struct)(m.Context).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CheckBulkPermissionsResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CheckedAt != nil {
+ l = m.CheckedAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.Pairs) > 0 {
+ for _, e := range m.Pairs {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CheckBulkPermissionsPair) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Request != nil {
+ l = m.Request.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if vtmsg, ok := m.Response.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CheckBulkPermissionsPair_Item) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Item != nil {
+ l = m.Item.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *CheckBulkPermissionsPair_Error) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Error != nil {
+ if size, ok := interface{}(m.Error).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Error)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *CheckBulkPermissionsResponseItem) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Permissionship != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Permissionship))
+ }
+ if m.PartialCaveatInfo != nil {
+ l = m.PartialCaveatInfo.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.DebugTrace != nil {
+ l = m.DebugTrace.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExpandPermissionTreeRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Resource != nil {
+ l = m.Resource.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Permission)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExpandPermissionTreeResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ExpandedAt != nil {
+ l = m.ExpandedAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.TreeRoot != nil {
+ l = m.TreeRoot.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *LookupResourcesRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.ResourceObjectType)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Permission)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Subject != nil {
+ l = m.Subject.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Context != nil {
+ l = (*structpb1.Struct)(m.Context).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OptionalLimit != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.OptionalLimit))
+ }
+ if m.OptionalCursor != nil {
+ l = m.OptionalCursor.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *LookupResourcesResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.LookedUpAt != nil {
+ l = m.LookedUpAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.ResourceObjectId)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Permissionship != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Permissionship))
+ }
+ if m.PartialCaveatInfo != nil {
+ l = m.PartialCaveatInfo.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.AfterResultCursor != nil {
+ l = m.AfterResultCursor.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *LookupSubjectsRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Resource != nil {
+ l = m.Resource.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Permission)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.SubjectObjectType)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.OptionalSubjectRelation)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Context != nil {
+ l = (*structpb1.Struct)(m.Context).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OptionalConcreteLimit != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.OptionalConcreteLimit))
+ }
+ if m.OptionalCursor != nil {
+ l = m.OptionalCursor.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.WildcardOption != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.WildcardOption))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *LookupSubjectsResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.LookedUpAt != nil {
+ l = m.LookedUpAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.SubjectObjectId)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.ExcludedSubjectIds) > 0 {
+ for _, s := range m.ExcludedSubjectIds {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.Permissionship != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Permissionship))
+ }
+ if m.PartialCaveatInfo != nil {
+ l = m.PartialCaveatInfo.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Subject != nil {
+ l = m.Subject.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.ExcludedSubjects) > 0 {
+ for _, e := range m.ExcludedSubjects {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.AfterResultCursor != nil {
+ l = m.AfterResultCursor.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ResolvedSubject) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.SubjectObjectId)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Permissionship != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Permissionship))
+ }
+ if m.PartialCaveatInfo != nil {
+ l = m.PartialCaveatInfo.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ImportBulkRelationshipsRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Relationships) > 0 {
+ for _, e := range m.Relationships {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ImportBulkRelationshipsResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.NumLoaded != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.NumLoaded))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExportBulkRelationshipsRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OptionalLimit != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.OptionalLimit))
+ }
+ if m.OptionalCursor != nil {
+ l = m.OptionalCursor.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OptionalRelationshipFilter != nil {
+ l = m.OptionalRelationshipFilter.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ExportBulkRelationshipsResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.AfterResultCursor != nil {
+ l = m.AfterResultCursor.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.Relationships) > 0 {
+ for _, e := range m.Relationships {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *Consistency) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Consistency: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Consistency: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MinimizeLatency", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Requirement = &Consistency_MinimizeLatency{MinimizeLatency: b}
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AtLeastAsFresh", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Requirement.(*Consistency_AtLeastAsFresh); ok {
+ if err := oneof.AtLeastAsFresh.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ZedToken{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Requirement = &Consistency_AtLeastAsFresh{AtLeastAsFresh: v}
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AtExactSnapshot", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Requirement.(*Consistency_AtExactSnapshot); ok {
+ if err := oneof.AtExactSnapshot.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ZedToken{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Requirement = &Consistency_AtExactSnapshot{AtExactSnapshot: v}
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FullyConsistent", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Requirement = &Consistency_FullyConsistent{FullyConsistent: b}
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *RelationshipFilter) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: RelationshipFilter: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: RelationshipFilter: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalResourceId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalResourceId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalRelation", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalRelation = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalSubjectFilter", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalSubjectFilter == nil {
+ m.OptionalSubjectFilter = &SubjectFilter{}
+ }
+ if err := m.OptionalSubjectFilter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalResourceIdPrefix", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalResourceIdPrefix = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SubjectFilter_RelationFilter) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SubjectFilter_RelationFilter: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SubjectFilter_RelationFilter: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Relation = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *SubjectFilter) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SubjectFilter: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SubjectFilter: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SubjectType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SubjectType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalSubjectId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalSubjectId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalRelation", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalRelation == nil {
+ m.OptionalRelation = &SubjectFilter_RelationFilter{}
+ }
+ if err := m.OptionalRelation.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReadRelationshipsRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReadRelationshipsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReadRelationshipsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationshipFilter", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RelationshipFilter == nil {
+ m.RelationshipFilter = &RelationshipFilter{}
+ }
+ if err := m.RelationshipFilter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalLimit", wireType)
+ }
+ m.OptionalLimit = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.OptionalLimit |= uint32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalCursor", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalCursor == nil {
+ m.OptionalCursor = &Cursor{}
+ }
+ if err := m.OptionalCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReadRelationshipsResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReadRelationshipsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReadRelationshipsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ReadAt == nil {
+ m.ReadAt = &ZedToken{}
+ }
+ if err := m.ReadAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Relationship", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Relationship == nil {
+ m.Relationship = &Relationship{}
+ }
+ if err := m.Relationship.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AfterResultCursor", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AfterResultCursor == nil {
+ m.AfterResultCursor = &Cursor{}
+ }
+ if err := m.AfterResultCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Precondition) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Precondition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Precondition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType)
+ }
+ m.Operation = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Operation |= Precondition_Operation(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Filter == nil {
+ m.Filter = &RelationshipFilter{}
+ }
+ if err := m.Filter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *WriteRelationshipsRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: WriteRelationshipsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: WriteRelationshipsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Updates", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Updates = append(m.Updates, &RelationshipUpdate{})
+ if err := m.Updates[len(m.Updates)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalPreconditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalPreconditions = append(m.OptionalPreconditions, &Precondition{})
+ if err := m.OptionalPreconditions[len(m.OptionalPreconditions)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalTransactionMetadata", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalTransactionMetadata == nil {
+ m.OptionalTransactionMetadata = &structpb.Struct{}
+ }
+ if err := (*structpb1.Struct)(m.OptionalTransactionMetadata).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *WriteRelationshipsResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: WriteRelationshipsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: WriteRelationshipsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field WrittenAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.WrittenAt == nil {
+ m.WrittenAt = &ZedToken{}
+ }
+ if err := m.WrittenAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeleteRelationshipsRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeleteRelationshipsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeleteRelationshipsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationshipFilter", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.RelationshipFilter == nil {
+ m.RelationshipFilter = &RelationshipFilter{}
+ }
+ if err := m.RelationshipFilter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalPreconditions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalPreconditions = append(m.OptionalPreconditions, &Precondition{})
+ if err := m.OptionalPreconditions[len(m.OptionalPreconditions)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalLimit", wireType)
+ }
+ m.OptionalLimit = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.OptionalLimit |= uint32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalAllowPartialDeletions", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.OptionalAllowPartialDeletions = bool(v != 0)
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalTransactionMetadata", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalTransactionMetadata == nil {
+ m.OptionalTransactionMetadata = &structpb.Struct{}
+ }
+ if err := (*structpb1.Struct)(m.OptionalTransactionMetadata).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DeleteRelationshipsResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DeleteRelationshipsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DeleteRelationshipsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeletedAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.DeletedAt == nil {
+ m.DeletedAt = &ZedToken{}
+ }
+ if err := m.DeletedAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DeletionProgress", wireType)
+ }
+ m.DeletionProgress = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.DeletionProgress |= DeleteRelationshipsResponse_DeletionProgress(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationshipsDeletedCount", wireType)
+ }
+ m.RelationshipsDeletedCount = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.RelationshipsDeletedCount |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CheckPermissionRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CheckPermissionRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CheckPermissionRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resource == nil {
+ m.Resource = &ObjectReference{}
+ }
+ if err := m.Resource.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Permission = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Subject == nil {
+ m.Subject = &SubjectReference{}
+ }
+ if err := m.Subject.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Context == nil {
+ m.Context = &structpb.Struct{}
+ }
+ if err := (*structpb1.Struct)(m.Context).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field WithTracing", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.WithTracing = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CheckPermissionResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CheckPermissionResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CheckPermissionResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CheckedAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.CheckedAt == nil {
+ m.CheckedAt = &ZedToken{}
+ }
+ if err := m.CheckedAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permissionship", wireType)
+ }
+ m.Permissionship = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Permissionship |= CheckPermissionResponse_Permissionship(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PartialCaveatInfo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PartialCaveatInfo == nil {
+ m.PartialCaveatInfo = &PartialCaveatInfo{}
+ }
+ if err := m.PartialCaveatInfo.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DebugTrace", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.DebugTrace == nil {
+ m.DebugTrace = &DebugInformation{}
+ }
+ if err := m.DebugTrace.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalExpiresAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalExpiresAt == nil {
+ m.OptionalExpiresAt = &timestamppb.Timestamp{}
+ }
+ if err := (*timestamppb1.Timestamp)(m.OptionalExpiresAt).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CheckBulkPermissionsRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CheckBulkPermissionsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CheckBulkPermissionsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Items = append(m.Items, &CheckBulkPermissionsRequestItem{})
+ if err := m.Items[len(m.Items)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field WithTracing", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.WithTracing = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CheckBulkPermissionsRequestItem) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CheckBulkPermissionsRequestItem: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CheckBulkPermissionsRequestItem: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resource == nil {
+ m.Resource = &ObjectReference{}
+ }
+ if err := m.Resource.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Permission = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Subject == nil {
+ m.Subject = &SubjectReference{}
+ }
+ if err := m.Subject.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Context == nil {
+ m.Context = &structpb.Struct{}
+ }
+ if err := (*structpb1.Struct)(m.Context).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CheckBulkPermissionsResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CheckBulkPermissionsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CheckBulkPermissionsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CheckedAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.CheckedAt == nil {
+ m.CheckedAt = &ZedToken{}
+ }
+ if err := m.CheckedAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Pairs", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Pairs = append(m.Pairs, &CheckBulkPermissionsPair{})
+ if err := m.Pairs[len(m.Pairs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CheckBulkPermissionsPair) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CheckBulkPermissionsPair: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CheckBulkPermissionsPair: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Request == nil {
+ m.Request = &CheckBulkPermissionsRequestItem{}
+ }
+ if err := m.Request.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Item", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Response.(*CheckBulkPermissionsPair_Item); ok {
+ if err := oneof.Item.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &CheckBulkPermissionsResponseItem{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Response = &CheckBulkPermissionsPair_Item{Item: v}
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Response.(*CheckBulkPermissionsPair_Error); ok {
+ if unmarshal, ok := interface{}(oneof.Error).(interface {
+ UnmarshalVT([]byte) error
+ }); ok {
+ if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ if err := proto.Unmarshal(dAtA[iNdEx:postIndex], oneof.Error); err != nil {
+ return err
+ }
+ }
+ } else {
+ v := &status.Status{}
+ if unmarshal, ok := interface{}(v).(interface {
+ UnmarshalVT([]byte) error
+ }); ok {
+ if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ if err := proto.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil {
+ return err
+ }
+ }
+ m.Response = &CheckBulkPermissionsPair_Error{Error: v}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *CheckBulkPermissionsResponseItem) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: CheckBulkPermissionsResponseItem: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: CheckBulkPermissionsResponseItem: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permissionship", wireType)
+ }
+ m.Permissionship = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Permissionship |= CheckPermissionResponse_Permissionship(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PartialCaveatInfo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PartialCaveatInfo == nil {
+ m.PartialCaveatInfo = &PartialCaveatInfo{}
+ }
+ if err := m.PartialCaveatInfo.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DebugTrace", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.DebugTrace == nil {
+ m.DebugTrace = &DebugInformation{}
+ }
+ if err := m.DebugTrace.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExpandPermissionTreeRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExpandPermissionTreeRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExpandPermissionTreeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resource == nil {
+ m.Resource = &ObjectReference{}
+ }
+ if err := m.Resource.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Permission = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExpandPermissionTreeResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExpandPermissionTreeResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExpandPermissionTreeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExpandedAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ExpandedAt == nil {
+ m.ExpandedAt = &ZedToken{}
+ }
+ if err := m.ExpandedAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TreeRoot", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.TreeRoot == nil {
+ m.TreeRoot = &PermissionRelationshipTree{}
+ }
+ if err := m.TreeRoot.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LookupResourcesRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LookupResourcesRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LookupResourcesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceObjectType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceObjectType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Permission = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Subject == nil {
+ m.Subject = &SubjectReference{}
+ }
+ if err := m.Subject.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Context == nil {
+ m.Context = &structpb.Struct{}
+ }
+ if err := (*structpb1.Struct)(m.Context).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalLimit", wireType)
+ }
+ m.OptionalLimit = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.OptionalLimit |= uint32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalCursor", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalCursor == nil {
+ m.OptionalCursor = &Cursor{}
+ }
+ if err := m.OptionalCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LookupResourcesResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LookupResourcesResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LookupResourcesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LookedUpAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.LookedUpAt == nil {
+ m.LookedUpAt = &ZedToken{}
+ }
+ if err := m.LookedUpAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResourceObjectId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResourceObjectId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permissionship", wireType)
+ }
+ m.Permissionship = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Permissionship |= LookupPermissionship(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PartialCaveatInfo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PartialCaveatInfo == nil {
+ m.PartialCaveatInfo = &PartialCaveatInfo{}
+ }
+ if err := m.PartialCaveatInfo.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AfterResultCursor", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AfterResultCursor == nil {
+ m.AfterResultCursor = &Cursor{}
+ }
+ if err := m.AfterResultCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LookupSubjectsRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LookupSubjectsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LookupSubjectsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Resource == nil {
+ m.Resource = &ObjectReference{}
+ }
+ if err := m.Resource.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Permission = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SubjectObjectType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SubjectObjectType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalSubjectRelation", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalSubjectRelation = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Context == nil {
+ m.Context = &structpb.Struct{}
+ }
+ if err := (*structpb1.Struct)(m.Context).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalConcreteLimit", wireType)
+ }
+ m.OptionalConcreteLimit = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.OptionalConcreteLimit |= uint32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalCursor", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalCursor == nil {
+ m.OptionalCursor = &Cursor{}
+ }
+ if err := m.OptionalCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field WildcardOption", wireType)
+ }
+ m.WildcardOption = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.WildcardOption |= LookupSubjectsRequest_WildcardOption(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *LookupSubjectsResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: LookupSubjectsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: LookupSubjectsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LookedUpAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.LookedUpAt == nil {
+ m.LookedUpAt = &ZedToken{}
+ }
+ if err := m.LookedUpAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SubjectObjectId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SubjectObjectId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExcludedSubjectIds", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ExcludedSubjectIds = append(m.ExcludedSubjectIds, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permissionship", wireType)
+ }
+ m.Permissionship = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Permissionship |= LookupPermissionship(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PartialCaveatInfo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PartialCaveatInfo == nil {
+ m.PartialCaveatInfo = &PartialCaveatInfo{}
+ }
+ if err := m.PartialCaveatInfo.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Subject == nil {
+ m.Subject = &ResolvedSubject{}
+ }
+ if err := m.Subject.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExcludedSubjects", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ExcludedSubjects = append(m.ExcludedSubjects, &ResolvedSubject{})
+ if err := m.ExcludedSubjects[len(m.ExcludedSubjects)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AfterResultCursor", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AfterResultCursor == nil {
+ m.AfterResultCursor = &Cursor{}
+ }
+ if err := m.AfterResultCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ResolvedSubject) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ResolvedSubject: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ResolvedSubject: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SubjectObjectId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SubjectObjectId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permissionship", wireType)
+ }
+ m.Permissionship = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Permissionship |= LookupPermissionship(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PartialCaveatInfo", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.PartialCaveatInfo == nil {
+ m.PartialCaveatInfo = &PartialCaveatInfo{}
+ }
+ if err := m.PartialCaveatInfo.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ImportBulkRelationshipsRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ImportBulkRelationshipsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ImportBulkRelationshipsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Relationships", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Relationships = append(m.Relationships, &Relationship{})
+ if err := m.Relationships[len(m.Relationships)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ImportBulkRelationshipsResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ImportBulkRelationshipsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ImportBulkRelationshipsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field NumLoaded", wireType)
+ }
+ m.NumLoaded = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.NumLoaded |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExportBulkRelationshipsRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExportBulkRelationshipsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExportBulkRelationshipsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalLimit", wireType)
+ }
+ m.OptionalLimit = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.OptionalLimit |= uint32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalCursor", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalCursor == nil {
+ m.OptionalCursor = &Cursor{}
+ }
+ if err := m.OptionalCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalRelationshipFilter", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalRelationshipFilter == nil {
+ m.OptionalRelationshipFilter = &RelationshipFilter{}
+ }
+ if err := m.OptionalRelationshipFilter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ExportBulkRelationshipsResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ExportBulkRelationshipsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ExportBulkRelationshipsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AfterResultCursor", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.AfterResultCursor == nil {
+ m.AfterResultCursor = &Cursor{}
+ }
+ if err := m.AfterResultCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Relationships", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Relationships = append(m.Relationships, &Relationship{})
+ if err := m.Relationships[len(m.Relationships)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service.pb.go
new file mode 100644
index 0000000..4e630db
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service.pb.go
@@ -0,0 +1,2001 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.6
+// protoc (unknown)
+// source: authzed/api/v1/schema_service.proto
+
+package v1
+
+import (
+ _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ _ "google.golang.org/genproto/googleapis/api/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// ReadSchemaRequest returns the schema from the database.
+type ReadSchemaRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReadSchemaRequest) Reset() {
+ *x = ReadSchemaRequest{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReadSchemaRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReadSchemaRequest) ProtoMessage() {}
+
+func (x *ReadSchemaRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReadSchemaRequest.ProtoReflect.Descriptor instead.
+func (*ReadSchemaRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{0}
+}
+
+// ReadSchemaResponse is the resulting data after having read the Object
+// Definitions from a Schema.
+type ReadSchemaResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // schema_text is the textual form of the current schema in the system
+ SchemaText string `protobuf:"bytes,1,opt,name=schema_text,json=schemaText,proto3" json:"schema_text,omitempty"`
+ // read_at is the ZedToken at which the schema was read.
+ ReadAt *ZedToken `protobuf:"bytes,2,opt,name=read_at,json=readAt,proto3" json:"read_at,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReadSchemaResponse) Reset() {
+ *x = ReadSchemaResponse{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReadSchemaResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReadSchemaResponse) ProtoMessage() {}
+
+func (x *ReadSchemaResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReadSchemaResponse.ProtoReflect.Descriptor instead.
+func (*ReadSchemaResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ReadSchemaResponse) GetSchemaText() string {
+ if x != nil {
+ return x.SchemaText
+ }
+ return ""
+}
+
+func (x *ReadSchemaResponse) GetReadAt() *ZedToken {
+ if x != nil {
+ return x.ReadAt
+ }
+ return nil
+}
+
+// WriteSchemaRequest is the required data used to "upsert" the Schema of a
+// Permissions System.
+type WriteSchemaRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The Schema containing one or more Object Definitions that will be written
+ // to the Permissions System.
+ Schema string `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` // 4MiB
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WriteSchemaRequest) Reset() {
+ *x = WriteSchemaRequest{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WriteSchemaRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WriteSchemaRequest) ProtoMessage() {}
+
+func (x *WriteSchemaRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[2]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WriteSchemaRequest.ProtoReflect.Descriptor instead.
+func (*WriteSchemaRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *WriteSchemaRequest) GetSchema() string {
+ if x != nil {
+ return x.Schema
+ }
+ return ""
+}
+
+// WriteSchemaResponse is the resulting data after having written a Schema to
+// a Permissions System.
+type WriteSchemaResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // written_at is the ZedToken at which the schema was written.
+ WrittenAt *ZedToken `protobuf:"bytes,1,opt,name=written_at,json=writtenAt,proto3" json:"written_at,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WriteSchemaResponse) Reset() {
+ *x = WriteSchemaResponse{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WriteSchemaResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WriteSchemaResponse) ProtoMessage() {}
+
+func (x *WriteSchemaResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[3]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WriteSchemaResponse.ProtoReflect.Descriptor instead.
+func (*WriteSchemaResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *WriteSchemaResponse) GetWrittenAt() *ZedToken {
+ if x != nil {
+ return x.WrittenAt
+ }
+ return nil
+}
+
+type ReflectSchemaRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ // optional_filters defines optional filters that are applied in
+ // an OR fashion to the schema, before being returned
+ OptionalFilters []*ReflectionSchemaFilter `protobuf:"bytes,2,rep,name=optional_filters,json=optionalFilters,proto3" json:"optional_filters,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReflectSchemaRequest) Reset() {
+ *x = ReflectSchemaRequest{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReflectSchemaRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReflectSchemaRequest) ProtoMessage() {}
+
+func (x *ReflectSchemaRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[4]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReflectSchemaRequest.ProtoReflect.Descriptor instead.
+func (*ReflectSchemaRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *ReflectSchemaRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+func (x *ReflectSchemaRequest) GetOptionalFilters() []*ReflectionSchemaFilter {
+ if x != nil {
+ return x.OptionalFilters
+ }
+ return nil
+}
+
+type ReflectSchemaResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // definitions are the definitions defined in the schema.
+ Definitions []*ReflectionDefinition `protobuf:"bytes,1,rep,name=definitions,proto3" json:"definitions,omitempty"`
+ // caveats are the caveats defined in the schema.
+ Caveats []*ReflectionCaveat `protobuf:"bytes,2,rep,name=caveats,proto3" json:"caveats,omitempty"`
+ // read_at is the ZedToken at which the schema was read.
+ ReadAt *ZedToken `protobuf:"bytes,3,opt,name=read_at,json=readAt,proto3" json:"read_at,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReflectSchemaResponse) Reset() {
+ *x = ReflectSchemaResponse{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReflectSchemaResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReflectSchemaResponse) ProtoMessage() {}
+
+func (x *ReflectSchemaResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[5]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReflectSchemaResponse.ProtoReflect.Descriptor instead.
+func (*ReflectSchemaResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *ReflectSchemaResponse) GetDefinitions() []*ReflectionDefinition {
+ if x != nil {
+ return x.Definitions
+ }
+ return nil
+}
+
+func (x *ReflectSchemaResponse) GetCaveats() []*ReflectionCaveat {
+ if x != nil {
+ return x.Caveats
+ }
+ return nil
+}
+
+func (x *ReflectSchemaResponse) GetReadAt() *ZedToken {
+ if x != nil {
+ return x.ReadAt
+ }
+ return nil
+}
+
+// ReflectionSchemaFilter is a filter that can be applied to the schema on reflection.
+type ReflectionSchemaFilter struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // optional_definition_name_filter is a prefix that is matched against the definition name.
+ OptionalDefinitionNameFilter string `protobuf:"bytes,1,opt,name=optional_definition_name_filter,json=optionalDefinitionNameFilter,proto3" json:"optional_definition_name_filter,omitempty"`
+ // optional_caveat_name_filter is a prefix that is matched against the caveat name.
+ OptionalCaveatNameFilter string `protobuf:"bytes,2,opt,name=optional_caveat_name_filter,json=optionalCaveatNameFilter,proto3" json:"optional_caveat_name_filter,omitempty"`
+ // optional_relation_name_filter is a prefix that is matched against the relation name.
+ OptionalRelationNameFilter string `protobuf:"bytes,3,opt,name=optional_relation_name_filter,json=optionalRelationNameFilter,proto3" json:"optional_relation_name_filter,omitempty"`
+ // optional_permission_name_filter is a prefix that is matched against the permission name.
+ OptionalPermissionNameFilter string `protobuf:"bytes,4,opt,name=optional_permission_name_filter,json=optionalPermissionNameFilter,proto3" json:"optional_permission_name_filter,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReflectionSchemaFilter) Reset() {
+ *x = ReflectionSchemaFilter{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReflectionSchemaFilter) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReflectionSchemaFilter) ProtoMessage() {}
+
+func (x *ReflectionSchemaFilter) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[6]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReflectionSchemaFilter.ProtoReflect.Descriptor instead.
+func (*ReflectionSchemaFilter) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *ReflectionSchemaFilter) GetOptionalDefinitionNameFilter() string {
+ if x != nil {
+ return x.OptionalDefinitionNameFilter
+ }
+ return ""
+}
+
+func (x *ReflectionSchemaFilter) GetOptionalCaveatNameFilter() string {
+ if x != nil {
+ return x.OptionalCaveatNameFilter
+ }
+ return ""
+}
+
+func (x *ReflectionSchemaFilter) GetOptionalRelationNameFilter() string {
+ if x != nil {
+ return x.OptionalRelationNameFilter
+ }
+ return ""
+}
+
+func (x *ReflectionSchemaFilter) GetOptionalPermissionNameFilter() string {
+ if x != nil {
+ return x.OptionalPermissionNameFilter
+ }
+ return ""
+}
+
+// ReflectionDefinition is the representation of a definition in the schema.
+type ReflectionDefinition struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // comment is a human-readable comments on the definition. Will include
+ // delimiter characters.
+ Comment string `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"`
+ Relations []*ReflectionRelation `protobuf:"bytes,3,rep,name=relations,proto3" json:"relations,omitempty"`
+ Permissions []*ReflectionPermission `protobuf:"bytes,4,rep,name=permissions,proto3" json:"permissions,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReflectionDefinition) Reset() {
+ *x = ReflectionDefinition{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReflectionDefinition) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReflectionDefinition) ProtoMessage() {}
+
+func (x *ReflectionDefinition) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[7]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReflectionDefinition.ProtoReflect.Descriptor instead.
+func (*ReflectionDefinition) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *ReflectionDefinition) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ReflectionDefinition) GetComment() string {
+ if x != nil {
+ return x.Comment
+ }
+ return ""
+}
+
+func (x *ReflectionDefinition) GetRelations() []*ReflectionRelation {
+ if x != nil {
+ return x.Relations
+ }
+ return nil
+}
+
+func (x *ReflectionDefinition) GetPermissions() []*ReflectionPermission {
+ if x != nil {
+ return x.Permissions
+ }
+ return nil
+}
+
+// ReflectionCaveat is the representation of a caveat in the schema.
+type ReflectionCaveat struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // comment is a human-readable comments on the caveat. Will include
+ // delimiter characters.
+ Comment string `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"`
+ Parameters []*ReflectionCaveatParameter `protobuf:"bytes,3,rep,name=parameters,proto3" json:"parameters,omitempty"`
+ Expression string `protobuf:"bytes,4,opt,name=expression,proto3" json:"expression,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReflectionCaveat) Reset() {
+ *x = ReflectionCaveat{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReflectionCaveat) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReflectionCaveat) ProtoMessage() {}
+
+func (x *ReflectionCaveat) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[8]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReflectionCaveat.ProtoReflect.Descriptor instead.
+func (*ReflectionCaveat) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *ReflectionCaveat) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ReflectionCaveat) GetComment() string {
+ if x != nil {
+ return x.Comment
+ }
+ return ""
+}
+
+func (x *ReflectionCaveat) GetParameters() []*ReflectionCaveatParameter {
+ if x != nil {
+ return x.Parameters
+ }
+ return nil
+}
+
+func (x *ReflectionCaveat) GetExpression() string {
+ if x != nil {
+ return x.Expression
+ }
+ return ""
+}
+
+// ReflectionCaveatParameter is the representation of a parameter in a caveat.
+type ReflectionCaveatParameter struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // type is the type of the parameter. Will be a string representing the
+ // type, e.g. `int` or `list<string>`
+ Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
+ ParentCaveatName string `protobuf:"bytes,3,opt,name=parent_caveat_name,json=parentCaveatName,proto3" json:"parent_caveat_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReflectionCaveatParameter) Reset() {
+ *x = ReflectionCaveatParameter{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReflectionCaveatParameter) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReflectionCaveatParameter) ProtoMessage() {}
+
+func (x *ReflectionCaveatParameter) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[9]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReflectionCaveatParameter.ProtoReflect.Descriptor instead.
+func (*ReflectionCaveatParameter) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *ReflectionCaveatParameter) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ReflectionCaveatParameter) GetType() string {
+ if x != nil {
+ return x.Type
+ }
+ return ""
+}
+
+func (x *ReflectionCaveatParameter) GetParentCaveatName() string {
+ if x != nil {
+ return x.ParentCaveatName
+ }
+ return ""
+}
+
+// ReflectionRelation is the representation of a relation in the schema.
+type ReflectionRelation struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Comment string `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"`
+ ParentDefinitionName string `protobuf:"bytes,3,opt,name=parent_definition_name,json=parentDefinitionName,proto3" json:"parent_definition_name,omitempty"`
+ SubjectTypes []*ReflectionTypeReference `protobuf:"bytes,4,rep,name=subject_types,json=subjectTypes,proto3" json:"subject_types,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReflectionRelation) Reset() {
+ *x = ReflectionRelation{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReflectionRelation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReflectionRelation) ProtoMessage() {}
+
+func (x *ReflectionRelation) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[10]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReflectionRelation.ProtoReflect.Descriptor instead.
+func (*ReflectionRelation) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *ReflectionRelation) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ReflectionRelation) GetComment() string {
+ if x != nil {
+ return x.Comment
+ }
+ return ""
+}
+
+func (x *ReflectionRelation) GetParentDefinitionName() string {
+ if x != nil {
+ return x.ParentDefinitionName
+ }
+ return ""
+}
+
+func (x *ReflectionRelation) GetSubjectTypes() []*ReflectionTypeReference {
+ if x != nil {
+ return x.SubjectTypes
+ }
+ return nil
+}
+
+// ReflectionTypeReference is the representation of a type reference in the schema.
+type ReflectionTypeReference struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // subject_definition_name is the name of the subject's definition.
+ SubjectDefinitionName string `protobuf:"bytes,1,opt,name=subject_definition_name,json=subjectDefinitionName,proto3" json:"subject_definition_name,omitempty"`
+ // optional_caveat_name is the name of the caveat that is applied to the subject, if any.
+ OptionalCaveatName string `protobuf:"bytes,2,opt,name=optional_caveat_name,json=optionalCaveatName,proto3" json:"optional_caveat_name,omitempty"`
+ // Types that are valid to be assigned to Typeref:
+ //
+ // *ReflectionTypeReference_IsTerminalSubject
+ // *ReflectionTypeReference_OptionalRelationName
+ // *ReflectionTypeReference_IsPublicWildcard
+ Typeref isReflectionTypeReference_Typeref `protobuf_oneof:"typeref"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReflectionTypeReference) Reset() {
+ *x = ReflectionTypeReference{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReflectionTypeReference) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReflectionTypeReference) ProtoMessage() {}
+
+func (x *ReflectionTypeReference) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[11]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReflectionTypeReference.ProtoReflect.Descriptor instead.
+func (*ReflectionTypeReference) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *ReflectionTypeReference) GetSubjectDefinitionName() string {
+ if x != nil {
+ return x.SubjectDefinitionName
+ }
+ return ""
+}
+
+func (x *ReflectionTypeReference) GetOptionalCaveatName() string {
+ if x != nil {
+ return x.OptionalCaveatName
+ }
+ return ""
+}
+
+func (x *ReflectionTypeReference) GetTyperef() isReflectionTypeReference_Typeref {
+ if x != nil {
+ return x.Typeref
+ }
+ return nil
+}
+
+func (x *ReflectionTypeReference) GetIsTerminalSubject() bool {
+ if x != nil {
+ if x, ok := x.Typeref.(*ReflectionTypeReference_IsTerminalSubject); ok {
+ return x.IsTerminalSubject
+ }
+ }
+ return false
+}
+
+func (x *ReflectionTypeReference) GetOptionalRelationName() string {
+ if x != nil {
+ if x, ok := x.Typeref.(*ReflectionTypeReference_OptionalRelationName); ok {
+ return x.OptionalRelationName
+ }
+ }
+ return ""
+}
+
+func (x *ReflectionTypeReference) GetIsPublicWildcard() bool {
+ if x != nil {
+ if x, ok := x.Typeref.(*ReflectionTypeReference_IsPublicWildcard); ok {
+ return x.IsPublicWildcard
+ }
+ }
+ return false
+}
+
+type isReflectionTypeReference_Typeref interface {
+ isReflectionTypeReference_Typeref()
+}
+
+type ReflectionTypeReference_IsTerminalSubject struct {
+ // is_terminal_subject is true if the subject is terminal, meaning it is referenced directly vs a sub-relation.
+ IsTerminalSubject bool `protobuf:"varint,3,opt,name=is_terminal_subject,json=isTerminalSubject,proto3,oneof"`
+}
+
+type ReflectionTypeReference_OptionalRelationName struct {
+ // optional_relation_name is the name of the relation that is applied to the subject, if any.
+ OptionalRelationName string `protobuf:"bytes,4,opt,name=optional_relation_name,json=optionalRelationName,proto3,oneof"`
+}
+
+type ReflectionTypeReference_IsPublicWildcard struct {
+ // is_public_wildcard is true if the subject is a public wildcard.
+ IsPublicWildcard bool `protobuf:"varint,5,opt,name=is_public_wildcard,json=isPublicWildcard,proto3,oneof"`
+}
+
+func (*ReflectionTypeReference_IsTerminalSubject) isReflectionTypeReference_Typeref() {}
+
+func (*ReflectionTypeReference_OptionalRelationName) isReflectionTypeReference_Typeref() {}
+
+func (*ReflectionTypeReference_IsPublicWildcard) isReflectionTypeReference_Typeref() {}
+
+// ReflectionPermission is the representation of a permission in the schema.
+type ReflectionPermission struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // comment is a human-readable comments on the permission. Will include
+ // delimiter characters.
+ Comment string `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"`
+ ParentDefinitionName string `protobuf:"bytes,3,opt,name=parent_definition_name,json=parentDefinitionName,proto3" json:"parent_definition_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReflectionPermission) Reset() {
+ *x = ReflectionPermission{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReflectionPermission) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReflectionPermission) ProtoMessage() {}
+
+func (x *ReflectionPermission) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[12]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReflectionPermission.ProtoReflect.Descriptor instead.
+func (*ReflectionPermission) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *ReflectionPermission) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ReflectionPermission) GetComment() string {
+ if x != nil {
+ return x.Comment
+ }
+ return ""
+}
+
+func (x *ReflectionPermission) GetParentDefinitionName() string {
+ if x != nil {
+ return x.ParentDefinitionName
+ }
+ return ""
+}
+
+type ComputablePermissionsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ DefinitionName string `protobuf:"bytes,2,opt,name=definition_name,json=definitionName,proto3" json:"definition_name,omitempty"`
+ RelationName string `protobuf:"bytes,3,opt,name=relation_name,json=relationName,proto3" json:"relation_name,omitempty"`
+ // optional_definition_name_match is a prefix that is matched against the definition name(s)
+ // for the permissions returned.
+ // If not specified, will be ignored.
+ OptionalDefinitionNameFilter string `protobuf:"bytes,4,opt,name=optional_definition_name_filter,json=optionalDefinitionNameFilter,proto3" json:"optional_definition_name_filter,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ComputablePermissionsRequest) Reset() {
+ *x = ComputablePermissionsRequest{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ComputablePermissionsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ComputablePermissionsRequest) ProtoMessage() {}
+
+func (x *ComputablePermissionsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[13]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ComputablePermissionsRequest.ProtoReflect.Descriptor instead.
+func (*ComputablePermissionsRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *ComputablePermissionsRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+func (x *ComputablePermissionsRequest) GetDefinitionName() string {
+ if x != nil {
+ return x.DefinitionName
+ }
+ return ""
+}
+
+func (x *ComputablePermissionsRequest) GetRelationName() string {
+ if x != nil {
+ return x.RelationName
+ }
+ return ""
+}
+
+func (x *ComputablePermissionsRequest) GetOptionalDefinitionNameFilter() string {
+ if x != nil {
+ return x.OptionalDefinitionNameFilter
+ }
+ return ""
+}
+
+// ReflectionRelationReference is a reference to a relation or permission in the schema.
+type ReflectionRelationReference struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ DefinitionName string `protobuf:"bytes,1,opt,name=definition_name,json=definitionName,proto3" json:"definition_name,omitempty"`
+ RelationName string `protobuf:"bytes,2,opt,name=relation_name,json=relationName,proto3" json:"relation_name,omitempty"`
+ IsPermission bool `protobuf:"varint,3,opt,name=is_permission,json=isPermission,proto3" json:"is_permission,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReflectionRelationReference) Reset() {
+ *x = ReflectionRelationReference{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReflectionRelationReference) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReflectionRelationReference) ProtoMessage() {}
+
+func (x *ReflectionRelationReference) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[14]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReflectionRelationReference.ProtoReflect.Descriptor instead.
+func (*ReflectionRelationReference) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *ReflectionRelationReference) GetDefinitionName() string {
+ if x != nil {
+ return x.DefinitionName
+ }
+ return ""
+}
+
+func (x *ReflectionRelationReference) GetRelationName() string {
+ if x != nil {
+ return x.RelationName
+ }
+ return ""
+}
+
+func (x *ReflectionRelationReference) GetIsPermission() bool {
+ if x != nil {
+ return x.IsPermission
+ }
+ return false
+}
+
+type ComputablePermissionsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Permissions []*ReflectionRelationReference `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"`
+ // read_at is the ZedToken at which the schema was read.
+ ReadAt *ZedToken `protobuf:"bytes,2,opt,name=read_at,json=readAt,proto3" json:"read_at,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ComputablePermissionsResponse) Reset() {
+ *x = ComputablePermissionsResponse{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ComputablePermissionsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ComputablePermissionsResponse) ProtoMessage() {}
+
+func (x *ComputablePermissionsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[15]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ComputablePermissionsResponse.ProtoReflect.Descriptor instead.
+func (*ComputablePermissionsResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *ComputablePermissionsResponse) GetPermissions() []*ReflectionRelationReference {
+ if x != nil {
+ return x.Permissions
+ }
+ return nil
+}
+
+func (x *ComputablePermissionsResponse) GetReadAt() *ZedToken {
+ if x != nil {
+ return x.ReadAt
+ }
+ return nil
+}
+
+type DependentRelationsRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ DefinitionName string `protobuf:"bytes,2,opt,name=definition_name,json=definitionName,proto3" json:"definition_name,omitempty"`
+ PermissionName string `protobuf:"bytes,3,opt,name=permission_name,json=permissionName,proto3" json:"permission_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DependentRelationsRequest) Reset() {
+ *x = DependentRelationsRequest{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DependentRelationsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DependentRelationsRequest) ProtoMessage() {}
+
+func (x *DependentRelationsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[16]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DependentRelationsRequest.ProtoReflect.Descriptor instead.
+func (*DependentRelationsRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *DependentRelationsRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+func (x *DependentRelationsRequest) GetDefinitionName() string {
+ if x != nil {
+ return x.DefinitionName
+ }
+ return ""
+}
+
+func (x *DependentRelationsRequest) GetPermissionName() string {
+ if x != nil {
+ return x.PermissionName
+ }
+ return ""
+}
+
+type DependentRelationsResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Relations []*ReflectionRelationReference `protobuf:"bytes,1,rep,name=relations,proto3" json:"relations,omitempty"`
+ // read_at is the ZedToken at which the schema was read.
+ ReadAt *ZedToken `protobuf:"bytes,2,opt,name=read_at,json=readAt,proto3" json:"read_at,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DependentRelationsResponse) Reset() {
+ *x = DependentRelationsResponse{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DependentRelationsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DependentRelationsResponse) ProtoMessage() {}
+
+func (x *DependentRelationsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[17]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DependentRelationsResponse.ProtoReflect.Descriptor instead.
+func (*DependentRelationsResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *DependentRelationsResponse) GetRelations() []*ReflectionRelationReference {
+ if x != nil {
+ return x.Relations
+ }
+ return nil
+}
+
+func (x *DependentRelationsResponse) GetReadAt() *ZedToken {
+ if x != nil {
+ return x.ReadAt
+ }
+ return nil
+}
+
+type DiffSchemaRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Consistency *Consistency `protobuf:"bytes,1,opt,name=consistency,proto3" json:"consistency,omitempty"`
+ ComparisonSchema string `protobuf:"bytes,2,opt,name=comparison_schema,json=comparisonSchema,proto3" json:"comparison_schema,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DiffSchemaRequest) Reset() {
+ *x = DiffSchemaRequest{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DiffSchemaRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DiffSchemaRequest) ProtoMessage() {}
+
+func (x *DiffSchemaRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[18]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DiffSchemaRequest.ProtoReflect.Descriptor instead.
+func (*DiffSchemaRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *DiffSchemaRequest) GetConsistency() *Consistency {
+ if x != nil {
+ return x.Consistency
+ }
+ return nil
+}
+
+func (x *DiffSchemaRequest) GetComparisonSchema() string {
+ if x != nil {
+ return x.ComparisonSchema
+ }
+ return ""
+}
+
+type DiffSchemaResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Diffs []*ReflectionSchemaDiff `protobuf:"bytes,1,rep,name=diffs,proto3" json:"diffs,omitempty"`
+ // read_at is the ZedToken at which the schema was read.
+ ReadAt *ZedToken `protobuf:"bytes,2,opt,name=read_at,json=readAt,proto3" json:"read_at,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DiffSchemaResponse) Reset() {
+ *x = DiffSchemaResponse{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DiffSchemaResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DiffSchemaResponse) ProtoMessage() {}
+
+func (x *DiffSchemaResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[19]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DiffSchemaResponse.ProtoReflect.Descriptor instead.
+func (*DiffSchemaResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *DiffSchemaResponse) GetDiffs() []*ReflectionSchemaDiff {
+ if x != nil {
+ return x.Diffs
+ }
+ return nil
+}
+
+func (x *DiffSchemaResponse) GetReadAt() *ZedToken {
+ if x != nil {
+ return x.ReadAt
+ }
+ return nil
+}
+
+type ReflectionRelationSubjectTypeChange struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Relation *ReflectionRelation `protobuf:"bytes,1,opt,name=relation,proto3" json:"relation,omitempty"`
+ ChangedSubjectType *ReflectionTypeReference `protobuf:"bytes,2,opt,name=changed_subject_type,json=changedSubjectType,proto3" json:"changed_subject_type,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReflectionRelationSubjectTypeChange) Reset() {
+ *x = ReflectionRelationSubjectTypeChange{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReflectionRelationSubjectTypeChange) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReflectionRelationSubjectTypeChange) ProtoMessage() {}
+
+func (x *ReflectionRelationSubjectTypeChange) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[20]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReflectionRelationSubjectTypeChange.ProtoReflect.Descriptor instead.
+func (*ReflectionRelationSubjectTypeChange) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *ReflectionRelationSubjectTypeChange) GetRelation() *ReflectionRelation {
+ if x != nil {
+ return x.Relation
+ }
+ return nil
+}
+
+func (x *ReflectionRelationSubjectTypeChange) GetChangedSubjectType() *ReflectionTypeReference {
+ if x != nil {
+ return x.ChangedSubjectType
+ }
+ return nil
+}
+
+type ReflectionCaveatParameterTypeChange struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Parameter *ReflectionCaveatParameter `protobuf:"bytes,1,opt,name=parameter,proto3" json:"parameter,omitempty"`
+ PreviousType string `protobuf:"bytes,2,opt,name=previous_type,json=previousType,proto3" json:"previous_type,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReflectionCaveatParameterTypeChange) Reset() {
+ *x = ReflectionCaveatParameterTypeChange{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReflectionCaveatParameterTypeChange) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReflectionCaveatParameterTypeChange) ProtoMessage() {}
+
+func (x *ReflectionCaveatParameterTypeChange) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[21]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReflectionCaveatParameterTypeChange.ProtoReflect.Descriptor instead.
+func (*ReflectionCaveatParameterTypeChange) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *ReflectionCaveatParameterTypeChange) GetParameter() *ReflectionCaveatParameter {
+ if x != nil {
+ return x.Parameter
+ }
+ return nil
+}
+
+func (x *ReflectionCaveatParameterTypeChange) GetPreviousType() string {
+ if x != nil {
+ return x.PreviousType
+ }
+ return ""
+}
+
+// ReflectionSchemaDiff is the representation of a diff between two schemas.
+type ReflectionSchemaDiff struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // Types that are valid to be assigned to Diff:
+ //
+ // *ReflectionSchemaDiff_DefinitionAdded
+ // *ReflectionSchemaDiff_DefinitionRemoved
+ // *ReflectionSchemaDiff_DefinitionDocCommentChanged
+ // *ReflectionSchemaDiff_RelationAdded
+ // *ReflectionSchemaDiff_RelationRemoved
+ // *ReflectionSchemaDiff_RelationDocCommentChanged
+ // *ReflectionSchemaDiff_RelationSubjectTypeAdded
+ // *ReflectionSchemaDiff_RelationSubjectTypeRemoved
+ // *ReflectionSchemaDiff_PermissionAdded
+ // *ReflectionSchemaDiff_PermissionRemoved
+ // *ReflectionSchemaDiff_PermissionDocCommentChanged
+ // *ReflectionSchemaDiff_PermissionExprChanged
+ // *ReflectionSchemaDiff_CaveatAdded
+ // *ReflectionSchemaDiff_CaveatRemoved
+ // *ReflectionSchemaDiff_CaveatDocCommentChanged
+ // *ReflectionSchemaDiff_CaveatExprChanged
+ // *ReflectionSchemaDiff_CaveatParameterAdded
+ // *ReflectionSchemaDiff_CaveatParameterRemoved
+ // *ReflectionSchemaDiff_CaveatParameterTypeChanged
+ Diff isReflectionSchemaDiff_Diff `protobuf_oneof:"diff"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *ReflectionSchemaDiff) Reset() {
+ *x = ReflectionSchemaDiff{}
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *ReflectionSchemaDiff) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ReflectionSchemaDiff) ProtoMessage() {}
+
+func (x *ReflectionSchemaDiff) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_schema_service_proto_msgTypes[22]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ReflectionSchemaDiff.ProtoReflect.Descriptor instead.
+func (*ReflectionSchemaDiff) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_schema_service_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *ReflectionSchemaDiff) GetDiff() isReflectionSchemaDiff_Diff {
+ if x != nil {
+ return x.Diff
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetDefinitionAdded() *ReflectionDefinition {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_DefinitionAdded); ok {
+ return x.DefinitionAdded
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetDefinitionRemoved() *ReflectionDefinition {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_DefinitionRemoved); ok {
+ return x.DefinitionRemoved
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetDefinitionDocCommentChanged() *ReflectionDefinition {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_DefinitionDocCommentChanged); ok {
+ return x.DefinitionDocCommentChanged
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetRelationAdded() *ReflectionRelation {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_RelationAdded); ok {
+ return x.RelationAdded
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetRelationRemoved() *ReflectionRelation {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_RelationRemoved); ok {
+ return x.RelationRemoved
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetRelationDocCommentChanged() *ReflectionRelation {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_RelationDocCommentChanged); ok {
+ return x.RelationDocCommentChanged
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetRelationSubjectTypeAdded() *ReflectionRelationSubjectTypeChange {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_RelationSubjectTypeAdded); ok {
+ return x.RelationSubjectTypeAdded
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetRelationSubjectTypeRemoved() *ReflectionRelationSubjectTypeChange {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_RelationSubjectTypeRemoved); ok {
+ return x.RelationSubjectTypeRemoved
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetPermissionAdded() *ReflectionPermission {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_PermissionAdded); ok {
+ return x.PermissionAdded
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetPermissionRemoved() *ReflectionPermission {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_PermissionRemoved); ok {
+ return x.PermissionRemoved
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetPermissionDocCommentChanged() *ReflectionPermission {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_PermissionDocCommentChanged); ok {
+ return x.PermissionDocCommentChanged
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetPermissionExprChanged() *ReflectionPermission {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_PermissionExprChanged); ok {
+ return x.PermissionExprChanged
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetCaveatAdded() *ReflectionCaveat {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_CaveatAdded); ok {
+ return x.CaveatAdded
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetCaveatRemoved() *ReflectionCaveat {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_CaveatRemoved); ok {
+ return x.CaveatRemoved
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetCaveatDocCommentChanged() *ReflectionCaveat {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_CaveatDocCommentChanged); ok {
+ return x.CaveatDocCommentChanged
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetCaveatExprChanged() *ReflectionCaveat {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_CaveatExprChanged); ok {
+ return x.CaveatExprChanged
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetCaveatParameterAdded() *ReflectionCaveatParameter {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_CaveatParameterAdded); ok {
+ return x.CaveatParameterAdded
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetCaveatParameterRemoved() *ReflectionCaveatParameter {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_CaveatParameterRemoved); ok {
+ return x.CaveatParameterRemoved
+ }
+ }
+ return nil
+}
+
+func (x *ReflectionSchemaDiff) GetCaveatParameterTypeChanged() *ReflectionCaveatParameterTypeChange {
+ if x != nil {
+ if x, ok := x.Diff.(*ReflectionSchemaDiff_CaveatParameterTypeChanged); ok {
+ return x.CaveatParameterTypeChanged
+ }
+ }
+ return nil
+}
+
+type isReflectionSchemaDiff_Diff interface {
+ isReflectionSchemaDiff_Diff()
+}
+
+type ReflectionSchemaDiff_DefinitionAdded struct {
+ DefinitionAdded *ReflectionDefinition `protobuf:"bytes,1,opt,name=definition_added,json=definitionAdded,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_DefinitionRemoved struct {
+ DefinitionRemoved *ReflectionDefinition `protobuf:"bytes,2,opt,name=definition_removed,json=definitionRemoved,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_DefinitionDocCommentChanged struct {
+ DefinitionDocCommentChanged *ReflectionDefinition `protobuf:"bytes,3,opt,name=definition_doc_comment_changed,json=definitionDocCommentChanged,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_RelationAdded struct {
+ RelationAdded *ReflectionRelation `protobuf:"bytes,4,opt,name=relation_added,json=relationAdded,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_RelationRemoved struct {
+ RelationRemoved *ReflectionRelation `protobuf:"bytes,5,opt,name=relation_removed,json=relationRemoved,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_RelationDocCommentChanged struct {
+ RelationDocCommentChanged *ReflectionRelation `protobuf:"bytes,6,opt,name=relation_doc_comment_changed,json=relationDocCommentChanged,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_RelationSubjectTypeAdded struct {
+ RelationSubjectTypeAdded *ReflectionRelationSubjectTypeChange `protobuf:"bytes,7,opt,name=relation_subject_type_added,json=relationSubjectTypeAdded,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_RelationSubjectTypeRemoved struct {
+ RelationSubjectTypeRemoved *ReflectionRelationSubjectTypeChange `protobuf:"bytes,8,opt,name=relation_subject_type_removed,json=relationSubjectTypeRemoved,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_PermissionAdded struct {
+ PermissionAdded *ReflectionPermission `protobuf:"bytes,9,opt,name=permission_added,json=permissionAdded,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_PermissionRemoved struct {
+ PermissionRemoved *ReflectionPermission `protobuf:"bytes,10,opt,name=permission_removed,json=permissionRemoved,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_PermissionDocCommentChanged struct {
+ PermissionDocCommentChanged *ReflectionPermission `protobuf:"bytes,11,opt,name=permission_doc_comment_changed,json=permissionDocCommentChanged,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_PermissionExprChanged struct {
+ PermissionExprChanged *ReflectionPermission `protobuf:"bytes,12,opt,name=permission_expr_changed,json=permissionExprChanged,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_CaveatAdded struct {
+ CaveatAdded *ReflectionCaveat `protobuf:"bytes,13,opt,name=caveat_added,json=caveatAdded,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_CaveatRemoved struct {
+ CaveatRemoved *ReflectionCaveat `protobuf:"bytes,14,opt,name=caveat_removed,json=caveatRemoved,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_CaveatDocCommentChanged struct {
+ CaveatDocCommentChanged *ReflectionCaveat `protobuf:"bytes,15,opt,name=caveat_doc_comment_changed,json=caveatDocCommentChanged,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_CaveatExprChanged struct {
+ CaveatExprChanged *ReflectionCaveat `protobuf:"bytes,16,opt,name=caveat_expr_changed,json=caveatExprChanged,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_CaveatParameterAdded struct {
+ CaveatParameterAdded *ReflectionCaveatParameter `protobuf:"bytes,17,opt,name=caveat_parameter_added,json=caveatParameterAdded,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_CaveatParameterRemoved struct {
+ CaveatParameterRemoved *ReflectionCaveatParameter `protobuf:"bytes,18,opt,name=caveat_parameter_removed,json=caveatParameterRemoved,proto3,oneof"`
+}
+
+type ReflectionSchemaDiff_CaveatParameterTypeChanged struct {
+ CaveatParameterTypeChanged *ReflectionCaveatParameterTypeChange `protobuf:"bytes,19,opt,name=caveat_parameter_type_changed,json=caveatParameterTypeChanged,proto3,oneof"`
+}
+
+func (*ReflectionSchemaDiff_DefinitionAdded) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_DefinitionRemoved) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_DefinitionDocCommentChanged) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_RelationAdded) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_RelationRemoved) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_RelationDocCommentChanged) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_RelationSubjectTypeAdded) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_RelationSubjectTypeRemoved) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_PermissionAdded) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_PermissionRemoved) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_PermissionDocCommentChanged) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_PermissionExprChanged) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_CaveatAdded) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_CaveatRemoved) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_CaveatDocCommentChanged) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_CaveatExprChanged) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_CaveatParameterAdded) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_CaveatParameterRemoved) isReflectionSchemaDiff_Diff() {}
+
+func (*ReflectionSchemaDiff_CaveatParameterTypeChanged) isReflectionSchemaDiff_Diff() {}
+
+var File_authzed_api_v1_schema_service_proto protoreflect.FileDescriptor
+
+const file_authzed_api_v1_schema_service_proto_rawDesc = "" +
+ "\n" +
+ "#authzed/api/v1/schema_service.proto\x12\x0eauthzed.api.v1\x1a\x19authzed/api/v1/core.proto\x1a'authzed/api/v1/permission_service.proto\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\"\x13\n" +
+ "\x11ReadSchemaRequest\"x\n" +
+ "\x12ReadSchemaResponse\x12\x1f\n" +
+ "\vschema_text\x18\x01 \x01(\tR\n" +
+ "schemaText\x12A\n" +
+ "\aread_at\x18\x02 \x01(\v2\x18.authzed.api.v1.ZedTokenB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\x06readAt\"B\n" +
+ "\x12WriteSchemaRequest\x12,\n" +
+ "\x06schema\x18\x01 \x01(\tB\x14\xfaB\ar\x05(\x80\x80\x80\x02\xbaH\ar\x05(\x80\x80\x80\x02R\x06schema\"^\n" +
+ "\x13WriteSchemaResponse\x12G\n" +
+ "\n" +
+ "written_at\x18\x01 \x01(\v2\x18.authzed.api.v1.ZedTokenB\x0e\xfaB\x05\x8a\x01\x02\x10\x01\xbaH\x03\xc8\x01\x01R\twrittenAt\"\xa8\x01\n" +
+ "\x14ReflectSchemaRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x12Q\n" +
+ "\x10optional_filters\x18\x02 \x03(\v2&.authzed.api.v1.ReflectionSchemaFilterR\x0foptionalFilters\"\xce\x01\n" +
+ "\x15ReflectSchemaResponse\x12F\n" +
+ "\vdefinitions\x18\x01 \x03(\v2$.authzed.api.v1.ReflectionDefinitionR\vdefinitions\x12:\n" +
+ "\acaveats\x18\x02 \x03(\v2 .authzed.api.v1.ReflectionCaveatR\acaveats\x121\n" +
+ "\aread_at\x18\x03 \x01(\v2\x18.authzed.api.v1.ZedTokenR\x06readAt\"\xa8\x02\n" +
+ "\x16ReflectionSchemaFilter\x12E\n" +
+ "\x1foptional_definition_name_filter\x18\x01 \x01(\tR\x1coptionalDefinitionNameFilter\x12=\n" +
+ "\x1boptional_caveat_name_filter\x18\x02 \x01(\tR\x18optionalCaveatNameFilter\x12A\n" +
+ "\x1doptional_relation_name_filter\x18\x03 \x01(\tR\x1aoptionalRelationNameFilter\x12E\n" +
+ "\x1foptional_permission_name_filter\x18\x04 \x01(\tR\x1coptionalPermissionNameFilter\"\xce\x01\n" +
+ "\x14ReflectionDefinition\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" +
+ "\acomment\x18\x02 \x01(\tR\acomment\x12@\n" +
+ "\trelations\x18\x03 \x03(\v2\".authzed.api.v1.ReflectionRelationR\trelations\x12F\n" +
+ "\vpermissions\x18\x04 \x03(\v2$.authzed.api.v1.ReflectionPermissionR\vpermissions\"\xab\x01\n" +
+ "\x10ReflectionCaveat\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" +
+ "\acomment\x18\x02 \x01(\tR\acomment\x12I\n" +
+ "\n" +
+ "parameters\x18\x03 \x03(\v2).authzed.api.v1.ReflectionCaveatParameterR\n" +
+ "parameters\x12\x1e\n" +
+ "\n" +
+ "expression\x18\x04 \x01(\tR\n" +
+ "expression\"q\n" +
+ "\x19ReflectionCaveatParameter\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
+ "\x04type\x18\x02 \x01(\tR\x04type\x12,\n" +
+ "\x12parent_caveat_name\x18\x03 \x01(\tR\x10parentCaveatName\"\xc6\x01\n" +
+ "\x12ReflectionRelation\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" +
+ "\acomment\x18\x02 \x01(\tR\acomment\x124\n" +
+ "\x16parent_definition_name\x18\x03 \x01(\tR\x14parentDefinitionName\x12L\n" +
+ "\rsubject_types\x18\x04 \x03(\v2'.authzed.api.v1.ReflectionTypeReferenceR\fsubjectTypes\"\xa8\x02\n" +
+ "\x17ReflectionTypeReference\x126\n" +
+ "\x17subject_definition_name\x18\x01 \x01(\tR\x15subjectDefinitionName\x120\n" +
+ "\x14optional_caveat_name\x18\x02 \x01(\tR\x12optionalCaveatName\x120\n" +
+ "\x13is_terminal_subject\x18\x03 \x01(\bH\x00R\x11isTerminalSubject\x126\n" +
+ "\x16optional_relation_name\x18\x04 \x01(\tH\x00R\x14optionalRelationName\x12.\n" +
+ "\x12is_public_wildcard\x18\x05 \x01(\bH\x00R\x10isPublicWildcardB\t\n" +
+ "\atyperef\"z\n" +
+ "\x14ReflectionPermission\x12\x12\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" +
+ "\acomment\x18\x02 \x01(\tR\acomment\x124\n" +
+ "\x16parent_definition_name\x18\x03 \x01(\tR\x14parentDefinitionName\"\xf2\x01\n" +
+ "\x1cComputablePermissionsRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x12'\n" +
+ "\x0fdefinition_name\x18\x02 \x01(\tR\x0edefinitionName\x12#\n" +
+ "\rrelation_name\x18\x03 \x01(\tR\frelationName\x12E\n" +
+ "\x1foptional_definition_name_filter\x18\x04 \x01(\tR\x1coptionalDefinitionNameFilter\"\x90\x01\n" +
+ "\x1bReflectionRelationReference\x12'\n" +
+ "\x0fdefinition_name\x18\x01 \x01(\tR\x0edefinitionName\x12#\n" +
+ "\rrelation_name\x18\x02 \x01(\tR\frelationName\x12#\n" +
+ "\ris_permission\x18\x03 \x01(\bR\fisPermission\"\xa1\x01\n" +
+ "\x1dComputablePermissionsResponse\x12M\n" +
+ "\vpermissions\x18\x01 \x03(\v2+.authzed.api.v1.ReflectionRelationReferenceR\vpermissions\x121\n" +
+ "\aread_at\x18\x02 \x01(\v2\x18.authzed.api.v1.ZedTokenR\x06readAt\"\xac\x01\n" +
+ "\x19DependentRelationsRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x12'\n" +
+ "\x0fdefinition_name\x18\x02 \x01(\tR\x0edefinitionName\x12'\n" +
+ "\x0fpermission_name\x18\x03 \x01(\tR\x0epermissionName\"\x9a\x01\n" +
+ "\x1aDependentRelationsResponse\x12I\n" +
+ "\trelations\x18\x01 \x03(\v2+.authzed.api.v1.ReflectionRelationReferenceR\trelations\x121\n" +
+ "\aread_at\x18\x02 \x01(\v2\x18.authzed.api.v1.ZedTokenR\x06readAt\"\x7f\n" +
+ "\x11DiffSchemaRequest\x12=\n" +
+ "\vconsistency\x18\x01 \x01(\v2\x1b.authzed.api.v1.ConsistencyR\vconsistency\x12+\n" +
+ "\x11comparison_schema\x18\x02 \x01(\tR\x10comparisonSchema\"\x83\x01\n" +
+ "\x12DiffSchemaResponse\x12:\n" +
+ "\x05diffs\x18\x01 \x03(\v2$.authzed.api.v1.ReflectionSchemaDiffR\x05diffs\x121\n" +
+ "\aread_at\x18\x02 \x01(\v2\x18.authzed.api.v1.ZedTokenR\x06readAt\"\xc0\x01\n" +
+ "#ReflectionRelationSubjectTypeChange\x12>\n" +
+ "\brelation\x18\x01 \x01(\v2\".authzed.api.v1.ReflectionRelationR\brelation\x12Y\n" +
+ "\x14changed_subject_type\x18\x02 \x01(\v2'.authzed.api.v1.ReflectionTypeReferenceR\x12changedSubjectType\"\x93\x01\n" +
+ "#ReflectionCaveatParameterTypeChange\x12G\n" +
+ "\tparameter\x18\x01 \x01(\v2).authzed.api.v1.ReflectionCaveatParameterR\tparameter\x12#\n" +
+ "\rprevious_type\x18\x02 \x01(\tR\fpreviousType\"\xac\x0e\n" +
+ "\x14ReflectionSchemaDiff\x12Q\n" +
+ "\x10definition_added\x18\x01 \x01(\v2$.authzed.api.v1.ReflectionDefinitionH\x00R\x0fdefinitionAdded\x12U\n" +
+ "\x12definition_removed\x18\x02 \x01(\v2$.authzed.api.v1.ReflectionDefinitionH\x00R\x11definitionRemoved\x12k\n" +
+ "\x1edefinition_doc_comment_changed\x18\x03 \x01(\v2$.authzed.api.v1.ReflectionDefinitionH\x00R\x1bdefinitionDocCommentChanged\x12K\n" +
+ "\x0erelation_added\x18\x04 \x01(\v2\".authzed.api.v1.ReflectionRelationH\x00R\rrelationAdded\x12O\n" +
+ "\x10relation_removed\x18\x05 \x01(\v2\".authzed.api.v1.ReflectionRelationH\x00R\x0frelationRemoved\x12e\n" +
+ "\x1crelation_doc_comment_changed\x18\x06 \x01(\v2\".authzed.api.v1.ReflectionRelationH\x00R\x19relationDocCommentChanged\x12t\n" +
+ "\x1brelation_subject_type_added\x18\a \x01(\v23.authzed.api.v1.ReflectionRelationSubjectTypeChangeH\x00R\x18relationSubjectTypeAdded\x12x\n" +
+ "\x1drelation_subject_type_removed\x18\b \x01(\v23.authzed.api.v1.ReflectionRelationSubjectTypeChangeH\x00R\x1arelationSubjectTypeRemoved\x12Q\n" +
+ "\x10permission_added\x18\t \x01(\v2$.authzed.api.v1.ReflectionPermissionH\x00R\x0fpermissionAdded\x12U\n" +
+ "\x12permission_removed\x18\n" +
+ " \x01(\v2$.authzed.api.v1.ReflectionPermissionH\x00R\x11permissionRemoved\x12k\n" +
+ "\x1epermission_doc_comment_changed\x18\v \x01(\v2$.authzed.api.v1.ReflectionPermissionH\x00R\x1bpermissionDocCommentChanged\x12^\n" +
+ "\x17permission_expr_changed\x18\f \x01(\v2$.authzed.api.v1.ReflectionPermissionH\x00R\x15permissionExprChanged\x12E\n" +
+ "\fcaveat_added\x18\r \x01(\v2 .authzed.api.v1.ReflectionCaveatH\x00R\vcaveatAdded\x12I\n" +
+ "\x0ecaveat_removed\x18\x0e \x01(\v2 .authzed.api.v1.ReflectionCaveatH\x00R\rcaveatRemoved\x12_\n" +
+ "\x1acaveat_doc_comment_changed\x18\x0f \x01(\v2 .authzed.api.v1.ReflectionCaveatH\x00R\x17caveatDocCommentChanged\x12R\n" +
+ "\x13caveat_expr_changed\x18\x10 \x01(\v2 .authzed.api.v1.ReflectionCaveatH\x00R\x11caveatExprChanged\x12a\n" +
+ "\x16caveat_parameter_added\x18\x11 \x01(\v2).authzed.api.v1.ReflectionCaveatParameterH\x00R\x14caveatParameterAdded\x12e\n" +
+ "\x18caveat_parameter_removed\x18\x12 \x01(\v2).authzed.api.v1.ReflectionCaveatParameterH\x00R\x16caveatParameterRemoved\x12x\n" +
+ "\x1dcaveat_parameter_type_changed\x18\x13 \x01(\v23.authzed.api.v1.ReflectionCaveatParameterTypeChangeH\x00R\x1acaveatParameterTypeChangedB\x06\n" +
+ "\x04diff2\xb0\x06\n" +
+ "\rSchemaService\x12o\n" +
+ "\n" +
+ "ReadSchema\x12!.authzed.api.v1.ReadSchemaRequest\x1a\".authzed.api.v1.ReadSchemaResponse\"\x1a\x82\xd3\xe4\x93\x02\x14:\x01*\"\x0f/v1/schema/read\x12s\n" +
+ "\vWriteSchema\x12\".authzed.api.v1.WriteSchemaRequest\x1a#.authzed.api.v1.WriteSchemaResponse\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/v1/schema/write\x12\x81\x01\n" +
+ "\rReflectSchema\x12$.authzed.api.v1.ReflectSchemaRequest\x1a%.authzed.api.v1.ReflectSchemaResponse\"#\x82\xd3\xe4\x93\x02\x1d:\x01*\"\x18/v1/schema/reflectschema\x12\xa2\x01\n" +
+ "\x15ComputablePermissions\x12,.authzed.api.v1.ComputablePermissionsRequest\x1a-.authzed.api.v1.ComputablePermissionsResponse\",\x82\xd3\xe4\x93\x02&:\x01*\"!/v1/schema/permissions/computable\x12\x98\x01\n" +
+ "\x12DependentRelations\x12).authzed.api.v1.DependentRelationsRequest\x1a*.authzed.api.v1.DependentRelationsResponse\"+\x82\xd3\xe4\x93\x02%:\x01*\" /v1/schema/permissions/dependent\x12u\n" +
+ "\n" +
+ "DiffSchema\x12!.authzed.api.v1.DiffSchemaRequest\x1a\".authzed.api.v1.DiffSchemaResponse\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/v1/schema/diffschemaBJ\n" +
+ "\x12com.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
+
+var (
+ file_authzed_api_v1_schema_service_proto_rawDescOnce sync.Once
+ file_authzed_api_v1_schema_service_proto_rawDescData []byte
+)
+
+func file_authzed_api_v1_schema_service_proto_rawDescGZIP() []byte {
+ file_authzed_api_v1_schema_service_proto_rawDescOnce.Do(func() {
+ file_authzed_api_v1_schema_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authzed_api_v1_schema_service_proto_rawDesc), len(file_authzed_api_v1_schema_service_proto_rawDesc)))
+ })
+ return file_authzed_api_v1_schema_service_proto_rawDescData
+}
+
+var file_authzed_api_v1_schema_service_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
+var file_authzed_api_v1_schema_service_proto_goTypes = []any{
+ (*ReadSchemaRequest)(nil), // 0: authzed.api.v1.ReadSchemaRequest
+ (*ReadSchemaResponse)(nil), // 1: authzed.api.v1.ReadSchemaResponse
+ (*WriteSchemaRequest)(nil), // 2: authzed.api.v1.WriteSchemaRequest
+ (*WriteSchemaResponse)(nil), // 3: authzed.api.v1.WriteSchemaResponse
+ (*ReflectSchemaRequest)(nil), // 4: authzed.api.v1.ReflectSchemaRequest
+ (*ReflectSchemaResponse)(nil), // 5: authzed.api.v1.ReflectSchemaResponse
+ (*ReflectionSchemaFilter)(nil), // 6: authzed.api.v1.ReflectionSchemaFilter
+ (*ReflectionDefinition)(nil), // 7: authzed.api.v1.ReflectionDefinition
+ (*ReflectionCaveat)(nil), // 8: authzed.api.v1.ReflectionCaveat
+ (*ReflectionCaveatParameter)(nil), // 9: authzed.api.v1.ReflectionCaveatParameter
+ (*ReflectionRelation)(nil), // 10: authzed.api.v1.ReflectionRelation
+ (*ReflectionTypeReference)(nil), // 11: authzed.api.v1.ReflectionTypeReference
+ (*ReflectionPermission)(nil), // 12: authzed.api.v1.ReflectionPermission
+ (*ComputablePermissionsRequest)(nil), // 13: authzed.api.v1.ComputablePermissionsRequest
+ (*ReflectionRelationReference)(nil), // 14: authzed.api.v1.ReflectionRelationReference
+ (*ComputablePermissionsResponse)(nil), // 15: authzed.api.v1.ComputablePermissionsResponse
+ (*DependentRelationsRequest)(nil), // 16: authzed.api.v1.DependentRelationsRequest
+ (*DependentRelationsResponse)(nil), // 17: authzed.api.v1.DependentRelationsResponse
+ (*DiffSchemaRequest)(nil), // 18: authzed.api.v1.DiffSchemaRequest
+ (*DiffSchemaResponse)(nil), // 19: authzed.api.v1.DiffSchemaResponse
+ (*ReflectionRelationSubjectTypeChange)(nil), // 20: authzed.api.v1.ReflectionRelationSubjectTypeChange
+ (*ReflectionCaveatParameterTypeChange)(nil), // 21: authzed.api.v1.ReflectionCaveatParameterTypeChange
+ (*ReflectionSchemaDiff)(nil), // 22: authzed.api.v1.ReflectionSchemaDiff
+ (*ZedToken)(nil), // 23: authzed.api.v1.ZedToken
+ (*Consistency)(nil), // 24: authzed.api.v1.Consistency
+}
+var file_authzed_api_v1_schema_service_proto_depIdxs = []int32{
+ 23, // 0: authzed.api.v1.ReadSchemaResponse.read_at:type_name -> authzed.api.v1.ZedToken
+ 23, // 1: authzed.api.v1.WriteSchemaResponse.written_at:type_name -> authzed.api.v1.ZedToken
+ 24, // 2: authzed.api.v1.ReflectSchemaRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 6, // 3: authzed.api.v1.ReflectSchemaRequest.optional_filters:type_name -> authzed.api.v1.ReflectionSchemaFilter
+ 7, // 4: authzed.api.v1.ReflectSchemaResponse.definitions:type_name -> authzed.api.v1.ReflectionDefinition
+ 8, // 5: authzed.api.v1.ReflectSchemaResponse.caveats:type_name -> authzed.api.v1.ReflectionCaveat
+ 23, // 6: authzed.api.v1.ReflectSchemaResponse.read_at:type_name -> authzed.api.v1.ZedToken
+ 10, // 7: authzed.api.v1.ReflectionDefinition.relations:type_name -> authzed.api.v1.ReflectionRelation
+ 12, // 8: authzed.api.v1.ReflectionDefinition.permissions:type_name -> authzed.api.v1.ReflectionPermission
+ 9, // 9: authzed.api.v1.ReflectionCaveat.parameters:type_name -> authzed.api.v1.ReflectionCaveatParameter
+ 11, // 10: authzed.api.v1.ReflectionRelation.subject_types:type_name -> authzed.api.v1.ReflectionTypeReference
+ 24, // 11: authzed.api.v1.ComputablePermissionsRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 14, // 12: authzed.api.v1.ComputablePermissionsResponse.permissions:type_name -> authzed.api.v1.ReflectionRelationReference
+ 23, // 13: authzed.api.v1.ComputablePermissionsResponse.read_at:type_name -> authzed.api.v1.ZedToken
+ 24, // 14: authzed.api.v1.DependentRelationsRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 14, // 15: authzed.api.v1.DependentRelationsResponse.relations:type_name -> authzed.api.v1.ReflectionRelationReference
+ 23, // 16: authzed.api.v1.DependentRelationsResponse.read_at:type_name -> authzed.api.v1.ZedToken
+ 24, // 17: authzed.api.v1.DiffSchemaRequest.consistency:type_name -> authzed.api.v1.Consistency
+ 22, // 18: authzed.api.v1.DiffSchemaResponse.diffs:type_name -> authzed.api.v1.ReflectionSchemaDiff
+ 23, // 19: authzed.api.v1.DiffSchemaResponse.read_at:type_name -> authzed.api.v1.ZedToken
+ 10, // 20: authzed.api.v1.ReflectionRelationSubjectTypeChange.relation:type_name -> authzed.api.v1.ReflectionRelation
+ 11, // 21: authzed.api.v1.ReflectionRelationSubjectTypeChange.changed_subject_type:type_name -> authzed.api.v1.ReflectionTypeReference
+ 9, // 22: authzed.api.v1.ReflectionCaveatParameterTypeChange.parameter:type_name -> authzed.api.v1.ReflectionCaveatParameter
+ 7, // 23: authzed.api.v1.ReflectionSchemaDiff.definition_added:type_name -> authzed.api.v1.ReflectionDefinition
+ 7, // 24: authzed.api.v1.ReflectionSchemaDiff.definition_removed:type_name -> authzed.api.v1.ReflectionDefinition
+ 7, // 25: authzed.api.v1.ReflectionSchemaDiff.definition_doc_comment_changed:type_name -> authzed.api.v1.ReflectionDefinition
+ 10, // 26: authzed.api.v1.ReflectionSchemaDiff.relation_added:type_name -> authzed.api.v1.ReflectionRelation
+ 10, // 27: authzed.api.v1.ReflectionSchemaDiff.relation_removed:type_name -> authzed.api.v1.ReflectionRelation
+ 10, // 28: authzed.api.v1.ReflectionSchemaDiff.relation_doc_comment_changed:type_name -> authzed.api.v1.ReflectionRelation
+ 20, // 29: authzed.api.v1.ReflectionSchemaDiff.relation_subject_type_added:type_name -> authzed.api.v1.ReflectionRelationSubjectTypeChange
+ 20, // 30: authzed.api.v1.ReflectionSchemaDiff.relation_subject_type_removed:type_name -> authzed.api.v1.ReflectionRelationSubjectTypeChange
+ 12, // 31: authzed.api.v1.ReflectionSchemaDiff.permission_added:type_name -> authzed.api.v1.ReflectionPermission
+ 12, // 32: authzed.api.v1.ReflectionSchemaDiff.permission_removed:type_name -> authzed.api.v1.ReflectionPermission
+ 12, // 33: authzed.api.v1.ReflectionSchemaDiff.permission_doc_comment_changed:type_name -> authzed.api.v1.ReflectionPermission
+ 12, // 34: authzed.api.v1.ReflectionSchemaDiff.permission_expr_changed:type_name -> authzed.api.v1.ReflectionPermission
+ 8, // 35: authzed.api.v1.ReflectionSchemaDiff.caveat_added:type_name -> authzed.api.v1.ReflectionCaveat
+ 8, // 36: authzed.api.v1.ReflectionSchemaDiff.caveat_removed:type_name -> authzed.api.v1.ReflectionCaveat
+ 8, // 37: authzed.api.v1.ReflectionSchemaDiff.caveat_doc_comment_changed:type_name -> authzed.api.v1.ReflectionCaveat
+ 8, // 38: authzed.api.v1.ReflectionSchemaDiff.caveat_expr_changed:type_name -> authzed.api.v1.ReflectionCaveat
+ 9, // 39: authzed.api.v1.ReflectionSchemaDiff.caveat_parameter_added:type_name -> authzed.api.v1.ReflectionCaveatParameter
+ 9, // 40: authzed.api.v1.ReflectionSchemaDiff.caveat_parameter_removed:type_name -> authzed.api.v1.ReflectionCaveatParameter
+ 21, // 41: authzed.api.v1.ReflectionSchemaDiff.caveat_parameter_type_changed:type_name -> authzed.api.v1.ReflectionCaveatParameterTypeChange
+ 0, // 42: authzed.api.v1.SchemaService.ReadSchema:input_type -> authzed.api.v1.ReadSchemaRequest
+ 2, // 43: authzed.api.v1.SchemaService.WriteSchema:input_type -> authzed.api.v1.WriteSchemaRequest
+ 4, // 44: authzed.api.v1.SchemaService.ReflectSchema:input_type -> authzed.api.v1.ReflectSchemaRequest
+ 13, // 45: authzed.api.v1.SchemaService.ComputablePermissions:input_type -> authzed.api.v1.ComputablePermissionsRequest
+ 16, // 46: authzed.api.v1.SchemaService.DependentRelations:input_type -> authzed.api.v1.DependentRelationsRequest
+ 18, // 47: authzed.api.v1.SchemaService.DiffSchema:input_type -> authzed.api.v1.DiffSchemaRequest
+ 1, // 48: authzed.api.v1.SchemaService.ReadSchema:output_type -> authzed.api.v1.ReadSchemaResponse
+ 3, // 49: authzed.api.v1.SchemaService.WriteSchema:output_type -> authzed.api.v1.WriteSchemaResponse
+ 5, // 50: authzed.api.v1.SchemaService.ReflectSchema:output_type -> authzed.api.v1.ReflectSchemaResponse
+ 15, // 51: authzed.api.v1.SchemaService.ComputablePermissions:output_type -> authzed.api.v1.ComputablePermissionsResponse
+ 17, // 52: authzed.api.v1.SchemaService.DependentRelations:output_type -> authzed.api.v1.DependentRelationsResponse
+ 19, // 53: authzed.api.v1.SchemaService.DiffSchema:output_type -> authzed.api.v1.DiffSchemaResponse
+ 48, // [48:54] is the sub-list for method output_type
+ 42, // [42:48] is the sub-list for method input_type
+ 42, // [42:42] is the sub-list for extension type_name
+ 42, // [42:42] is the sub-list for extension extendee
+ 0, // [0:42] is the sub-list for field type_name
+}
+
+func init() { file_authzed_api_v1_schema_service_proto_init() }
+func file_authzed_api_v1_schema_service_proto_init() {
+ if File_authzed_api_v1_schema_service_proto != nil {
+ return
+ }
+ file_authzed_api_v1_core_proto_init()
+ file_authzed_api_v1_permission_service_proto_init()
+ file_authzed_api_v1_schema_service_proto_msgTypes[11].OneofWrappers = []any{
+ (*ReflectionTypeReference_IsTerminalSubject)(nil),
+ (*ReflectionTypeReference_OptionalRelationName)(nil),
+ (*ReflectionTypeReference_IsPublicWildcard)(nil),
+ }
+ file_authzed_api_v1_schema_service_proto_msgTypes[22].OneofWrappers = []any{
+ (*ReflectionSchemaDiff_DefinitionAdded)(nil),
+ (*ReflectionSchemaDiff_DefinitionRemoved)(nil),
+ (*ReflectionSchemaDiff_DefinitionDocCommentChanged)(nil),
+ (*ReflectionSchemaDiff_RelationAdded)(nil),
+ (*ReflectionSchemaDiff_RelationRemoved)(nil),
+ (*ReflectionSchemaDiff_RelationDocCommentChanged)(nil),
+ (*ReflectionSchemaDiff_RelationSubjectTypeAdded)(nil),
+ (*ReflectionSchemaDiff_RelationSubjectTypeRemoved)(nil),
+ (*ReflectionSchemaDiff_PermissionAdded)(nil),
+ (*ReflectionSchemaDiff_PermissionRemoved)(nil),
+ (*ReflectionSchemaDiff_PermissionDocCommentChanged)(nil),
+ (*ReflectionSchemaDiff_PermissionExprChanged)(nil),
+ (*ReflectionSchemaDiff_CaveatAdded)(nil),
+ (*ReflectionSchemaDiff_CaveatRemoved)(nil),
+ (*ReflectionSchemaDiff_CaveatDocCommentChanged)(nil),
+ (*ReflectionSchemaDiff_CaveatExprChanged)(nil),
+ (*ReflectionSchemaDiff_CaveatParameterAdded)(nil),
+ (*ReflectionSchemaDiff_CaveatParameterRemoved)(nil),
+ (*ReflectionSchemaDiff_CaveatParameterTypeChanged)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_authzed_api_v1_schema_service_proto_rawDesc), len(file_authzed_api_v1_schema_service_proto_rawDesc)),
+ NumEnums: 0,
+ NumMessages: 23,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_authzed_api_v1_schema_service_proto_goTypes,
+ DependencyIndexes: file_authzed_api_v1_schema_service_proto_depIdxs,
+ MessageInfos: file_authzed_api_v1_schema_service_proto_msgTypes,
+ }.Build()
+ File_authzed_api_v1_schema_service_proto = out.File
+ file_authzed_api_v1_schema_service_proto_goTypes = nil
+ file_authzed_api_v1_schema_service_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service.pb.gw.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service.pb.gw.go
new file mode 100644
index 0000000..ebd749a
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service.pb.gw.go
@@ -0,0 +1,469 @@
+// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
+// source: authzed/api/v1/schema_service.proto
+
+/*
+Package v1 is a reverse proxy.
+
+It translates gRPC into RESTful JSON APIs.
+*/
+package v1
+
+import (
+ "context"
+ "errors"
+ "io"
+ "net/http"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+)
+
+// Suppress "imported and not used" errors
+var (
+ _ codes.Code
+ _ io.Reader
+ _ status.Status
+ _ = errors.New
+ _ = runtime.String
+ _ = utilities.NewDoubleArray
+ _ = metadata.Join
+)
+
+func request_SchemaService_ReadSchema_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ReadSchemaRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.ReadSchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_SchemaService_ReadSchema_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ReadSchemaRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.ReadSchema(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_SchemaService_WriteSchema_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq WriteSchemaRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.WriteSchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_SchemaService_WriteSchema_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq WriteSchemaRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.WriteSchema(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_SchemaService_ReflectSchema_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ReflectSchemaRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.ReflectSchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_SchemaService_ReflectSchema_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ReflectSchemaRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.ReflectSchema(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_SchemaService_ComputablePermissions_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ComputablePermissionsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.ComputablePermissions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_SchemaService_ComputablePermissions_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq ComputablePermissionsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.ComputablePermissions(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_SchemaService_DependentRelations_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq DependentRelationsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.DependentRelations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_SchemaService_DependentRelations_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq DependentRelationsRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.DependentRelations(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+func request_SchemaService_DiffSchema_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq DiffSchemaRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := client.DiffSchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_SchemaService_DiffSchema_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq DiffSchemaRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ msg, err := server.DiffSchema(ctx, &protoReq)
+ return msg, metadata, err
+}
+
+// RegisterSchemaServiceHandlerServer registers the http handlers for service SchemaService to "mux".
+// UnaryRPC :call SchemaServiceServer directly.
+// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSchemaServiceHandlerFromEndpoint instead.
+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
+func RegisterSchemaServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SchemaServiceServer) error {
+ mux.Handle(http.MethodPost, pattern_SchemaService_ReadSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.SchemaService/ReadSchema", runtime.WithHTTPPathPattern("/v1/schema/read"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_SchemaService_ReadSchema_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_SchemaService_ReadSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_SchemaService_WriteSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.SchemaService/WriteSchema", runtime.WithHTTPPathPattern("/v1/schema/write"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_SchemaService_WriteSchema_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_SchemaService_WriteSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_SchemaService_ReflectSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.SchemaService/ReflectSchema", runtime.WithHTTPPathPattern("/v1/schema/reflectschema"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_SchemaService_ReflectSchema_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_SchemaService_ReflectSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_SchemaService_ComputablePermissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.SchemaService/ComputablePermissions", runtime.WithHTTPPathPattern("/v1/schema/permissions/computable"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_SchemaService_ComputablePermissions_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_SchemaService_ComputablePermissions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_SchemaService_DependentRelations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.SchemaService/DependentRelations", runtime.WithHTTPPathPattern("/v1/schema/permissions/dependent"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_SchemaService_DependentRelations_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_SchemaService_DependentRelations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_SchemaService_DiffSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/authzed.api.v1.SchemaService/DiffSchema", runtime.WithHTTPPathPattern("/v1/schema/diffschema"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_SchemaService_DiffSchema_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_SchemaService_DiffSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+
+ return nil
+}
+
+// RegisterSchemaServiceHandlerFromEndpoint is same as RegisterSchemaServiceHandler but
+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
+func RegisterSchemaServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
+ conn, err := grpc.NewClient(endpoint, opts...)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err != nil {
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ return
+ }
+ go func() {
+ <-ctx.Done()
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ }()
+ }()
+ return RegisterSchemaServiceHandler(ctx, mux, conn)
+}
+
+// RegisterSchemaServiceHandler registers the http handlers for service SchemaService to "mux".
+// The handlers forward requests to the grpc endpoint over "conn".
+func RegisterSchemaServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterSchemaServiceHandlerClient(ctx, mux, NewSchemaServiceClient(conn))
+}
+
+// RegisterSchemaServiceHandlerClient registers the http handlers for service SchemaService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SchemaServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SchemaServiceClient"
+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
+// "SchemaServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
+func RegisterSchemaServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SchemaServiceClient) error {
+ mux.Handle(http.MethodPost, pattern_SchemaService_ReadSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.SchemaService/ReadSchema", runtime.WithHTTPPathPattern("/v1/schema/read"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_SchemaService_ReadSchema_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_SchemaService_ReadSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_SchemaService_WriteSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.SchemaService/WriteSchema", runtime.WithHTTPPathPattern("/v1/schema/write"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_SchemaService_WriteSchema_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_SchemaService_WriteSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_SchemaService_ReflectSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.SchemaService/ReflectSchema", runtime.WithHTTPPathPattern("/v1/schema/reflectschema"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_SchemaService_ReflectSchema_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_SchemaService_ReflectSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_SchemaService_ComputablePermissions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.SchemaService/ComputablePermissions", runtime.WithHTTPPathPattern("/v1/schema/permissions/computable"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_SchemaService_ComputablePermissions_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_SchemaService_ComputablePermissions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_SchemaService_DependentRelations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.SchemaService/DependentRelations", runtime.WithHTTPPathPattern("/v1/schema/permissions/dependent"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_SchemaService_DependentRelations_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_SchemaService_DependentRelations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ mux.Handle(http.MethodPost, pattern_SchemaService_DiffSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.SchemaService/DiffSchema", runtime.WithHTTPPathPattern("/v1/schema/diffschema"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_SchemaService_DiffSchema_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_SchemaService_DiffSchema_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
+ return nil
+}
+
+var (
+ pattern_SchemaService_ReadSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "schema", "read"}, ""))
+ pattern_SchemaService_WriteSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "schema", "write"}, ""))
+ pattern_SchemaService_ReflectSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "schema", "reflectschema"}, ""))
+ pattern_SchemaService_ComputablePermissions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "schema", "permissions", "computable"}, ""))
+ pattern_SchemaService_DependentRelations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "schema", "permissions", "dependent"}, ""))
+ pattern_SchemaService_DiffSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "schema", "diffschema"}, ""))
+)
+
+var (
+ forward_SchemaService_ReadSchema_0 = runtime.ForwardResponseMessage
+ forward_SchemaService_WriteSchema_0 = runtime.ForwardResponseMessage
+ forward_SchemaService_ReflectSchema_0 = runtime.ForwardResponseMessage
+ forward_SchemaService_ComputablePermissions_0 = runtime.ForwardResponseMessage
+ forward_SchemaService_DependentRelations_0 = runtime.ForwardResponseMessage
+ forward_SchemaService_DiffSchema_0 = runtime.ForwardResponseMessage
+)
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service.pb.validate.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service.pb.validate.go
new file mode 100644
index 0000000..427d36c
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service.pb.validate.go
@@ -0,0 +1,4026 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: authzed/api/v1/schema_service.proto
+
+package v1
+
+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 ReadSchemaRequest 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 *ReadSchemaRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReadSchemaRequest 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
+// ReadSchemaRequestMultiError, or nil if none found.
+func (m *ReadSchemaRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReadSchemaRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return ReadSchemaRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReadSchemaRequestMultiError is an error wrapping multiple validation errors
+// returned by ReadSchemaRequest.ValidateAll() if the designated constraints
+// aren't met.
+type ReadSchemaRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReadSchemaRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReadSchemaRequestMultiError) AllErrors() []error { return m }
+
+// ReadSchemaRequestValidationError is the validation error returned by
+// ReadSchemaRequest.Validate if the designated constraints aren't met.
+type ReadSchemaRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReadSchemaRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReadSchemaRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReadSchemaRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReadSchemaRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReadSchemaRequestValidationError) ErrorName() string {
+ return "ReadSchemaRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ReadSchemaRequestValidationError) 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 %sReadSchemaRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReadSchemaRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReadSchemaRequestValidationError{}
+
+// Validate checks the field values on ReadSchemaResponse 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 *ReadSchemaResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReadSchemaResponse 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
+// ReadSchemaResponseMultiError, or nil if none found.
+func (m *ReadSchemaResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReadSchemaResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for SchemaText
+
+ if m.GetReadAt() == nil {
+ err := ReadSchemaResponseValidationError{
+ field: "ReadAt",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetReadAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReadSchemaResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReadSchemaResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetReadAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReadSchemaResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ReadSchemaResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReadSchemaResponseMultiError is an error wrapping multiple validation errors
+// returned by ReadSchemaResponse.ValidateAll() if the designated constraints
+// aren't met.
+type ReadSchemaResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReadSchemaResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReadSchemaResponseMultiError) AllErrors() []error { return m }
+
+// ReadSchemaResponseValidationError is the validation error returned by
+// ReadSchemaResponse.Validate if the designated constraints aren't met.
+type ReadSchemaResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReadSchemaResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReadSchemaResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReadSchemaResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReadSchemaResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReadSchemaResponseValidationError) ErrorName() string {
+ return "ReadSchemaResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ReadSchemaResponseValidationError) 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 %sReadSchemaResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReadSchemaResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReadSchemaResponseValidationError{}
+
+// Validate checks the field values on WriteSchemaRequest 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 *WriteSchemaRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on WriteSchemaRequest 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
+// WriteSchemaRequestMultiError, or nil if none found.
+func (m *WriteSchemaRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *WriteSchemaRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetSchema()) > 4194304 {
+ err := WriteSchemaRequestValidationError{
+ field: "Schema",
+ reason: "value length must be at most 4194304 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return WriteSchemaRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// WriteSchemaRequestMultiError is an error wrapping multiple validation errors
+// returned by WriteSchemaRequest.ValidateAll() if the designated constraints
+// aren't met.
+type WriteSchemaRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m WriteSchemaRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m WriteSchemaRequestMultiError) AllErrors() []error { return m }
+
+// WriteSchemaRequestValidationError is the validation error returned by
+// WriteSchemaRequest.Validate if the designated constraints aren't met.
+type WriteSchemaRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e WriteSchemaRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e WriteSchemaRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e WriteSchemaRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e WriteSchemaRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e WriteSchemaRequestValidationError) ErrorName() string {
+ return "WriteSchemaRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e WriteSchemaRequestValidationError) 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 %sWriteSchemaRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = WriteSchemaRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = WriteSchemaRequestValidationError{}
+
+// Validate checks the field values on WriteSchemaResponse 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 *WriteSchemaResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on WriteSchemaResponse 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
+// WriteSchemaResponseMultiError, or nil if none found.
+func (m *WriteSchemaResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *WriteSchemaResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetWrittenAt() == nil {
+ err := WriteSchemaResponseValidationError{
+ field: "WrittenAt",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetWrittenAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, WriteSchemaResponseValidationError{
+ field: "WrittenAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, WriteSchemaResponseValidationError{
+ field: "WrittenAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetWrittenAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return WriteSchemaResponseValidationError{
+ field: "WrittenAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return WriteSchemaResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// WriteSchemaResponseMultiError is an error wrapping multiple validation
+// errors returned by WriteSchemaResponse.ValidateAll() if the designated
+// constraints aren't met.
+type WriteSchemaResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m WriteSchemaResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m WriteSchemaResponseMultiError) AllErrors() []error { return m }
+
+// WriteSchemaResponseValidationError is the validation error returned by
+// WriteSchemaResponse.Validate if the designated constraints aren't met.
+type WriteSchemaResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e WriteSchemaResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e WriteSchemaResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e WriteSchemaResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e WriteSchemaResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e WriteSchemaResponseValidationError) ErrorName() string {
+ return "WriteSchemaResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e WriteSchemaResponseValidationError) 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 %sWriteSchemaResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = WriteSchemaResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = WriteSchemaResponseValidationError{}
+
+// Validate checks the field values on ReflectSchemaRequest 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 *ReflectSchemaRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReflectSchemaRequest 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
+// ReflectSchemaRequestMultiError, or nil if none found.
+func (m *ReflectSchemaRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReflectSchemaRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectSchemaRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectSchemaRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectSchemaRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetOptionalFilters() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectSchemaRequestValidationError{
+ field: fmt.Sprintf("OptionalFilters[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectSchemaRequestValidationError{
+ field: fmt.Sprintf("OptionalFilters[%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 ReflectSchemaRequestValidationError{
+ field: fmt.Sprintf("OptionalFilters[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ReflectSchemaRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReflectSchemaRequestMultiError is an error wrapping multiple validation
+// errors returned by ReflectSchemaRequest.ValidateAll() if the designated
+// constraints aren't met.
+type ReflectSchemaRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReflectSchemaRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReflectSchemaRequestMultiError) AllErrors() []error { return m }
+
+// ReflectSchemaRequestValidationError is the validation error returned by
+// ReflectSchemaRequest.Validate if the designated constraints aren't met.
+type ReflectSchemaRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReflectSchemaRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReflectSchemaRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReflectSchemaRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReflectSchemaRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReflectSchemaRequestValidationError) ErrorName() string {
+ return "ReflectSchemaRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ReflectSchemaRequestValidationError) 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 %sReflectSchemaRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReflectSchemaRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReflectSchemaRequestValidationError{}
+
+// Validate checks the field values on ReflectSchemaResponse 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 *ReflectSchemaResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReflectSchemaResponse 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
+// ReflectSchemaResponseMultiError, or nil if none found.
+func (m *ReflectSchemaResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReflectSchemaResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetDefinitions() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectSchemaResponseValidationError{
+ field: fmt.Sprintf("Definitions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectSchemaResponseValidationError{
+ field: fmt.Sprintf("Definitions[%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 ReflectSchemaResponseValidationError{
+ field: fmt.Sprintf("Definitions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ for idx, item := range m.GetCaveats() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectSchemaResponseValidationError{
+ field: fmt.Sprintf("Caveats[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectSchemaResponseValidationError{
+ field: fmt.Sprintf("Caveats[%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 ReflectSchemaResponseValidationError{
+ field: fmt.Sprintf("Caveats[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetReadAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectSchemaResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectSchemaResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetReadAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectSchemaResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ReflectSchemaResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReflectSchemaResponseMultiError is an error wrapping multiple validation
+// errors returned by ReflectSchemaResponse.ValidateAll() if the designated
+// constraints aren't met.
+type ReflectSchemaResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReflectSchemaResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReflectSchemaResponseMultiError) AllErrors() []error { return m }
+
+// ReflectSchemaResponseValidationError is the validation error returned by
+// ReflectSchemaResponse.Validate if the designated constraints aren't met.
+type ReflectSchemaResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReflectSchemaResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReflectSchemaResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReflectSchemaResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReflectSchemaResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReflectSchemaResponseValidationError) ErrorName() string {
+ return "ReflectSchemaResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ReflectSchemaResponseValidationError) 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 %sReflectSchemaResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReflectSchemaResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReflectSchemaResponseValidationError{}
+
+// Validate checks the field values on ReflectionSchemaFilter 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 *ReflectionSchemaFilter) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReflectionSchemaFilter 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
+// ReflectionSchemaFilterMultiError, or nil if none found.
+func (m *ReflectionSchemaFilter) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReflectionSchemaFilter) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for OptionalDefinitionNameFilter
+
+ // no validation rules for OptionalCaveatNameFilter
+
+ // no validation rules for OptionalRelationNameFilter
+
+ // no validation rules for OptionalPermissionNameFilter
+
+ if len(errors) > 0 {
+ return ReflectionSchemaFilterMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReflectionSchemaFilterMultiError is an error wrapping multiple validation
+// errors returned by ReflectionSchemaFilter.ValidateAll() if the designated
+// constraints aren't met.
+type ReflectionSchemaFilterMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReflectionSchemaFilterMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReflectionSchemaFilterMultiError) AllErrors() []error { return m }
+
+// ReflectionSchemaFilterValidationError is the validation error returned by
+// ReflectionSchemaFilter.Validate if the designated constraints aren't met.
+type ReflectionSchemaFilterValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReflectionSchemaFilterValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReflectionSchemaFilterValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReflectionSchemaFilterValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReflectionSchemaFilterValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReflectionSchemaFilterValidationError) ErrorName() string {
+ return "ReflectionSchemaFilterValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ReflectionSchemaFilterValidationError) 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 %sReflectionSchemaFilter.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReflectionSchemaFilterValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReflectionSchemaFilterValidationError{}
+
+// Validate checks the field values on ReflectionDefinition 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 *ReflectionDefinition) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReflectionDefinition 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
+// ReflectionDefinitionMultiError, or nil if none found.
+func (m *ReflectionDefinition) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReflectionDefinition) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for Comment
+
+ for idx, item := range m.GetRelations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionDefinitionValidationError{
+ field: fmt.Sprintf("Relations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionDefinitionValidationError{
+ field: fmt.Sprintf("Relations[%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 ReflectionDefinitionValidationError{
+ field: fmt.Sprintf("Relations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ for idx, item := range m.GetPermissions() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionDefinitionValidationError{
+ field: fmt.Sprintf("Permissions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionDefinitionValidationError{
+ field: fmt.Sprintf("Permissions[%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 ReflectionDefinitionValidationError{
+ field: fmt.Sprintf("Permissions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ReflectionDefinitionMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReflectionDefinitionMultiError is an error wrapping multiple validation
+// errors returned by ReflectionDefinition.ValidateAll() if the designated
+// constraints aren't met.
+type ReflectionDefinitionMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReflectionDefinitionMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReflectionDefinitionMultiError) AllErrors() []error { return m }
+
+// ReflectionDefinitionValidationError is the validation error returned by
+// ReflectionDefinition.Validate if the designated constraints aren't met.
+type ReflectionDefinitionValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReflectionDefinitionValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReflectionDefinitionValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReflectionDefinitionValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReflectionDefinitionValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReflectionDefinitionValidationError) ErrorName() string {
+ return "ReflectionDefinitionValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ReflectionDefinitionValidationError) 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 %sReflectionDefinition.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReflectionDefinitionValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReflectionDefinitionValidationError{}
+
+// Validate checks the field values on ReflectionCaveat 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 *ReflectionCaveat) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReflectionCaveat 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
+// ReflectionCaveatMultiError, or nil if none found.
+func (m *ReflectionCaveat) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReflectionCaveat) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for Comment
+
+ for idx, item := range m.GetParameters() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionCaveatValidationError{
+ field: fmt.Sprintf("Parameters[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionCaveatValidationError{
+ field: fmt.Sprintf("Parameters[%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 ReflectionCaveatValidationError{
+ field: fmt.Sprintf("Parameters[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ // no validation rules for Expression
+
+ if len(errors) > 0 {
+ return ReflectionCaveatMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReflectionCaveatMultiError is an error wrapping multiple validation errors
+// returned by ReflectionCaveat.ValidateAll() if the designated constraints
+// aren't met.
+type ReflectionCaveatMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReflectionCaveatMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReflectionCaveatMultiError) AllErrors() []error { return m }
+
+// ReflectionCaveatValidationError is the validation error returned by
+// ReflectionCaveat.Validate if the designated constraints aren't met.
+type ReflectionCaveatValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReflectionCaveatValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReflectionCaveatValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReflectionCaveatValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReflectionCaveatValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReflectionCaveatValidationError) ErrorName() string { return "ReflectionCaveatValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ReflectionCaveatValidationError) 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 %sReflectionCaveat.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReflectionCaveatValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReflectionCaveatValidationError{}
+
+// Validate checks the field values on ReflectionCaveatParameter 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 *ReflectionCaveatParameter) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReflectionCaveatParameter 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
+// ReflectionCaveatParameterMultiError, or nil if none found.
+func (m *ReflectionCaveatParameter) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReflectionCaveatParameter) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for Type
+
+ // no validation rules for ParentCaveatName
+
+ if len(errors) > 0 {
+ return ReflectionCaveatParameterMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReflectionCaveatParameterMultiError is an error wrapping multiple validation
+// errors returned by ReflectionCaveatParameter.ValidateAll() if the
+// designated constraints aren't met.
+type ReflectionCaveatParameterMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReflectionCaveatParameterMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReflectionCaveatParameterMultiError) AllErrors() []error { return m }
+
+// ReflectionCaveatParameterValidationError is the validation error returned by
+// ReflectionCaveatParameter.Validate if the designated constraints aren't met.
+type ReflectionCaveatParameterValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReflectionCaveatParameterValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReflectionCaveatParameterValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReflectionCaveatParameterValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReflectionCaveatParameterValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReflectionCaveatParameterValidationError) ErrorName() string {
+ return "ReflectionCaveatParameterValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ReflectionCaveatParameterValidationError) 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 %sReflectionCaveatParameter.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReflectionCaveatParameterValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReflectionCaveatParameterValidationError{}
+
+// Validate checks the field values on ReflectionRelation 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 *ReflectionRelation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReflectionRelation 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
+// ReflectionRelationMultiError, or nil if none found.
+func (m *ReflectionRelation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReflectionRelation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for Comment
+
+ // no validation rules for ParentDefinitionName
+
+ for idx, item := range m.GetSubjectTypes() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionRelationValidationError{
+ field: fmt.Sprintf("SubjectTypes[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionRelationValidationError{
+ field: fmt.Sprintf("SubjectTypes[%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 ReflectionRelationValidationError{
+ field: fmt.Sprintf("SubjectTypes[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ReflectionRelationMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReflectionRelationMultiError is an error wrapping multiple validation errors
+// returned by ReflectionRelation.ValidateAll() if the designated constraints
+// aren't met.
+type ReflectionRelationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReflectionRelationMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReflectionRelationMultiError) AllErrors() []error { return m }
+
+// ReflectionRelationValidationError is the validation error returned by
+// ReflectionRelation.Validate if the designated constraints aren't met.
+type ReflectionRelationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReflectionRelationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReflectionRelationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReflectionRelationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReflectionRelationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReflectionRelationValidationError) ErrorName() string {
+ return "ReflectionRelationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ReflectionRelationValidationError) 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 %sReflectionRelation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReflectionRelationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReflectionRelationValidationError{}
+
+// Validate checks the field values on ReflectionTypeReference 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 *ReflectionTypeReference) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReflectionTypeReference 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
+// ReflectionTypeReferenceMultiError, or nil if none found.
+func (m *ReflectionTypeReference) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReflectionTypeReference) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for SubjectDefinitionName
+
+ // no validation rules for OptionalCaveatName
+
+ switch v := m.Typeref.(type) {
+ case *ReflectionTypeReference_IsTerminalSubject:
+ if v == nil {
+ err := ReflectionTypeReferenceValidationError{
+ field: "Typeref",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ // no validation rules for IsTerminalSubject
+ case *ReflectionTypeReference_OptionalRelationName:
+ if v == nil {
+ err := ReflectionTypeReferenceValidationError{
+ field: "Typeref",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ // no validation rules for OptionalRelationName
+ case *ReflectionTypeReference_IsPublicWildcard:
+ if v == nil {
+ err := ReflectionTypeReferenceValidationError{
+ field: "Typeref",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ // no validation rules for IsPublicWildcard
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return ReflectionTypeReferenceMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReflectionTypeReferenceMultiError is an error wrapping multiple validation
+// errors returned by ReflectionTypeReference.ValidateAll() if the designated
+// constraints aren't met.
+type ReflectionTypeReferenceMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReflectionTypeReferenceMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReflectionTypeReferenceMultiError) AllErrors() []error { return m }
+
+// ReflectionTypeReferenceValidationError is the validation error returned by
+// ReflectionTypeReference.Validate if the designated constraints aren't met.
+type ReflectionTypeReferenceValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReflectionTypeReferenceValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReflectionTypeReferenceValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReflectionTypeReferenceValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReflectionTypeReferenceValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReflectionTypeReferenceValidationError) ErrorName() string {
+ return "ReflectionTypeReferenceValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ReflectionTypeReferenceValidationError) 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 %sReflectionTypeReference.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReflectionTypeReferenceValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReflectionTypeReferenceValidationError{}
+
+// Validate checks the field values on ReflectionPermission 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 *ReflectionPermission) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReflectionPermission 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
+// ReflectionPermissionMultiError, or nil if none found.
+func (m *ReflectionPermission) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReflectionPermission) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for Comment
+
+ // no validation rules for ParentDefinitionName
+
+ if len(errors) > 0 {
+ return ReflectionPermissionMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReflectionPermissionMultiError is an error wrapping multiple validation
+// errors returned by ReflectionPermission.ValidateAll() if the designated
+// constraints aren't met.
+type ReflectionPermissionMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReflectionPermissionMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReflectionPermissionMultiError) AllErrors() []error { return m }
+
+// ReflectionPermissionValidationError is the validation error returned by
+// ReflectionPermission.Validate if the designated constraints aren't met.
+type ReflectionPermissionValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReflectionPermissionValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReflectionPermissionValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReflectionPermissionValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReflectionPermissionValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReflectionPermissionValidationError) ErrorName() string {
+ return "ReflectionPermissionValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ReflectionPermissionValidationError) 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 %sReflectionPermission.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReflectionPermissionValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReflectionPermissionValidationError{}
+
+// Validate checks the field values on ComputablePermissionsRequest 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 *ComputablePermissionsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ComputablePermissionsRequest 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
+// ComputablePermissionsRequestMultiError, or nil if none found.
+func (m *ComputablePermissionsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ComputablePermissionsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ComputablePermissionsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ComputablePermissionsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ComputablePermissionsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for DefinitionName
+
+ // no validation rules for RelationName
+
+ // no validation rules for OptionalDefinitionNameFilter
+
+ if len(errors) > 0 {
+ return ComputablePermissionsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ComputablePermissionsRequestMultiError is an error wrapping multiple
+// validation errors returned by ComputablePermissionsRequest.ValidateAll() if
+// the designated constraints aren't met.
+type ComputablePermissionsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ComputablePermissionsRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ComputablePermissionsRequestMultiError) AllErrors() []error { return m }
+
+// ComputablePermissionsRequestValidationError is the validation error returned
+// by ComputablePermissionsRequest.Validate if the designated constraints
+// aren't met.
+type ComputablePermissionsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ComputablePermissionsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ComputablePermissionsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ComputablePermissionsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ComputablePermissionsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ComputablePermissionsRequestValidationError) ErrorName() string {
+ return "ComputablePermissionsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ComputablePermissionsRequestValidationError) 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 %sComputablePermissionsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ComputablePermissionsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ComputablePermissionsRequestValidationError{}
+
+// Validate checks the field values on ReflectionRelationReference 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 *ReflectionRelationReference) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReflectionRelationReference 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
+// ReflectionRelationReferenceMultiError, or nil if none found.
+func (m *ReflectionRelationReference) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReflectionRelationReference) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for DefinitionName
+
+ // no validation rules for RelationName
+
+ // no validation rules for IsPermission
+
+ if len(errors) > 0 {
+ return ReflectionRelationReferenceMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReflectionRelationReferenceMultiError is an error wrapping multiple
+// validation errors returned by ReflectionRelationReference.ValidateAll() if
+// the designated constraints aren't met.
+type ReflectionRelationReferenceMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReflectionRelationReferenceMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReflectionRelationReferenceMultiError) AllErrors() []error { return m }
+
+// ReflectionRelationReferenceValidationError is the validation error returned
+// by ReflectionRelationReference.Validate if the designated constraints
+// aren't met.
+type ReflectionRelationReferenceValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReflectionRelationReferenceValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReflectionRelationReferenceValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReflectionRelationReferenceValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReflectionRelationReferenceValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReflectionRelationReferenceValidationError) ErrorName() string {
+ return "ReflectionRelationReferenceValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ReflectionRelationReferenceValidationError) 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 %sReflectionRelationReference.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReflectionRelationReferenceValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReflectionRelationReferenceValidationError{}
+
+// Validate checks the field values on ComputablePermissionsResponse 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 *ComputablePermissionsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ComputablePermissionsResponse 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
+// ComputablePermissionsResponseMultiError, or nil if none found.
+func (m *ComputablePermissionsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ComputablePermissionsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetPermissions() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ComputablePermissionsResponseValidationError{
+ field: fmt.Sprintf("Permissions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ComputablePermissionsResponseValidationError{
+ field: fmt.Sprintf("Permissions[%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 ComputablePermissionsResponseValidationError{
+ field: fmt.Sprintf("Permissions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetReadAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ComputablePermissionsResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ComputablePermissionsResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetReadAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ComputablePermissionsResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ComputablePermissionsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ComputablePermissionsResponseMultiError is an error wrapping multiple
+// validation errors returned by ComputablePermissionsResponse.ValidateAll()
+// if the designated constraints aren't met.
+type ComputablePermissionsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ComputablePermissionsResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ComputablePermissionsResponseMultiError) AllErrors() []error { return m }
+
+// ComputablePermissionsResponseValidationError is the validation error
+// returned by ComputablePermissionsResponse.Validate if the designated
+// constraints aren't met.
+type ComputablePermissionsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ComputablePermissionsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ComputablePermissionsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ComputablePermissionsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ComputablePermissionsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ComputablePermissionsResponseValidationError) ErrorName() string {
+ return "ComputablePermissionsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ComputablePermissionsResponseValidationError) 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 %sComputablePermissionsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ComputablePermissionsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ComputablePermissionsResponseValidationError{}
+
+// Validate checks the field values on DependentRelationsRequest 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 *DependentRelationsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DependentRelationsRequest 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
+// DependentRelationsRequestMultiError, or nil if none found.
+func (m *DependentRelationsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DependentRelationsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DependentRelationsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DependentRelationsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DependentRelationsRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for DefinitionName
+
+ // no validation rules for PermissionName
+
+ if len(errors) > 0 {
+ return DependentRelationsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// DependentRelationsRequestMultiError is an error wrapping multiple validation
+// errors returned by DependentRelationsRequest.ValidateAll() if the
+// designated constraints aren't met.
+type DependentRelationsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DependentRelationsRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DependentRelationsRequestMultiError) AllErrors() []error { return m }
+
+// DependentRelationsRequestValidationError is the validation error returned by
+// DependentRelationsRequest.Validate if the designated constraints aren't met.
+type DependentRelationsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DependentRelationsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DependentRelationsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DependentRelationsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DependentRelationsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DependentRelationsRequestValidationError) ErrorName() string {
+ return "DependentRelationsRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DependentRelationsRequestValidationError) 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 %sDependentRelationsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DependentRelationsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DependentRelationsRequestValidationError{}
+
+// Validate checks the field values on DependentRelationsResponse 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 *DependentRelationsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DependentRelationsResponse 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
+// DependentRelationsResponseMultiError, or nil if none found.
+func (m *DependentRelationsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DependentRelationsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetRelations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DependentRelationsResponseValidationError{
+ field: fmt.Sprintf("Relations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DependentRelationsResponseValidationError{
+ field: fmt.Sprintf("Relations[%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 DependentRelationsResponseValidationError{
+ field: fmt.Sprintf("Relations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetReadAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DependentRelationsResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DependentRelationsResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetReadAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DependentRelationsResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return DependentRelationsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// DependentRelationsResponseMultiError is an error wrapping multiple
+// validation errors returned by DependentRelationsResponse.ValidateAll() if
+// the designated constraints aren't met.
+type DependentRelationsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DependentRelationsResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DependentRelationsResponseMultiError) AllErrors() []error { return m }
+
+// DependentRelationsResponseValidationError is the validation error returned
+// by DependentRelationsResponse.Validate if the designated constraints aren't met.
+type DependentRelationsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DependentRelationsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DependentRelationsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DependentRelationsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DependentRelationsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DependentRelationsResponseValidationError) ErrorName() string {
+ return "DependentRelationsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DependentRelationsResponseValidationError) 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 %sDependentRelationsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DependentRelationsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DependentRelationsResponseValidationError{}
+
+// Validate checks the field values on DiffSchemaRequest 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 *DiffSchemaRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DiffSchemaRequest 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
+// DiffSchemaRequestMultiError, or nil if none found.
+func (m *DiffSchemaRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DiffSchemaRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConsistency()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DiffSchemaRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DiffSchemaRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistency()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DiffSchemaRequestValidationError{
+ field: "Consistency",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for ComparisonSchema
+
+ if len(errors) > 0 {
+ return DiffSchemaRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// DiffSchemaRequestMultiError is an error wrapping multiple validation errors
+// returned by DiffSchemaRequest.ValidateAll() if the designated constraints
+// aren't met.
+type DiffSchemaRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DiffSchemaRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DiffSchemaRequestMultiError) AllErrors() []error { return m }
+
+// DiffSchemaRequestValidationError is the validation error returned by
+// DiffSchemaRequest.Validate if the designated constraints aren't met.
+type DiffSchemaRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DiffSchemaRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DiffSchemaRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DiffSchemaRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DiffSchemaRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DiffSchemaRequestValidationError) ErrorName() string {
+ return "DiffSchemaRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DiffSchemaRequestValidationError) 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 %sDiffSchemaRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DiffSchemaRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DiffSchemaRequestValidationError{}
+
+// Validate checks the field values on DiffSchemaResponse 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 *DiffSchemaResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DiffSchemaResponse 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
+// DiffSchemaResponseMultiError, or nil if none found.
+func (m *DiffSchemaResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DiffSchemaResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetDiffs() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DiffSchemaResponseValidationError{
+ field: fmt.Sprintf("Diffs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DiffSchemaResponseValidationError{
+ field: fmt.Sprintf("Diffs[%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 DiffSchemaResponseValidationError{
+ field: fmt.Sprintf("Diffs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetReadAt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DiffSchemaResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DiffSchemaResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetReadAt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DiffSchemaResponseValidationError{
+ field: "ReadAt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return DiffSchemaResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// DiffSchemaResponseMultiError is an error wrapping multiple validation errors
+// returned by DiffSchemaResponse.ValidateAll() if the designated constraints
+// aren't met.
+type DiffSchemaResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DiffSchemaResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DiffSchemaResponseMultiError) AllErrors() []error { return m }
+
+// DiffSchemaResponseValidationError is the validation error returned by
+// DiffSchemaResponse.Validate if the designated constraints aren't met.
+type DiffSchemaResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DiffSchemaResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DiffSchemaResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DiffSchemaResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DiffSchemaResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DiffSchemaResponseValidationError) ErrorName() string {
+ return "DiffSchemaResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DiffSchemaResponseValidationError) 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 %sDiffSchemaResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DiffSchemaResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DiffSchemaResponseValidationError{}
+
+// Validate checks the field values on ReflectionRelationSubjectTypeChange 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 *ReflectionRelationSubjectTypeChange) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReflectionRelationSubjectTypeChange
+// 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
+// ReflectionRelationSubjectTypeChangeMultiError, or nil if none found.
+func (m *ReflectionRelationSubjectTypeChange) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReflectionRelationSubjectTypeChange) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetRelation()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionRelationSubjectTypeChangeValidationError{
+ field: "Relation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionRelationSubjectTypeChangeValidationError{
+ field: "Relation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelation()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionRelationSubjectTypeChangeValidationError{
+ field: "Relation",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetChangedSubjectType()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionRelationSubjectTypeChangeValidationError{
+ field: "ChangedSubjectType",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionRelationSubjectTypeChangeValidationError{
+ field: "ChangedSubjectType",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetChangedSubjectType()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionRelationSubjectTypeChangeValidationError{
+ field: "ChangedSubjectType",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ReflectionRelationSubjectTypeChangeMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReflectionRelationSubjectTypeChangeMultiError is an error wrapping multiple
+// validation errors returned by
+// ReflectionRelationSubjectTypeChange.ValidateAll() if the designated
+// constraints aren't met.
+type ReflectionRelationSubjectTypeChangeMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReflectionRelationSubjectTypeChangeMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReflectionRelationSubjectTypeChangeMultiError) AllErrors() []error { return m }
+
+// ReflectionRelationSubjectTypeChangeValidationError is the validation error
+// returned by ReflectionRelationSubjectTypeChange.Validate if the designated
+// constraints aren't met.
+type ReflectionRelationSubjectTypeChangeValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReflectionRelationSubjectTypeChangeValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReflectionRelationSubjectTypeChangeValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReflectionRelationSubjectTypeChangeValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReflectionRelationSubjectTypeChangeValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReflectionRelationSubjectTypeChangeValidationError) ErrorName() string {
+ return "ReflectionRelationSubjectTypeChangeValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ReflectionRelationSubjectTypeChangeValidationError) 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 %sReflectionRelationSubjectTypeChange.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReflectionRelationSubjectTypeChangeValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReflectionRelationSubjectTypeChangeValidationError{}
+
+// Validate checks the field values on ReflectionCaveatParameterTypeChange 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 *ReflectionCaveatParameterTypeChange) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReflectionCaveatParameterTypeChange
+// 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
+// ReflectionCaveatParameterTypeChangeMultiError, or nil if none found.
+func (m *ReflectionCaveatParameterTypeChange) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReflectionCaveatParameterTypeChange) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetParameter()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionCaveatParameterTypeChangeValidationError{
+ field: "Parameter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionCaveatParameterTypeChangeValidationError{
+ field: "Parameter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetParameter()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionCaveatParameterTypeChangeValidationError{
+ field: "Parameter",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for PreviousType
+
+ if len(errors) > 0 {
+ return ReflectionCaveatParameterTypeChangeMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReflectionCaveatParameterTypeChangeMultiError is an error wrapping multiple
+// validation errors returned by
+// ReflectionCaveatParameterTypeChange.ValidateAll() if the designated
+// constraints aren't met.
+type ReflectionCaveatParameterTypeChangeMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReflectionCaveatParameterTypeChangeMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReflectionCaveatParameterTypeChangeMultiError) AllErrors() []error { return m }
+
+// ReflectionCaveatParameterTypeChangeValidationError is the validation error
+// returned by ReflectionCaveatParameterTypeChange.Validate if the designated
+// constraints aren't met.
+type ReflectionCaveatParameterTypeChangeValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReflectionCaveatParameterTypeChangeValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReflectionCaveatParameterTypeChangeValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReflectionCaveatParameterTypeChangeValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReflectionCaveatParameterTypeChangeValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReflectionCaveatParameterTypeChangeValidationError) ErrorName() string {
+ return "ReflectionCaveatParameterTypeChangeValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ReflectionCaveatParameterTypeChangeValidationError) 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 %sReflectionCaveatParameterTypeChange.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReflectionCaveatParameterTypeChangeValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReflectionCaveatParameterTypeChangeValidationError{}
+
+// Validate checks the field values on ReflectionSchemaDiff 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 *ReflectionSchemaDiff) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ReflectionSchemaDiff 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
+// ReflectionSchemaDiffMultiError, or nil if none found.
+func (m *ReflectionSchemaDiff) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ReflectionSchemaDiff) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ switch v := m.Diff.(type) {
+ case *ReflectionSchemaDiff_DefinitionAdded:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetDefinitionAdded()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "DefinitionAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "DefinitionAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetDefinitionAdded()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "DefinitionAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_DefinitionRemoved:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetDefinitionRemoved()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "DefinitionRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "DefinitionRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetDefinitionRemoved()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "DefinitionRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_DefinitionDocCommentChanged:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetDefinitionDocCommentChanged()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "DefinitionDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "DefinitionDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetDefinitionDocCommentChanged()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "DefinitionDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_RelationAdded:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRelationAdded()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "RelationAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "RelationAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelationAdded()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "RelationAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_RelationRemoved:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRelationRemoved()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "RelationRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "RelationRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelationRemoved()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "RelationRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_RelationDocCommentChanged:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRelationDocCommentChanged()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "RelationDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "RelationDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelationDocCommentChanged()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "RelationDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_RelationSubjectTypeAdded:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRelationSubjectTypeAdded()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "RelationSubjectTypeAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "RelationSubjectTypeAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelationSubjectTypeAdded()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "RelationSubjectTypeAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_RelationSubjectTypeRemoved:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRelationSubjectTypeRemoved()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "RelationSubjectTypeRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "RelationSubjectTypeRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRelationSubjectTypeRemoved()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "RelationSubjectTypeRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_PermissionAdded:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPermissionAdded()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "PermissionAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "PermissionAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPermissionAdded()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "PermissionAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_PermissionRemoved:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPermissionRemoved()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "PermissionRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "PermissionRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPermissionRemoved()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "PermissionRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_PermissionDocCommentChanged:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPermissionDocCommentChanged()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "PermissionDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "PermissionDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPermissionDocCommentChanged()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "PermissionDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_PermissionExprChanged:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPermissionExprChanged()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "PermissionExprChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "PermissionExprChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPermissionExprChanged()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "PermissionExprChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_CaveatAdded:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCaveatAdded()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "CaveatAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "CaveatAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCaveatAdded()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "CaveatAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_CaveatRemoved:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCaveatRemoved()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "CaveatRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "CaveatRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCaveatRemoved()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "CaveatRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_CaveatDocCommentChanged:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCaveatDocCommentChanged()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "CaveatDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "CaveatDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCaveatDocCommentChanged()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "CaveatDocCommentChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_CaveatExprChanged:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCaveatExprChanged()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "CaveatExprChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "CaveatExprChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCaveatExprChanged()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "CaveatExprChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_CaveatParameterAdded:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCaveatParameterAdded()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "CaveatParameterAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "CaveatParameterAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCaveatParameterAdded()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "CaveatParameterAdded",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_CaveatParameterRemoved:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCaveatParameterRemoved()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "CaveatParameterRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "CaveatParameterRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCaveatParameterRemoved()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "CaveatParameterRemoved",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ReflectionSchemaDiff_CaveatParameterTypeChanged:
+ if v == nil {
+ err := ReflectionSchemaDiffValidationError{
+ field: "Diff",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCaveatParameterTypeChanged()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "CaveatParameterTypeChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ReflectionSchemaDiffValidationError{
+ field: "CaveatParameterTypeChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCaveatParameterTypeChanged()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ReflectionSchemaDiffValidationError{
+ field: "CaveatParameterTypeChanged",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return ReflectionSchemaDiffMultiError(errors)
+ }
+
+ return nil
+}
+
+// ReflectionSchemaDiffMultiError is an error wrapping multiple validation
+// errors returned by ReflectionSchemaDiff.ValidateAll() if the designated
+// constraints aren't met.
+type ReflectionSchemaDiffMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ReflectionSchemaDiffMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ReflectionSchemaDiffMultiError) AllErrors() []error { return m }
+
+// ReflectionSchemaDiffValidationError is the validation error returned by
+// ReflectionSchemaDiff.Validate if the designated constraints aren't met.
+type ReflectionSchemaDiffValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ReflectionSchemaDiffValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ReflectionSchemaDiffValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ReflectionSchemaDiffValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ReflectionSchemaDiffValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ReflectionSchemaDiffValidationError) ErrorName() string {
+ return "ReflectionSchemaDiffValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ReflectionSchemaDiffValidationError) 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 %sReflectionSchemaDiff.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ReflectionSchemaDiffValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ReflectionSchemaDiffValidationError{}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service_grpc.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service_grpc.pb.go
new file mode 100644
index 0000000..900d078
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service_grpc.pb.go
@@ -0,0 +1,349 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.5.1
+// - protoc (unknown)
+// source: authzed/api/v1/schema_service.proto
+
+package v1
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ SchemaService_ReadSchema_FullMethodName = "/authzed.api.v1.SchemaService/ReadSchema"
+ SchemaService_WriteSchema_FullMethodName = "/authzed.api.v1.SchemaService/WriteSchema"
+ SchemaService_ReflectSchema_FullMethodName = "/authzed.api.v1.SchemaService/ReflectSchema"
+ SchemaService_ComputablePermissions_FullMethodName = "/authzed.api.v1.SchemaService/ComputablePermissions"
+ SchemaService_DependentRelations_FullMethodName = "/authzed.api.v1.SchemaService/DependentRelations"
+ SchemaService_DiffSchema_FullMethodName = "/authzed.api.v1.SchemaService/DiffSchema"
+)
+
+// SchemaServiceClient is the client API for SchemaService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+//
+// SchemaService implements operations on a Permissions System's Schema.
+type SchemaServiceClient interface {
+ // Read returns the current Object Definitions for a Permissions System.
+ //
+ // Errors include:
+ // - INVALID_ARGUMENT: a provided value has failed to semantically validate
+ // - NOT_FOUND: no schema has been defined
+ ReadSchema(ctx context.Context, in *ReadSchemaRequest, opts ...grpc.CallOption) (*ReadSchemaResponse, error)
+ // Write overwrites the current Object Definitions for a Permissions System.
+ WriteSchema(ctx context.Context, in *WriteSchemaRequest, opts ...grpc.CallOption) (*WriteSchemaResponse, error)
+ // ReflectSchema reflects the current schema stored in SpiceDB, returning a structural
+ // form of the schema for use by client tooling.
+ ReflectSchema(ctx context.Context, in *ReflectSchemaRequest, opts ...grpc.CallOption) (*ReflectSchemaResponse, error)
+ // ComputablePermissions returns the set of permissions that compute based off a relation
+ // in the current schema. For example, if the schema has a relation `viewer` and a permission
+ // `view` defined as `permission view = viewer + editor`, then the
+ // computable permissions for the relation `viewer` will include `view`.
+ ComputablePermissions(ctx context.Context, in *ComputablePermissionsRequest, opts ...grpc.CallOption) (*ComputablePermissionsResponse, error)
+ // DependentRelations returns the set of relations and permissions that used
+ // to compute a permission, recursively, in the current schema. It is the
+ // inverse of the ComputablePermissions API.
+ DependentRelations(ctx context.Context, in *DependentRelationsRequest, opts ...grpc.CallOption) (*DependentRelationsResponse, error)
+ // DiffSchema returns the difference between the specified schema and the current
+ // schema stored in SpiceDB.
+ DiffSchema(ctx context.Context, in *DiffSchemaRequest, opts ...grpc.CallOption) (*DiffSchemaResponse, error)
+}
+
+type schemaServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewSchemaServiceClient(cc grpc.ClientConnInterface) SchemaServiceClient {
+ return &schemaServiceClient{cc}
+}
+
+func (c *schemaServiceClient) ReadSchema(ctx context.Context, in *ReadSchemaRequest, opts ...grpc.CallOption) (*ReadSchemaResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ReadSchemaResponse)
+ err := c.cc.Invoke(ctx, SchemaService_ReadSchema_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *schemaServiceClient) WriteSchema(ctx context.Context, in *WriteSchemaRequest, opts ...grpc.CallOption) (*WriteSchemaResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(WriteSchemaResponse)
+ err := c.cc.Invoke(ctx, SchemaService_WriteSchema_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *schemaServiceClient) ReflectSchema(ctx context.Context, in *ReflectSchemaRequest, opts ...grpc.CallOption) (*ReflectSchemaResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ReflectSchemaResponse)
+ err := c.cc.Invoke(ctx, SchemaService_ReflectSchema_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *schemaServiceClient) ComputablePermissions(ctx context.Context, in *ComputablePermissionsRequest, opts ...grpc.CallOption) (*ComputablePermissionsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ComputablePermissionsResponse)
+ err := c.cc.Invoke(ctx, SchemaService_ComputablePermissions_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *schemaServiceClient) DependentRelations(ctx context.Context, in *DependentRelationsRequest, opts ...grpc.CallOption) (*DependentRelationsResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(DependentRelationsResponse)
+ err := c.cc.Invoke(ctx, SchemaService_DependentRelations_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *schemaServiceClient) DiffSchema(ctx context.Context, in *DiffSchemaRequest, opts ...grpc.CallOption) (*DiffSchemaResponse, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(DiffSchemaResponse)
+ err := c.cc.Invoke(ctx, SchemaService_DiffSchema_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// SchemaServiceServer is the server API for SchemaService service.
+// All implementations must embed UnimplementedSchemaServiceServer
+// for forward compatibility.
+//
+// SchemaService implements operations on a Permissions System's Schema.
+type SchemaServiceServer interface {
+ // Read returns the current Object Definitions for a Permissions System.
+ //
+ // Errors include:
+ // - INVALID_ARGUMENT: a provided value has failed to semantically validate
+ // - NOT_FOUND: no schema has been defined
+ ReadSchema(context.Context, *ReadSchemaRequest) (*ReadSchemaResponse, error)
+ // Write overwrites the current Object Definitions for a Permissions System.
+ WriteSchema(context.Context, *WriteSchemaRequest) (*WriteSchemaResponse, error)
+ // ReflectSchema reflects the current schema stored in SpiceDB, returning a structural
+ // form of the schema for use by client tooling.
+ ReflectSchema(context.Context, *ReflectSchemaRequest) (*ReflectSchemaResponse, error)
+ // ComputablePermissions returns the set of permissions that compute based off a relation
+ // in the current schema. For example, if the schema has a relation `viewer` and a permission
+ // `view` defined as `permission view = viewer + editor`, then the
+ // computable permissions for the relation `viewer` will include `view`.
+ ComputablePermissions(context.Context, *ComputablePermissionsRequest) (*ComputablePermissionsResponse, error)
+ // DependentRelations returns the set of relations and permissions that used
+ // to compute a permission, recursively, in the current schema. It is the
+ // inverse of the ComputablePermissions API.
+ DependentRelations(context.Context, *DependentRelationsRequest) (*DependentRelationsResponse, error)
+ // DiffSchema returns the difference between the specified schema and the current
+ // schema stored in SpiceDB.
+ DiffSchema(context.Context, *DiffSchemaRequest) (*DiffSchemaResponse, error)
+ mustEmbedUnimplementedSchemaServiceServer()
+}
+
+// UnimplementedSchemaServiceServer must be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedSchemaServiceServer struct{}
+
+func (UnimplementedSchemaServiceServer) ReadSchema(context.Context, *ReadSchemaRequest) (*ReadSchemaResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ReadSchema not implemented")
+}
+func (UnimplementedSchemaServiceServer) WriteSchema(context.Context, *WriteSchemaRequest) (*WriteSchemaResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method WriteSchema not implemented")
+}
+func (UnimplementedSchemaServiceServer) ReflectSchema(context.Context, *ReflectSchemaRequest) (*ReflectSchemaResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ReflectSchema not implemented")
+}
+func (UnimplementedSchemaServiceServer) ComputablePermissions(context.Context, *ComputablePermissionsRequest) (*ComputablePermissionsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ComputablePermissions not implemented")
+}
+func (UnimplementedSchemaServiceServer) DependentRelations(context.Context, *DependentRelationsRequest) (*DependentRelationsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DependentRelations not implemented")
+}
+func (UnimplementedSchemaServiceServer) DiffSchema(context.Context, *DiffSchemaRequest) (*DiffSchemaResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DiffSchema not implemented")
+}
+func (UnimplementedSchemaServiceServer) mustEmbedUnimplementedSchemaServiceServer() {}
+func (UnimplementedSchemaServiceServer) testEmbeddedByValue() {}
+
+// UnsafeSchemaServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to SchemaServiceServer will
+// result in compilation errors.
+type UnsafeSchemaServiceServer interface {
+ mustEmbedUnimplementedSchemaServiceServer()
+}
+
+func RegisterSchemaServiceServer(s grpc.ServiceRegistrar, srv SchemaServiceServer) {
+ // If the following call pancis, it indicates UnimplementedSchemaServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
+ s.RegisterService(&SchemaService_ServiceDesc, srv)
+}
+
+func _SchemaService_ReadSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ReadSchemaRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SchemaServiceServer).ReadSchema(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: SchemaService_ReadSchema_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SchemaServiceServer).ReadSchema(ctx, req.(*ReadSchemaRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _SchemaService_WriteSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(WriteSchemaRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SchemaServiceServer).WriteSchema(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: SchemaService_WriteSchema_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SchemaServiceServer).WriteSchema(ctx, req.(*WriteSchemaRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _SchemaService_ReflectSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ReflectSchemaRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SchemaServiceServer).ReflectSchema(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: SchemaService_ReflectSchema_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SchemaServiceServer).ReflectSchema(ctx, req.(*ReflectSchemaRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _SchemaService_ComputablePermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ComputablePermissionsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SchemaServiceServer).ComputablePermissions(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: SchemaService_ComputablePermissions_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SchemaServiceServer).ComputablePermissions(ctx, req.(*ComputablePermissionsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _SchemaService_DependentRelations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DependentRelationsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SchemaServiceServer).DependentRelations(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: SchemaService_DependentRelations_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SchemaServiceServer).DependentRelations(ctx, req.(*DependentRelationsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _SchemaService_DiffSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DiffSchemaRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SchemaServiceServer).DiffSchema(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: SchemaService_DiffSchema_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SchemaServiceServer).DiffSchema(ctx, req.(*DiffSchemaRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// SchemaService_ServiceDesc is the grpc.ServiceDesc for SchemaService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var SchemaService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "authzed.api.v1.SchemaService",
+ HandlerType: (*SchemaServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "ReadSchema",
+ Handler: _SchemaService_ReadSchema_Handler,
+ },
+ {
+ MethodName: "WriteSchema",
+ Handler: _SchemaService_WriteSchema_Handler,
+ },
+ {
+ MethodName: "ReflectSchema",
+ Handler: _SchemaService_ReflectSchema_Handler,
+ },
+ {
+ MethodName: "ComputablePermissions",
+ Handler: _SchemaService_ComputablePermissions_Handler,
+ },
+ {
+ MethodName: "DependentRelations",
+ Handler: _SchemaService_DependentRelations_Handler,
+ },
+ {
+ MethodName: "DiffSchema",
+ Handler: _SchemaService_DiffSchema_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "authzed/api/v1/schema_service.proto",
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service_vtproto.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service_vtproto.pb.go
new file mode 100644
index 0000000..2df5f50
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/schema_service_vtproto.pb.go
@@ -0,0 +1,8305 @@
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// protoc-gen-go-vtproto version: v0.6.1-0.20240319094008-0393e58bdf10
+// source: authzed/api/v1/schema_service.proto
+
+package v1
+
+import (
+ fmt "fmt"
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ io "io"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *ReadSchemaRequest) CloneVT() *ReadSchemaRequest {
+ if m == nil {
+ return (*ReadSchemaRequest)(nil)
+ }
+ r := new(ReadSchemaRequest)
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReadSchemaRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReadSchemaResponse) CloneVT() *ReadSchemaResponse {
+ if m == nil {
+ return (*ReadSchemaResponse)(nil)
+ }
+ r := new(ReadSchemaResponse)
+ r.SchemaText = m.SchemaText
+ r.ReadAt = m.ReadAt.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReadSchemaResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *WriteSchemaRequest) CloneVT() *WriteSchemaRequest {
+ if m == nil {
+ return (*WriteSchemaRequest)(nil)
+ }
+ r := new(WriteSchemaRequest)
+ r.Schema = m.Schema
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *WriteSchemaRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *WriteSchemaResponse) CloneVT() *WriteSchemaResponse {
+ if m == nil {
+ return (*WriteSchemaResponse)(nil)
+ }
+ r := new(WriteSchemaResponse)
+ r.WrittenAt = m.WrittenAt.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *WriteSchemaResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReflectSchemaRequest) CloneVT() *ReflectSchemaRequest {
+ if m == nil {
+ return (*ReflectSchemaRequest)(nil)
+ }
+ r := new(ReflectSchemaRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ if rhs := m.OptionalFilters; rhs != nil {
+ tmpContainer := make([]*ReflectionSchemaFilter, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.OptionalFilters = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReflectSchemaRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReflectSchemaResponse) CloneVT() *ReflectSchemaResponse {
+ if m == nil {
+ return (*ReflectSchemaResponse)(nil)
+ }
+ r := new(ReflectSchemaResponse)
+ r.ReadAt = m.ReadAt.CloneVT()
+ if rhs := m.Definitions; rhs != nil {
+ tmpContainer := make([]*ReflectionDefinition, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Definitions = tmpContainer
+ }
+ if rhs := m.Caveats; rhs != nil {
+ tmpContainer := make([]*ReflectionCaveat, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Caveats = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReflectSchemaResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReflectionSchemaFilter) CloneVT() *ReflectionSchemaFilter {
+ if m == nil {
+ return (*ReflectionSchemaFilter)(nil)
+ }
+ r := new(ReflectionSchemaFilter)
+ r.OptionalDefinitionNameFilter = m.OptionalDefinitionNameFilter
+ r.OptionalCaveatNameFilter = m.OptionalCaveatNameFilter
+ r.OptionalRelationNameFilter = m.OptionalRelationNameFilter
+ r.OptionalPermissionNameFilter = m.OptionalPermissionNameFilter
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReflectionSchemaFilter) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReflectionDefinition) CloneVT() *ReflectionDefinition {
+ if m == nil {
+ return (*ReflectionDefinition)(nil)
+ }
+ r := new(ReflectionDefinition)
+ r.Name = m.Name
+ r.Comment = m.Comment
+ if rhs := m.Relations; rhs != nil {
+ tmpContainer := make([]*ReflectionRelation, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Relations = tmpContainer
+ }
+ if rhs := m.Permissions; rhs != nil {
+ tmpContainer := make([]*ReflectionPermission, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Permissions = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReflectionDefinition) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReflectionCaveat) CloneVT() *ReflectionCaveat {
+ if m == nil {
+ return (*ReflectionCaveat)(nil)
+ }
+ r := new(ReflectionCaveat)
+ r.Name = m.Name
+ r.Comment = m.Comment
+ r.Expression = m.Expression
+ if rhs := m.Parameters; rhs != nil {
+ tmpContainer := make([]*ReflectionCaveatParameter, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Parameters = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReflectionCaveat) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReflectionCaveatParameter) CloneVT() *ReflectionCaveatParameter {
+ if m == nil {
+ return (*ReflectionCaveatParameter)(nil)
+ }
+ r := new(ReflectionCaveatParameter)
+ r.Name = m.Name
+ r.Type = m.Type
+ r.ParentCaveatName = m.ParentCaveatName
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReflectionCaveatParameter) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReflectionRelation) CloneVT() *ReflectionRelation {
+ if m == nil {
+ return (*ReflectionRelation)(nil)
+ }
+ r := new(ReflectionRelation)
+ r.Name = m.Name
+ r.Comment = m.Comment
+ r.ParentDefinitionName = m.ParentDefinitionName
+ if rhs := m.SubjectTypes; rhs != nil {
+ tmpContainer := make([]*ReflectionTypeReference, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.SubjectTypes = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReflectionRelation) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReflectionTypeReference) CloneVT() *ReflectionTypeReference {
+ if m == nil {
+ return (*ReflectionTypeReference)(nil)
+ }
+ r := new(ReflectionTypeReference)
+ r.SubjectDefinitionName = m.SubjectDefinitionName
+ r.OptionalCaveatName = m.OptionalCaveatName
+ if m.Typeref != nil {
+ r.Typeref = m.Typeref.(interface {
+ CloneVT() isReflectionTypeReference_Typeref
+ }).CloneVT()
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReflectionTypeReference) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReflectionTypeReference_IsTerminalSubject) CloneVT() isReflectionTypeReference_Typeref {
+ if m == nil {
+ return (*ReflectionTypeReference_IsTerminalSubject)(nil)
+ }
+ r := new(ReflectionTypeReference_IsTerminalSubject)
+ r.IsTerminalSubject = m.IsTerminalSubject
+ return r
+}
+
+func (m *ReflectionTypeReference_OptionalRelationName) CloneVT() isReflectionTypeReference_Typeref {
+ if m == nil {
+ return (*ReflectionTypeReference_OptionalRelationName)(nil)
+ }
+ r := new(ReflectionTypeReference_OptionalRelationName)
+ r.OptionalRelationName = m.OptionalRelationName
+ return r
+}
+
+func (m *ReflectionTypeReference_IsPublicWildcard) CloneVT() isReflectionTypeReference_Typeref {
+ if m == nil {
+ return (*ReflectionTypeReference_IsPublicWildcard)(nil)
+ }
+ r := new(ReflectionTypeReference_IsPublicWildcard)
+ r.IsPublicWildcard = m.IsPublicWildcard
+ return r
+}
+
+func (m *ReflectionPermission) CloneVT() *ReflectionPermission {
+ if m == nil {
+ return (*ReflectionPermission)(nil)
+ }
+ r := new(ReflectionPermission)
+ r.Name = m.Name
+ r.Comment = m.Comment
+ r.ParentDefinitionName = m.ParentDefinitionName
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReflectionPermission) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ComputablePermissionsRequest) CloneVT() *ComputablePermissionsRequest {
+ if m == nil {
+ return (*ComputablePermissionsRequest)(nil)
+ }
+ r := new(ComputablePermissionsRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ r.DefinitionName = m.DefinitionName
+ r.RelationName = m.RelationName
+ r.OptionalDefinitionNameFilter = m.OptionalDefinitionNameFilter
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ComputablePermissionsRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReflectionRelationReference) CloneVT() *ReflectionRelationReference {
+ if m == nil {
+ return (*ReflectionRelationReference)(nil)
+ }
+ r := new(ReflectionRelationReference)
+ r.DefinitionName = m.DefinitionName
+ r.RelationName = m.RelationName
+ r.IsPermission = m.IsPermission
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReflectionRelationReference) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ComputablePermissionsResponse) CloneVT() *ComputablePermissionsResponse {
+ if m == nil {
+ return (*ComputablePermissionsResponse)(nil)
+ }
+ r := new(ComputablePermissionsResponse)
+ r.ReadAt = m.ReadAt.CloneVT()
+ if rhs := m.Permissions; rhs != nil {
+ tmpContainer := make([]*ReflectionRelationReference, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Permissions = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ComputablePermissionsResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *DependentRelationsRequest) CloneVT() *DependentRelationsRequest {
+ if m == nil {
+ return (*DependentRelationsRequest)(nil)
+ }
+ r := new(DependentRelationsRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ r.DefinitionName = m.DefinitionName
+ r.PermissionName = m.PermissionName
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *DependentRelationsRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *DependentRelationsResponse) CloneVT() *DependentRelationsResponse {
+ if m == nil {
+ return (*DependentRelationsResponse)(nil)
+ }
+ r := new(DependentRelationsResponse)
+ r.ReadAt = m.ReadAt.CloneVT()
+ if rhs := m.Relations; rhs != nil {
+ tmpContainer := make([]*ReflectionRelationReference, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Relations = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *DependentRelationsResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *DiffSchemaRequest) CloneVT() *DiffSchemaRequest {
+ if m == nil {
+ return (*DiffSchemaRequest)(nil)
+ }
+ r := new(DiffSchemaRequest)
+ r.Consistency = m.Consistency.CloneVT()
+ r.ComparisonSchema = m.ComparisonSchema
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *DiffSchemaRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *DiffSchemaResponse) CloneVT() *DiffSchemaResponse {
+ if m == nil {
+ return (*DiffSchemaResponse)(nil)
+ }
+ r := new(DiffSchemaResponse)
+ r.ReadAt = m.ReadAt.CloneVT()
+ if rhs := m.Diffs; rhs != nil {
+ tmpContainer := make([]*ReflectionSchemaDiff, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Diffs = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *DiffSchemaResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReflectionRelationSubjectTypeChange) CloneVT() *ReflectionRelationSubjectTypeChange {
+ if m == nil {
+ return (*ReflectionRelationSubjectTypeChange)(nil)
+ }
+ r := new(ReflectionRelationSubjectTypeChange)
+ r.Relation = m.Relation.CloneVT()
+ r.ChangedSubjectType = m.ChangedSubjectType.CloneVT()
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReflectionRelationSubjectTypeChange) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReflectionCaveatParameterTypeChange) CloneVT() *ReflectionCaveatParameterTypeChange {
+ if m == nil {
+ return (*ReflectionCaveatParameterTypeChange)(nil)
+ }
+ r := new(ReflectionCaveatParameterTypeChange)
+ r.Parameter = m.Parameter.CloneVT()
+ r.PreviousType = m.PreviousType
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReflectionCaveatParameterTypeChange) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReflectionSchemaDiff) CloneVT() *ReflectionSchemaDiff {
+ if m == nil {
+ return (*ReflectionSchemaDiff)(nil)
+ }
+ r := new(ReflectionSchemaDiff)
+ if m.Diff != nil {
+ r.Diff = m.Diff.(interface {
+ CloneVT() isReflectionSchemaDiff_Diff
+ }).CloneVT()
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *ReflectionSchemaDiff) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *ReflectionSchemaDiff_DefinitionAdded) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_DefinitionAdded)(nil)
+ }
+ r := new(ReflectionSchemaDiff_DefinitionAdded)
+ r.DefinitionAdded = m.DefinitionAdded.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_DefinitionRemoved) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_DefinitionRemoved)(nil)
+ }
+ r := new(ReflectionSchemaDiff_DefinitionRemoved)
+ r.DefinitionRemoved = m.DefinitionRemoved.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_DefinitionDocCommentChanged) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_DefinitionDocCommentChanged)(nil)
+ }
+ r := new(ReflectionSchemaDiff_DefinitionDocCommentChanged)
+ r.DefinitionDocCommentChanged = m.DefinitionDocCommentChanged.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_RelationAdded) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_RelationAdded)(nil)
+ }
+ r := new(ReflectionSchemaDiff_RelationAdded)
+ r.RelationAdded = m.RelationAdded.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_RelationRemoved) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_RelationRemoved)(nil)
+ }
+ r := new(ReflectionSchemaDiff_RelationRemoved)
+ r.RelationRemoved = m.RelationRemoved.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_RelationDocCommentChanged) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_RelationDocCommentChanged)(nil)
+ }
+ r := new(ReflectionSchemaDiff_RelationDocCommentChanged)
+ r.RelationDocCommentChanged = m.RelationDocCommentChanged.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_RelationSubjectTypeAdded) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_RelationSubjectTypeAdded)(nil)
+ }
+ r := new(ReflectionSchemaDiff_RelationSubjectTypeAdded)
+ r.RelationSubjectTypeAdded = m.RelationSubjectTypeAdded.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_RelationSubjectTypeRemoved) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_RelationSubjectTypeRemoved)(nil)
+ }
+ r := new(ReflectionSchemaDiff_RelationSubjectTypeRemoved)
+ r.RelationSubjectTypeRemoved = m.RelationSubjectTypeRemoved.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_PermissionAdded) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_PermissionAdded)(nil)
+ }
+ r := new(ReflectionSchemaDiff_PermissionAdded)
+ r.PermissionAdded = m.PermissionAdded.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_PermissionRemoved) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_PermissionRemoved)(nil)
+ }
+ r := new(ReflectionSchemaDiff_PermissionRemoved)
+ r.PermissionRemoved = m.PermissionRemoved.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_PermissionDocCommentChanged) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_PermissionDocCommentChanged)(nil)
+ }
+ r := new(ReflectionSchemaDiff_PermissionDocCommentChanged)
+ r.PermissionDocCommentChanged = m.PermissionDocCommentChanged.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_PermissionExprChanged) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_PermissionExprChanged)(nil)
+ }
+ r := new(ReflectionSchemaDiff_PermissionExprChanged)
+ r.PermissionExprChanged = m.PermissionExprChanged.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_CaveatAdded) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_CaveatAdded)(nil)
+ }
+ r := new(ReflectionSchemaDiff_CaveatAdded)
+ r.CaveatAdded = m.CaveatAdded.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_CaveatRemoved) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_CaveatRemoved)(nil)
+ }
+ r := new(ReflectionSchemaDiff_CaveatRemoved)
+ r.CaveatRemoved = m.CaveatRemoved.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_CaveatDocCommentChanged) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_CaveatDocCommentChanged)(nil)
+ }
+ r := new(ReflectionSchemaDiff_CaveatDocCommentChanged)
+ r.CaveatDocCommentChanged = m.CaveatDocCommentChanged.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_CaveatExprChanged) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_CaveatExprChanged)(nil)
+ }
+ r := new(ReflectionSchemaDiff_CaveatExprChanged)
+ r.CaveatExprChanged = m.CaveatExprChanged.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_CaveatParameterAdded) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_CaveatParameterAdded)(nil)
+ }
+ r := new(ReflectionSchemaDiff_CaveatParameterAdded)
+ r.CaveatParameterAdded = m.CaveatParameterAdded.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_CaveatParameterRemoved) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_CaveatParameterRemoved)(nil)
+ }
+ r := new(ReflectionSchemaDiff_CaveatParameterRemoved)
+ r.CaveatParameterRemoved = m.CaveatParameterRemoved.CloneVT()
+ return r
+}
+
+func (m *ReflectionSchemaDiff_CaveatParameterTypeChanged) CloneVT() isReflectionSchemaDiff_Diff {
+ if m == nil {
+ return (*ReflectionSchemaDiff_CaveatParameterTypeChanged)(nil)
+ }
+ r := new(ReflectionSchemaDiff_CaveatParameterTypeChanged)
+ r.CaveatParameterTypeChanged = m.CaveatParameterTypeChanged.CloneVT()
+ return r
+}
+
+func (this *ReadSchemaRequest) EqualVT(that *ReadSchemaRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReadSchemaRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReadSchemaRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReadSchemaResponse) EqualVT(that *ReadSchemaResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.SchemaText != that.SchemaText {
+ return false
+ }
+ if !this.ReadAt.EqualVT(that.ReadAt) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReadSchemaResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReadSchemaResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *WriteSchemaRequest) EqualVT(that *WriteSchemaRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Schema != that.Schema {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *WriteSchemaRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*WriteSchemaRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *WriteSchemaResponse) EqualVT(that *WriteSchemaResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.WrittenAt.EqualVT(that.WrittenAt) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *WriteSchemaResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*WriteSchemaResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReflectSchemaRequest) EqualVT(that *ReflectSchemaRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if len(this.OptionalFilters) != len(that.OptionalFilters) {
+ return false
+ }
+ for i, vx := range this.OptionalFilters {
+ vy := that.OptionalFilters[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ReflectionSchemaFilter{}
+ }
+ if q == nil {
+ q = &ReflectionSchemaFilter{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReflectSchemaRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReflectSchemaRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReflectSchemaResponse) EqualVT(that *ReflectSchemaResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if len(this.Definitions) != len(that.Definitions) {
+ return false
+ }
+ for i, vx := range this.Definitions {
+ vy := that.Definitions[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ReflectionDefinition{}
+ }
+ if q == nil {
+ q = &ReflectionDefinition{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if len(this.Caveats) != len(that.Caveats) {
+ return false
+ }
+ for i, vx := range this.Caveats {
+ vy := that.Caveats[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ReflectionCaveat{}
+ }
+ if q == nil {
+ q = &ReflectionCaveat{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if !this.ReadAt.EqualVT(that.ReadAt) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReflectSchemaResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReflectSchemaResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReflectionSchemaFilter) EqualVT(that *ReflectionSchemaFilter) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.OptionalDefinitionNameFilter != that.OptionalDefinitionNameFilter {
+ return false
+ }
+ if this.OptionalCaveatNameFilter != that.OptionalCaveatNameFilter {
+ return false
+ }
+ if this.OptionalRelationNameFilter != that.OptionalRelationNameFilter {
+ return false
+ }
+ if this.OptionalPermissionNameFilter != that.OptionalPermissionNameFilter {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReflectionSchemaFilter) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReflectionSchemaFilter)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReflectionDefinition) EqualVT(that *ReflectionDefinition) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Name != that.Name {
+ return false
+ }
+ if this.Comment != that.Comment {
+ return false
+ }
+ if len(this.Relations) != len(that.Relations) {
+ return false
+ }
+ for i, vx := range this.Relations {
+ vy := that.Relations[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ReflectionRelation{}
+ }
+ if q == nil {
+ q = &ReflectionRelation{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if len(this.Permissions) != len(that.Permissions) {
+ return false
+ }
+ for i, vx := range this.Permissions {
+ vy := that.Permissions[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ReflectionPermission{}
+ }
+ if q == nil {
+ q = &ReflectionPermission{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReflectionDefinition) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReflectionDefinition)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReflectionCaveat) EqualVT(that *ReflectionCaveat) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Name != that.Name {
+ return false
+ }
+ if this.Comment != that.Comment {
+ return false
+ }
+ if len(this.Parameters) != len(that.Parameters) {
+ return false
+ }
+ for i, vx := range this.Parameters {
+ vy := that.Parameters[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ReflectionCaveatParameter{}
+ }
+ if q == nil {
+ q = &ReflectionCaveatParameter{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if this.Expression != that.Expression {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReflectionCaveat) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReflectionCaveat)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReflectionCaveatParameter) EqualVT(that *ReflectionCaveatParameter) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Name != that.Name {
+ return false
+ }
+ if this.Type != that.Type {
+ return false
+ }
+ if this.ParentCaveatName != that.ParentCaveatName {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReflectionCaveatParameter) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReflectionCaveatParameter)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReflectionRelation) EqualVT(that *ReflectionRelation) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Name != that.Name {
+ return false
+ }
+ if this.Comment != that.Comment {
+ return false
+ }
+ if this.ParentDefinitionName != that.ParentDefinitionName {
+ return false
+ }
+ if len(this.SubjectTypes) != len(that.SubjectTypes) {
+ return false
+ }
+ for i, vx := range this.SubjectTypes {
+ vy := that.SubjectTypes[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ReflectionTypeReference{}
+ }
+ if q == nil {
+ q = &ReflectionTypeReference{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReflectionRelation) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReflectionRelation)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReflectionTypeReference) EqualVT(that *ReflectionTypeReference) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Typeref == nil && that.Typeref != nil {
+ return false
+ } else if this.Typeref != nil {
+ if that.Typeref == nil {
+ return false
+ }
+ if !this.Typeref.(interface {
+ EqualVT(isReflectionTypeReference_Typeref) bool
+ }).EqualVT(that.Typeref) {
+ return false
+ }
+ }
+ if this.SubjectDefinitionName != that.SubjectDefinitionName {
+ return false
+ }
+ if this.OptionalCaveatName != that.OptionalCaveatName {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReflectionTypeReference) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReflectionTypeReference)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReflectionTypeReference_IsTerminalSubject) EqualVT(thatIface isReflectionTypeReference_Typeref) bool {
+ that, ok := thatIface.(*ReflectionTypeReference_IsTerminalSubject)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if this.IsTerminalSubject != that.IsTerminalSubject {
+ return false
+ }
+ return true
+}
+
+func (this *ReflectionTypeReference_OptionalRelationName) EqualVT(thatIface isReflectionTypeReference_Typeref) bool {
+ that, ok := thatIface.(*ReflectionTypeReference_OptionalRelationName)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if this.OptionalRelationName != that.OptionalRelationName {
+ return false
+ }
+ return true
+}
+
+func (this *ReflectionTypeReference_IsPublicWildcard) EqualVT(thatIface isReflectionTypeReference_Typeref) bool {
+ that, ok := thatIface.(*ReflectionTypeReference_IsPublicWildcard)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if this.IsPublicWildcard != that.IsPublicWildcard {
+ return false
+ }
+ return true
+}
+
+func (this *ReflectionPermission) EqualVT(that *ReflectionPermission) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Name != that.Name {
+ return false
+ }
+ if this.Comment != that.Comment {
+ return false
+ }
+ if this.ParentDefinitionName != that.ParentDefinitionName {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReflectionPermission) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReflectionPermission)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ComputablePermissionsRequest) EqualVT(that *ComputablePermissionsRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if this.DefinitionName != that.DefinitionName {
+ return false
+ }
+ if this.RelationName != that.RelationName {
+ return false
+ }
+ if this.OptionalDefinitionNameFilter != that.OptionalDefinitionNameFilter {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ComputablePermissionsRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ComputablePermissionsRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReflectionRelationReference) EqualVT(that *ReflectionRelationReference) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.DefinitionName != that.DefinitionName {
+ return false
+ }
+ if this.RelationName != that.RelationName {
+ return false
+ }
+ if this.IsPermission != that.IsPermission {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReflectionRelationReference) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReflectionRelationReference)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ComputablePermissionsResponse) EqualVT(that *ComputablePermissionsResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if len(this.Permissions) != len(that.Permissions) {
+ return false
+ }
+ for i, vx := range this.Permissions {
+ vy := that.Permissions[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ReflectionRelationReference{}
+ }
+ if q == nil {
+ q = &ReflectionRelationReference{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if !this.ReadAt.EqualVT(that.ReadAt) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ComputablePermissionsResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ComputablePermissionsResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *DependentRelationsRequest) EqualVT(that *DependentRelationsRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if this.DefinitionName != that.DefinitionName {
+ return false
+ }
+ if this.PermissionName != that.PermissionName {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *DependentRelationsRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*DependentRelationsRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *DependentRelationsResponse) EqualVT(that *DependentRelationsResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if len(this.Relations) != len(that.Relations) {
+ return false
+ }
+ for i, vx := range this.Relations {
+ vy := that.Relations[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ReflectionRelationReference{}
+ }
+ if q == nil {
+ q = &ReflectionRelationReference{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if !this.ReadAt.EqualVT(that.ReadAt) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *DependentRelationsResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*DependentRelationsResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *DiffSchemaRequest) EqualVT(that *DiffSchemaRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Consistency.EqualVT(that.Consistency) {
+ return false
+ }
+ if this.ComparisonSchema != that.ComparisonSchema {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *DiffSchemaRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*DiffSchemaRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *DiffSchemaResponse) EqualVT(that *DiffSchemaResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if len(this.Diffs) != len(that.Diffs) {
+ return false
+ }
+ for i, vx := range this.Diffs {
+ vy := that.Diffs[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &ReflectionSchemaDiff{}
+ }
+ if q == nil {
+ q = &ReflectionSchemaDiff{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if !this.ReadAt.EqualVT(that.ReadAt) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *DiffSchemaResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*DiffSchemaResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReflectionRelationSubjectTypeChange) EqualVT(that *ReflectionRelationSubjectTypeChange) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Relation.EqualVT(that.Relation) {
+ return false
+ }
+ if !this.ChangedSubjectType.EqualVT(that.ChangedSubjectType) {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReflectionRelationSubjectTypeChange) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReflectionRelationSubjectTypeChange)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReflectionCaveatParameterTypeChange) EqualVT(that *ReflectionCaveatParameterTypeChange) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if !this.Parameter.EqualVT(that.Parameter) {
+ return false
+ }
+ if this.PreviousType != that.PreviousType {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReflectionCaveatParameterTypeChange) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReflectionCaveatParameterTypeChange)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReflectionSchemaDiff) EqualVT(that *ReflectionSchemaDiff) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if this.Diff == nil && that.Diff != nil {
+ return false
+ } else if this.Diff != nil {
+ if that.Diff == nil {
+ return false
+ }
+ if !this.Diff.(interface {
+ EqualVT(isReflectionSchemaDiff_Diff) bool
+ }).EqualVT(that.Diff) {
+ return false
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *ReflectionSchemaDiff) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*ReflectionSchemaDiff)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *ReflectionSchemaDiff_DefinitionAdded) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_DefinitionAdded)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.DefinitionAdded, that.DefinitionAdded; p != q {
+ if p == nil {
+ p = &ReflectionDefinition{}
+ }
+ if q == nil {
+ q = &ReflectionDefinition{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_DefinitionRemoved) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_DefinitionRemoved)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.DefinitionRemoved, that.DefinitionRemoved; p != q {
+ if p == nil {
+ p = &ReflectionDefinition{}
+ }
+ if q == nil {
+ q = &ReflectionDefinition{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_DefinitionDocCommentChanged) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_DefinitionDocCommentChanged)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.DefinitionDocCommentChanged, that.DefinitionDocCommentChanged; p != q {
+ if p == nil {
+ p = &ReflectionDefinition{}
+ }
+ if q == nil {
+ q = &ReflectionDefinition{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_RelationAdded) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_RelationAdded)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.RelationAdded, that.RelationAdded; p != q {
+ if p == nil {
+ p = &ReflectionRelation{}
+ }
+ if q == nil {
+ q = &ReflectionRelation{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_RelationRemoved) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_RelationRemoved)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.RelationRemoved, that.RelationRemoved; p != q {
+ if p == nil {
+ p = &ReflectionRelation{}
+ }
+ if q == nil {
+ q = &ReflectionRelation{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_RelationDocCommentChanged) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_RelationDocCommentChanged)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.RelationDocCommentChanged, that.RelationDocCommentChanged; p != q {
+ if p == nil {
+ p = &ReflectionRelation{}
+ }
+ if q == nil {
+ q = &ReflectionRelation{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_RelationSubjectTypeAdded) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_RelationSubjectTypeAdded)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.RelationSubjectTypeAdded, that.RelationSubjectTypeAdded; p != q {
+ if p == nil {
+ p = &ReflectionRelationSubjectTypeChange{}
+ }
+ if q == nil {
+ q = &ReflectionRelationSubjectTypeChange{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_RelationSubjectTypeRemoved) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_RelationSubjectTypeRemoved)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.RelationSubjectTypeRemoved, that.RelationSubjectTypeRemoved; p != q {
+ if p == nil {
+ p = &ReflectionRelationSubjectTypeChange{}
+ }
+ if q == nil {
+ q = &ReflectionRelationSubjectTypeChange{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_PermissionAdded) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_PermissionAdded)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.PermissionAdded, that.PermissionAdded; p != q {
+ if p == nil {
+ p = &ReflectionPermission{}
+ }
+ if q == nil {
+ q = &ReflectionPermission{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_PermissionRemoved) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_PermissionRemoved)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.PermissionRemoved, that.PermissionRemoved; p != q {
+ if p == nil {
+ p = &ReflectionPermission{}
+ }
+ if q == nil {
+ q = &ReflectionPermission{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_PermissionDocCommentChanged) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_PermissionDocCommentChanged)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.PermissionDocCommentChanged, that.PermissionDocCommentChanged; p != q {
+ if p == nil {
+ p = &ReflectionPermission{}
+ }
+ if q == nil {
+ q = &ReflectionPermission{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_PermissionExprChanged) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_PermissionExprChanged)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.PermissionExprChanged, that.PermissionExprChanged; p != q {
+ if p == nil {
+ p = &ReflectionPermission{}
+ }
+ if q == nil {
+ q = &ReflectionPermission{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_CaveatAdded) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_CaveatAdded)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.CaveatAdded, that.CaveatAdded; p != q {
+ if p == nil {
+ p = &ReflectionCaveat{}
+ }
+ if q == nil {
+ q = &ReflectionCaveat{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_CaveatRemoved) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_CaveatRemoved)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.CaveatRemoved, that.CaveatRemoved; p != q {
+ if p == nil {
+ p = &ReflectionCaveat{}
+ }
+ if q == nil {
+ q = &ReflectionCaveat{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_CaveatDocCommentChanged) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_CaveatDocCommentChanged)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.CaveatDocCommentChanged, that.CaveatDocCommentChanged; p != q {
+ if p == nil {
+ p = &ReflectionCaveat{}
+ }
+ if q == nil {
+ q = &ReflectionCaveat{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_CaveatExprChanged) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_CaveatExprChanged)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.CaveatExprChanged, that.CaveatExprChanged; p != q {
+ if p == nil {
+ p = &ReflectionCaveat{}
+ }
+ if q == nil {
+ q = &ReflectionCaveat{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_CaveatParameterAdded) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_CaveatParameterAdded)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.CaveatParameterAdded, that.CaveatParameterAdded; p != q {
+ if p == nil {
+ p = &ReflectionCaveatParameter{}
+ }
+ if q == nil {
+ q = &ReflectionCaveatParameter{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_CaveatParameterRemoved) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_CaveatParameterRemoved)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.CaveatParameterRemoved, that.CaveatParameterRemoved; p != q {
+ if p == nil {
+ p = &ReflectionCaveatParameter{}
+ }
+ if q == nil {
+ q = &ReflectionCaveatParameter{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (this *ReflectionSchemaDiff_CaveatParameterTypeChanged) EqualVT(thatIface isReflectionSchemaDiff_Diff) bool {
+ that, ok := thatIface.(*ReflectionSchemaDiff_CaveatParameterTypeChanged)
+ if !ok {
+ return false
+ }
+ if this == that {
+ return true
+ }
+ if this == nil && that != nil || this != nil && that == nil {
+ return false
+ }
+ if p, q := this.CaveatParameterTypeChanged, that.CaveatParameterTypeChanged; p != q {
+ if p == nil {
+ p = &ReflectionCaveatParameterTypeChange{}
+ }
+ if q == nil {
+ q = &ReflectionCaveatParameterTypeChange{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ return true
+}
+
+func (m *ReadSchemaRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReadSchemaRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReadSchemaRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReadSchemaResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReadSchemaResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReadSchemaResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ReadAt != nil {
+ size, err := m.ReadAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.SchemaText) > 0 {
+ i -= len(m.SchemaText)
+ copy(dAtA[i:], m.SchemaText)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SchemaText)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *WriteSchemaRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *WriteSchemaRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *WriteSchemaRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Schema) > 0 {
+ i -= len(m.Schema)
+ copy(dAtA[i:], m.Schema)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Schema)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *WriteSchemaResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *WriteSchemaResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *WriteSchemaResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.WrittenAt != nil {
+ size, err := m.WrittenAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReflectSchemaRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReflectSchemaRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectSchemaRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.OptionalFilters) > 0 {
+ for iNdEx := len(m.OptionalFilters) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.OptionalFilters[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReflectSchemaResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReflectSchemaResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectSchemaResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ReadAt != nil {
+ size, err := m.ReadAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Caveats) > 0 {
+ for iNdEx := len(m.Caveats) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Caveats[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.Definitions) > 0 {
+ for iNdEx := len(m.Definitions) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Definitions[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReflectionSchemaFilter) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReflectionSchemaFilter) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.OptionalPermissionNameFilter) > 0 {
+ i -= len(m.OptionalPermissionNameFilter)
+ copy(dAtA[i:], m.OptionalPermissionNameFilter)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalPermissionNameFilter)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.OptionalRelationNameFilter) > 0 {
+ i -= len(m.OptionalRelationNameFilter)
+ copy(dAtA[i:], m.OptionalRelationNameFilter)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalRelationNameFilter)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.OptionalCaveatNameFilter) > 0 {
+ i -= len(m.OptionalCaveatNameFilter)
+ copy(dAtA[i:], m.OptionalCaveatNameFilter)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalCaveatNameFilter)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.OptionalDefinitionNameFilter) > 0 {
+ i -= len(m.OptionalDefinitionNameFilter)
+ copy(dAtA[i:], m.OptionalDefinitionNameFilter)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalDefinitionNameFilter)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReflectionDefinition) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReflectionDefinition) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Permissions) > 0 {
+ for iNdEx := len(m.Permissions) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Permissions[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ }
+ if len(m.Relations) > 0 {
+ for iNdEx := len(m.Relations) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Relations[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if len(m.Comment) > 0 {
+ i -= len(m.Comment)
+ copy(dAtA[i:], m.Comment)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Comment)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReflectionCaveat) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReflectionCaveat) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionCaveat) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Expression) > 0 {
+ i -= len(m.Expression)
+ copy(dAtA[i:], m.Expression)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Expression)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.Parameters) > 0 {
+ for iNdEx := len(m.Parameters) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Parameters[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if len(m.Comment) > 0 {
+ i -= len(m.Comment)
+ copy(dAtA[i:], m.Comment)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Comment)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReflectionCaveatParameter) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReflectionCaveatParameter) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionCaveatParameter) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.ParentCaveatName) > 0 {
+ i -= len(m.ParentCaveatName)
+ copy(dAtA[i:], m.ParentCaveatName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParentCaveatName)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Type) > 0 {
+ i -= len(m.Type)
+ copy(dAtA[i:], m.Type)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReflectionRelation) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReflectionRelation) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionRelation) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.SubjectTypes) > 0 {
+ for iNdEx := len(m.SubjectTypes) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.SubjectTypes[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ }
+ if len(m.ParentDefinitionName) > 0 {
+ i -= len(m.ParentDefinitionName)
+ copy(dAtA[i:], m.ParentDefinitionName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParentDefinitionName)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Comment) > 0 {
+ i -= len(m.Comment)
+ copy(dAtA[i:], m.Comment)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Comment)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReflectionTypeReference) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReflectionTypeReference) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionTypeReference) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if vtmsg, ok := m.Typeref.(interface {
+ MarshalToSizedBufferVT([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if len(m.OptionalCaveatName) > 0 {
+ i -= len(m.OptionalCaveatName)
+ copy(dAtA[i:], m.OptionalCaveatName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalCaveatName)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.SubjectDefinitionName) > 0 {
+ i -= len(m.SubjectDefinitionName)
+ copy(dAtA[i:], m.SubjectDefinitionName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SubjectDefinitionName)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReflectionTypeReference_IsTerminalSubject) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionTypeReference_IsTerminalSubject) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i--
+ if m.IsTerminalSubject {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x18
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionTypeReference_OptionalRelationName) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionTypeReference_OptionalRelationName) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i -= len(m.OptionalRelationName)
+ copy(dAtA[i:], m.OptionalRelationName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalRelationName)))
+ i--
+ dAtA[i] = 0x22
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionTypeReference_IsPublicWildcard) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionTypeReference_IsPublicWildcard) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i--
+ if m.IsPublicWildcard {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x28
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionPermission) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReflectionPermission) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionPermission) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.ParentDefinitionName) > 0 {
+ i -= len(m.ParentDefinitionName)
+ copy(dAtA[i:], m.ParentDefinitionName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ParentDefinitionName)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Comment) > 0 {
+ i -= len(m.Comment)
+ copy(dAtA[i:], m.Comment)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Comment)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ComputablePermissionsRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ComputablePermissionsRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ComputablePermissionsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.OptionalDefinitionNameFilter) > 0 {
+ i -= len(m.OptionalDefinitionNameFilter)
+ copy(dAtA[i:], m.OptionalDefinitionNameFilter)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalDefinitionNameFilter)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.RelationName) > 0 {
+ i -= len(m.RelationName)
+ copy(dAtA[i:], m.RelationName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RelationName)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.DefinitionName) > 0 {
+ i -= len(m.DefinitionName)
+ copy(dAtA[i:], m.DefinitionName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DefinitionName)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReflectionRelationReference) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReflectionRelationReference) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionRelationReference) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.IsPermission {
+ i--
+ if m.IsPermission {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x18
+ }
+ if len(m.RelationName) > 0 {
+ i -= len(m.RelationName)
+ copy(dAtA[i:], m.RelationName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RelationName)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.DefinitionName) > 0 {
+ i -= len(m.DefinitionName)
+ copy(dAtA[i:], m.DefinitionName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DefinitionName)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ComputablePermissionsResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ComputablePermissionsResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ComputablePermissionsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ReadAt != nil {
+ size, err := m.ReadAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Permissions) > 0 {
+ for iNdEx := len(m.Permissions) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Permissions[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DependentRelationsRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DependentRelationsRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *DependentRelationsRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.PermissionName) > 0 {
+ i -= len(m.PermissionName)
+ copy(dAtA[i:], m.PermissionName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PermissionName)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.DefinitionName) > 0 {
+ i -= len(m.DefinitionName)
+ copy(dAtA[i:], m.DefinitionName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DefinitionName)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DependentRelationsResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DependentRelationsResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *DependentRelationsResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ReadAt != nil {
+ size, err := m.ReadAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Relations) > 0 {
+ for iNdEx := len(m.Relations) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Relations[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DiffSchemaRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DiffSchemaRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *DiffSchemaRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.ComparisonSchema) > 0 {
+ i -= len(m.ComparisonSchema)
+ copy(dAtA[i:], m.ComparisonSchema)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ComparisonSchema)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Consistency != nil {
+ size, err := m.Consistency.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DiffSchemaResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DiffSchemaResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *DiffSchemaResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ReadAt != nil {
+ size, err := m.ReadAt.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Diffs) > 0 {
+ for iNdEx := len(m.Diffs) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Diffs[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReflectionRelationSubjectTypeChange) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReflectionRelationSubjectTypeChange) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionRelationSubjectTypeChange) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ChangedSubjectType != nil {
+ size, err := m.ChangedSubjectType.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Relation != nil {
+ size, err := m.Relation.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReflectionCaveatParameterTypeChange) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReflectionCaveatParameterTypeChange) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionCaveatParameterTypeChange) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.PreviousType) > 0 {
+ i -= len(m.PreviousType)
+ copy(dAtA[i:], m.PreviousType)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PreviousType)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Parameter != nil {
+ size, err := m.Parameter.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReflectionSchemaDiff) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ReflectionSchemaDiff) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if vtmsg, ok := m.Diff.(interface {
+ MarshalToSizedBufferVT([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ReflectionSchemaDiff_DefinitionAdded) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_DefinitionAdded) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.DefinitionAdded != nil {
+ size, err := m.DefinitionAdded.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_DefinitionRemoved) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_DefinitionRemoved) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.DefinitionRemoved != nil {
+ size, err := m.DefinitionRemoved.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_DefinitionDocCommentChanged) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_DefinitionDocCommentChanged) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.DefinitionDocCommentChanged != nil {
+ size, err := m.DefinitionDocCommentChanged.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_RelationAdded) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_RelationAdded) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.RelationAdded != nil {
+ size, err := m.RelationAdded.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x22
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_RelationRemoved) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_RelationRemoved) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.RelationRemoved != nil {
+ size, err := m.RelationRemoved.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x2a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_RelationDocCommentChanged) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_RelationDocCommentChanged) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.RelationDocCommentChanged != nil {
+ size, err := m.RelationDocCommentChanged.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x32
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x32
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_RelationSubjectTypeAdded) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_RelationSubjectTypeAdded) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.RelationSubjectTypeAdded != nil {
+ size, err := m.RelationSubjectTypeAdded.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x3a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x3a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_RelationSubjectTypeRemoved) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_RelationSubjectTypeRemoved) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.RelationSubjectTypeRemoved != nil {
+ size, err := m.RelationSubjectTypeRemoved.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x42
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x42
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_PermissionAdded) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_PermissionAdded) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.PermissionAdded != nil {
+ size, err := m.PermissionAdded.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x4a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x4a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_PermissionRemoved) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_PermissionRemoved) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.PermissionRemoved != nil {
+ size, err := m.PermissionRemoved.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x52
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x52
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_PermissionDocCommentChanged) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_PermissionDocCommentChanged) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.PermissionDocCommentChanged != nil {
+ size, err := m.PermissionDocCommentChanged.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x5a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x5a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_PermissionExprChanged) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_PermissionExprChanged) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.PermissionExprChanged != nil {
+ size, err := m.PermissionExprChanged.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x62
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x62
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_CaveatAdded) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_CaveatAdded) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.CaveatAdded != nil {
+ size, err := m.CaveatAdded.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x6a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x6a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_CaveatRemoved) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_CaveatRemoved) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.CaveatRemoved != nil {
+ size, err := m.CaveatRemoved.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x72
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x72
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_CaveatDocCommentChanged) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_CaveatDocCommentChanged) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.CaveatDocCommentChanged != nil {
+ size, err := m.CaveatDocCommentChanged.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x7a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x7a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_CaveatExprChanged) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_CaveatExprChanged) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.CaveatExprChanged != nil {
+ size, err := m.CaveatExprChanged.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x82
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x82
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_CaveatParameterAdded) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_CaveatParameterAdded) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.CaveatParameterAdded != nil {
+ size, err := m.CaveatParameterAdded.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x8a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x8a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_CaveatParameterRemoved) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_CaveatParameterRemoved) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.CaveatParameterRemoved != nil {
+ size, err := m.CaveatParameterRemoved.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x92
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x92
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReflectionSchemaDiff_CaveatParameterTypeChanged) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *ReflectionSchemaDiff_CaveatParameterTypeChanged) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.CaveatParameterTypeChanged != nil {
+ size, err := m.CaveatParameterTypeChanged.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x9a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x9a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ReadSchemaRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReadSchemaResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.SchemaText)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ReadAt != nil {
+ l = m.ReadAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *WriteSchemaRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Schema)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *WriteSchemaResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.WrittenAt != nil {
+ l = m.WrittenAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReflectSchemaRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.OptionalFilters) > 0 {
+ for _, e := range m.OptionalFilters {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReflectSchemaResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Definitions) > 0 {
+ for _, e := range m.Definitions {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if len(m.Caveats) > 0 {
+ for _, e := range m.Caveats {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.ReadAt != nil {
+ l = m.ReadAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReflectionSchemaFilter) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.OptionalDefinitionNameFilter)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.OptionalCaveatNameFilter)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.OptionalRelationNameFilter)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.OptionalPermissionNameFilter)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReflectionDefinition) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Comment)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.Relations) > 0 {
+ for _, e := range m.Relations {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if len(m.Permissions) > 0 {
+ for _, e := range m.Permissions {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReflectionCaveat) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Comment)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.Parameters) > 0 {
+ for _, e := range m.Parameters {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ l = len(m.Expression)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReflectionCaveatParameter) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Type)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.ParentCaveatName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReflectionRelation) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Comment)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.ParentDefinitionName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.SubjectTypes) > 0 {
+ for _, e := range m.SubjectTypes {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReflectionTypeReference) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.SubjectDefinitionName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.OptionalCaveatName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if vtmsg, ok := m.Typeref.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReflectionTypeReference_IsTerminalSubject) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += 2
+ return n
+}
+func (m *ReflectionTypeReference_OptionalRelationName) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.OptionalRelationName)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ return n
+}
+func (m *ReflectionTypeReference_IsPublicWildcard) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += 2
+ return n
+}
+func (m *ReflectionPermission) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Comment)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.ParentDefinitionName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ComputablePermissionsRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.DefinitionName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.RelationName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.OptionalDefinitionNameFilter)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReflectionRelationReference) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.DefinitionName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.RelationName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.IsPermission {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ComputablePermissionsResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Permissions) > 0 {
+ for _, e := range m.Permissions {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.ReadAt != nil {
+ l = m.ReadAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DependentRelationsRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.DefinitionName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.PermissionName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DependentRelationsResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Relations) > 0 {
+ for _, e := range m.Relations {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.ReadAt != nil {
+ l = m.ReadAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DiffSchemaRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Consistency != nil {
+ l = m.Consistency.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.ComparisonSchema)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DiffSchemaResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Diffs) > 0 {
+ for _, e := range m.Diffs {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.ReadAt != nil {
+ l = m.ReadAt.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReflectionRelationSubjectTypeChange) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Relation != nil {
+ l = m.Relation.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ChangedSubjectType != nil {
+ l = m.ChangedSubjectType.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReflectionCaveatParameterTypeChange) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Parameter != nil {
+ l = m.Parameter.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.PreviousType)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReflectionSchemaDiff) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.Diff.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ReflectionSchemaDiff_DefinitionAdded) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.DefinitionAdded != nil {
+ l = m.DefinitionAdded.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_DefinitionRemoved) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.DefinitionRemoved != nil {
+ l = m.DefinitionRemoved.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_DefinitionDocCommentChanged) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.DefinitionDocCommentChanged != nil {
+ l = m.DefinitionDocCommentChanged.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_RelationAdded) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RelationAdded != nil {
+ l = m.RelationAdded.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_RelationRemoved) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RelationRemoved != nil {
+ l = m.RelationRemoved.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_RelationDocCommentChanged) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RelationDocCommentChanged != nil {
+ l = m.RelationDocCommentChanged.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_RelationSubjectTypeAdded) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RelationSubjectTypeAdded != nil {
+ l = m.RelationSubjectTypeAdded.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_RelationSubjectTypeRemoved) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RelationSubjectTypeRemoved != nil {
+ l = m.RelationSubjectTypeRemoved.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_PermissionAdded) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.PermissionAdded != nil {
+ l = m.PermissionAdded.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_PermissionRemoved) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.PermissionRemoved != nil {
+ l = m.PermissionRemoved.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_PermissionDocCommentChanged) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.PermissionDocCommentChanged != nil {
+ l = m.PermissionDocCommentChanged.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_PermissionExprChanged) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.PermissionExprChanged != nil {
+ l = m.PermissionExprChanged.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_CaveatAdded) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CaveatAdded != nil {
+ l = m.CaveatAdded.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_CaveatRemoved) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CaveatRemoved != nil {
+ l = m.CaveatRemoved.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_CaveatDocCommentChanged) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CaveatDocCommentChanged != nil {
+ l = m.CaveatDocCommentChanged.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_CaveatExprChanged) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CaveatExprChanged != nil {
+ l = m.CaveatExprChanged.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_CaveatParameterAdded) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CaveatParameterAdded != nil {
+ l = m.CaveatParameterAdded.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_CaveatParameterRemoved) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CaveatParameterRemoved != nil {
+ l = m.CaveatParameterRemoved.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReflectionSchemaDiff_CaveatParameterTypeChanged) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CaveatParameterTypeChanged != nil {
+ l = m.CaveatParameterTypeChanged.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *ReadSchemaRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReadSchemaRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReadSchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReadSchemaResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReadSchemaResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReadSchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SchemaText", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SchemaText = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ReadAt == nil {
+ m.ReadAt = &ZedToken{}
+ }
+ if err := m.ReadAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *WriteSchemaRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: WriteSchemaRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: WriteSchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Schema = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *WriteSchemaResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: WriteSchemaResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: WriteSchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field WrittenAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.WrittenAt == nil {
+ m.WrittenAt = &ZedToken{}
+ }
+ if err := m.WrittenAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReflectSchemaRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReflectSchemaRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReflectSchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalFilters", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalFilters = append(m.OptionalFilters, &ReflectionSchemaFilter{})
+ if err := m.OptionalFilters[len(m.OptionalFilters)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReflectSchemaResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReflectSchemaResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReflectSchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Definitions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Definitions = append(m.Definitions, &ReflectionDefinition{})
+ if err := m.Definitions[len(m.Definitions)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Caveats", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Caveats = append(m.Caveats, &ReflectionCaveat{})
+ if err := m.Caveats[len(m.Caveats)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ReadAt == nil {
+ m.ReadAt = &ZedToken{}
+ }
+ if err := m.ReadAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReflectionSchemaFilter) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReflectionSchemaFilter: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReflectionSchemaFilter: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalDefinitionNameFilter", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalDefinitionNameFilter = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalCaveatNameFilter", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalCaveatNameFilter = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalRelationNameFilter", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalRelationNameFilter = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalPermissionNameFilter", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalPermissionNameFilter = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReflectionDefinition) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReflectionDefinition: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReflectionDefinition: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Comment = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Relations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Relations = append(m.Relations, &ReflectionRelation{})
+ if err := m.Relations[len(m.Relations)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Permissions = append(m.Permissions, &ReflectionPermission{})
+ if err := m.Permissions[len(m.Permissions)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReflectionCaveat) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReflectionCaveat: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReflectionCaveat: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Comment = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Parameters = append(m.Parameters, &ReflectionCaveatParameter{})
+ if err := m.Parameters[len(m.Parameters)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Expression = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReflectionCaveatParameter) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReflectionCaveatParameter: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReflectionCaveatParameter: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Type = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ParentCaveatName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ParentCaveatName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReflectionRelation) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReflectionRelation: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReflectionRelation: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Comment = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ParentDefinitionName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ParentDefinitionName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SubjectTypes", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SubjectTypes = append(m.SubjectTypes, &ReflectionTypeReference{})
+ if err := m.SubjectTypes[len(m.SubjectTypes)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReflectionTypeReference) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReflectionTypeReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReflectionTypeReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SubjectDefinitionName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SubjectDefinitionName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalCaveatName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalCaveatName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IsTerminalSubject", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Typeref = &ReflectionTypeReference_IsTerminalSubject{IsTerminalSubject: b}
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalRelationName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Typeref = &ReflectionTypeReference_OptionalRelationName{OptionalRelationName: string(dAtA[iNdEx:postIndex])}
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IsPublicWildcard", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.Typeref = &ReflectionTypeReference_IsPublicWildcard{IsPublicWildcard: b}
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReflectionPermission) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReflectionPermission: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReflectionPermission: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Comment = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ParentDefinitionName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ParentDefinitionName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ComputablePermissionsRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ComputablePermissionsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ComputablePermissionsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefinitionName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DefinitionName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RelationName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalDefinitionNameFilter", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalDefinitionNameFilter = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReflectionRelationReference) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReflectionRelationReference: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReflectionRelationReference: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefinitionName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DefinitionName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RelationName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IsPermission", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.IsPermission = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ComputablePermissionsResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ComputablePermissionsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ComputablePermissionsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Permissions = append(m.Permissions, &ReflectionRelationReference{})
+ if err := m.Permissions[len(m.Permissions)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ReadAt == nil {
+ m.ReadAt = &ZedToken{}
+ }
+ if err := m.ReadAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DependentRelationsRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DependentRelationsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DependentRelationsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefinitionName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DefinitionName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PermissionName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PermissionName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DependentRelationsResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DependentRelationsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DependentRelationsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Relations", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Relations = append(m.Relations, &ReflectionRelationReference{})
+ if err := m.Relations[len(m.Relations)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ReadAt == nil {
+ m.ReadAt = &ZedToken{}
+ }
+ if err := m.ReadAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DiffSchemaRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DiffSchemaRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DiffSchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Consistency == nil {
+ m.Consistency = &Consistency{}
+ }
+ if err := m.Consistency.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ComparisonSchema", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ComparisonSchema = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *DiffSchemaResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: DiffSchemaResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: DiffSchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Diffs", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Diffs = append(m.Diffs, &ReflectionSchemaDiff{})
+ if err := m.Diffs[len(m.Diffs)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ReadAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ReadAt == nil {
+ m.ReadAt = &ZedToken{}
+ }
+ if err := m.ReadAt.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReflectionRelationSubjectTypeChange) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReflectionRelationSubjectTypeChange: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReflectionRelationSubjectTypeChange: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Relation == nil {
+ m.Relation = &ReflectionRelation{}
+ }
+ if err := m.Relation.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ChangedSubjectType", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ChangedSubjectType == nil {
+ m.ChangedSubjectType = &ReflectionTypeReference{}
+ }
+ if err := m.ChangedSubjectType.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReflectionCaveatParameterTypeChange) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReflectionCaveatParameterTypeChange: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReflectionCaveatParameterTypeChange: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Parameter", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Parameter == nil {
+ m.Parameter = &ReflectionCaveatParameter{}
+ }
+ if err := m.Parameter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PreviousType", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PreviousType = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *ReflectionSchemaDiff) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: ReflectionSchemaDiff: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: ReflectionSchemaDiff: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefinitionAdded", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_DefinitionAdded); ok {
+ if err := oneof.DefinitionAdded.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionDefinition{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_DefinitionAdded{DefinitionAdded: v}
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefinitionRemoved", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_DefinitionRemoved); ok {
+ if err := oneof.DefinitionRemoved.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionDefinition{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_DefinitionRemoved{DefinitionRemoved: v}
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefinitionDocCommentChanged", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_DefinitionDocCommentChanged); ok {
+ if err := oneof.DefinitionDocCommentChanged.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionDefinition{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_DefinitionDocCommentChanged{DefinitionDocCommentChanged: v}
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationAdded", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_RelationAdded); ok {
+ if err := oneof.RelationAdded.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionRelation{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_RelationAdded{RelationAdded: v}
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationRemoved", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_RelationRemoved); ok {
+ if err := oneof.RelationRemoved.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionRelation{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_RelationRemoved{RelationRemoved: v}
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationDocCommentChanged", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_RelationDocCommentChanged); ok {
+ if err := oneof.RelationDocCommentChanged.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionRelation{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_RelationDocCommentChanged{RelationDocCommentChanged: v}
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationSubjectTypeAdded", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_RelationSubjectTypeAdded); ok {
+ if err := oneof.RelationSubjectTypeAdded.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionRelationSubjectTypeChange{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_RelationSubjectTypeAdded{RelationSubjectTypeAdded: v}
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RelationSubjectTypeRemoved", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_RelationSubjectTypeRemoved); ok {
+ if err := oneof.RelationSubjectTypeRemoved.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionRelationSubjectTypeChange{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_RelationSubjectTypeRemoved{RelationSubjectTypeRemoved: v}
+ }
+ iNdEx = postIndex
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PermissionAdded", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_PermissionAdded); ok {
+ if err := oneof.PermissionAdded.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionPermission{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_PermissionAdded{PermissionAdded: v}
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PermissionRemoved", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_PermissionRemoved); ok {
+ if err := oneof.PermissionRemoved.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionPermission{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_PermissionRemoved{PermissionRemoved: v}
+ }
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PermissionDocCommentChanged", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_PermissionDocCommentChanged); ok {
+ if err := oneof.PermissionDocCommentChanged.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionPermission{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_PermissionDocCommentChanged{PermissionDocCommentChanged: v}
+ }
+ iNdEx = postIndex
+ case 12:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PermissionExprChanged", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_PermissionExprChanged); ok {
+ if err := oneof.PermissionExprChanged.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionPermission{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_PermissionExprChanged{PermissionExprChanged: v}
+ }
+ iNdEx = postIndex
+ case 13:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatAdded", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_CaveatAdded); ok {
+ if err := oneof.CaveatAdded.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionCaveat{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_CaveatAdded{CaveatAdded: v}
+ }
+ iNdEx = postIndex
+ case 14:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatRemoved", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_CaveatRemoved); ok {
+ if err := oneof.CaveatRemoved.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionCaveat{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_CaveatRemoved{CaveatRemoved: v}
+ }
+ iNdEx = postIndex
+ case 15:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatDocCommentChanged", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_CaveatDocCommentChanged); ok {
+ if err := oneof.CaveatDocCommentChanged.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionCaveat{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_CaveatDocCommentChanged{CaveatDocCommentChanged: v}
+ }
+ iNdEx = postIndex
+ case 16:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatExprChanged", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_CaveatExprChanged); ok {
+ if err := oneof.CaveatExprChanged.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionCaveat{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_CaveatExprChanged{CaveatExprChanged: v}
+ }
+ iNdEx = postIndex
+ case 17:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatParameterAdded", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_CaveatParameterAdded); ok {
+ if err := oneof.CaveatParameterAdded.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionCaveatParameter{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_CaveatParameterAdded{CaveatParameterAdded: v}
+ }
+ iNdEx = postIndex
+ case 18:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatParameterRemoved", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_CaveatParameterRemoved); ok {
+ if err := oneof.CaveatParameterRemoved.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionCaveatParameter{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_CaveatParameterRemoved{CaveatParameterRemoved: v}
+ }
+ iNdEx = postIndex
+ case 19:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CaveatParameterTypeChanged", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if oneof, ok := m.Diff.(*ReflectionSchemaDiff_CaveatParameterTypeChanged); ok {
+ if err := oneof.CaveatParameterTypeChanged.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ } else {
+ v := &ReflectionCaveatParameterTypeChange{}
+ if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ m.Diff = &ReflectionSchemaDiff_CaveatParameterTypeChanged{CaveatParameterTypeChanged: v}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service.pb.go
new file mode 100644
index 0000000..3c876c7
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service.pb.go
@@ -0,0 +1,347 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.36.6
+// protoc (unknown)
+// source: authzed/api/v1/watch_service.proto
+
+package v1
+
+import (
+ _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ _ "google.golang.org/genproto/googleapis/api/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ reflect "reflect"
+ sync "sync"
+ unsafe "unsafe"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type WatchKind int32
+
+const (
+ WatchKind_WATCH_KIND_UNSPECIFIED WatchKind = 0 // Default, just relationship updates (for backwards compatibility)
+ WatchKind_WATCH_KIND_INCLUDE_RELATIONSHIP_UPDATES WatchKind = 1
+ WatchKind_WATCH_KIND_INCLUDE_SCHEMA_UPDATES WatchKind = 2
+ WatchKind_WATCH_KIND_INCLUDE_CHECKPOINTS WatchKind = 3
+)
+
+// Enum value maps for WatchKind.
+var (
+ WatchKind_name = map[int32]string{
+ 0: "WATCH_KIND_UNSPECIFIED",
+ 1: "WATCH_KIND_INCLUDE_RELATIONSHIP_UPDATES",
+ 2: "WATCH_KIND_INCLUDE_SCHEMA_UPDATES",
+ 3: "WATCH_KIND_INCLUDE_CHECKPOINTS",
+ }
+ WatchKind_value = map[string]int32{
+ "WATCH_KIND_UNSPECIFIED": 0,
+ "WATCH_KIND_INCLUDE_RELATIONSHIP_UPDATES": 1,
+ "WATCH_KIND_INCLUDE_SCHEMA_UPDATES": 2,
+ "WATCH_KIND_INCLUDE_CHECKPOINTS": 3,
+ }
+)
+
+func (x WatchKind) Enum() *WatchKind {
+ p := new(WatchKind)
+ *p = x
+ return p
+}
+
+func (x WatchKind) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (WatchKind) Descriptor() protoreflect.EnumDescriptor {
+ return file_authzed_api_v1_watch_service_proto_enumTypes[0].Descriptor()
+}
+
+func (WatchKind) Type() protoreflect.EnumType {
+ return &file_authzed_api_v1_watch_service_proto_enumTypes[0]
+}
+
+func (x WatchKind) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use WatchKind.Descriptor instead.
+func (WatchKind) EnumDescriptor() ([]byte, []int) {
+ return file_authzed_api_v1_watch_service_proto_rawDescGZIP(), []int{0}
+}
+
+// WatchRequest specifies what mutations to watch for, and an optional start snapshot for when to start
+// watching.
+type WatchRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // optional_object_types is a filter of resource object types to watch for relationship changes.
+ // If specified, only changes to the specified object types will be returned and
+ // optional_relationship_filters cannot be used.
+ OptionalObjectTypes []string `protobuf:"bytes,1,rep,name=optional_object_types,json=optionalObjectTypes,proto3" json:"optional_object_types,omitempty"`
+ // optional_start_cursor is the ZedToken holding the point-in-time at
+ // which to start watching for changes.
+ // If not specified, the watch will begin at the current head revision
+ // of the datastore, returning any updates that occur after the caller
+ // makes the request.
+ // Note that if this cursor references a point-in-time containing data
+ // that has been garbage collected, an error will be returned.
+ OptionalStartCursor *ZedToken `protobuf:"bytes,2,opt,name=optional_start_cursor,json=optionalStartCursor,proto3" json:"optional_start_cursor,omitempty"`
+ // optional_relationship_filters, if specified, indicates the
+ // filter(s) to apply to each relationship to be returned by watch.
+ // The relationship will be returned as long as at least one filter matches,
+ // this allows clients to match relationships on multiple filters on a single watch call.
+ // If specified, optional_object_types cannot be used.
+ OptionalRelationshipFilters []*RelationshipFilter `protobuf:"bytes,3,rep,name=optional_relationship_filters,json=optionalRelationshipFilters,proto3" json:"optional_relationship_filters,omitempty"`
+ // optional_update_kinds, if specified, indicates what kinds of mutations to include.
+ OptionalUpdateKinds []WatchKind `protobuf:"varint,4,rep,packed,name=optional_update_kinds,json=optionalUpdateKinds,proto3,enum=authzed.api.v1.WatchKind" json:"optional_update_kinds,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WatchRequest) Reset() {
+ *x = WatchRequest{}
+ mi := &file_authzed_api_v1_watch_service_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WatchRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WatchRequest) ProtoMessage() {}
+
+func (x *WatchRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_watch_service_proto_msgTypes[0]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WatchRequest.ProtoReflect.Descriptor instead.
+func (*WatchRequest) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_watch_service_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *WatchRequest) GetOptionalObjectTypes() []string {
+ if x != nil {
+ return x.OptionalObjectTypes
+ }
+ return nil
+}
+
+func (x *WatchRequest) GetOptionalStartCursor() *ZedToken {
+ if x != nil {
+ return x.OptionalStartCursor
+ }
+ return nil
+}
+
+func (x *WatchRequest) GetOptionalRelationshipFilters() []*RelationshipFilter {
+ if x != nil {
+ return x.OptionalRelationshipFilters
+ }
+ return nil
+}
+
+func (x *WatchRequest) GetOptionalUpdateKinds() []WatchKind {
+ if x != nil {
+ return x.OptionalUpdateKinds
+ }
+ return nil
+}
+
+// WatchResponse contains all mutation events in ascending timestamp order,
+// from the requested start snapshot to a snapshot
+// encoded in the watch response. The client can use the snapshot to resume
+// watching where the previous watch response left off.
+type WatchResponse struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // updates are the RelationshipUpdate events that have occurred since the
+ // last watch response.
+ Updates []*RelationshipUpdate `protobuf:"bytes,1,rep,name=updates,proto3" json:"updates,omitempty"`
+ // changes_through is the ZedToken that represents the point in time
+ // that the watch response is current through. This token can be used
+ // in a subsequent WatchRequest to resume watching from this point.
+ ChangesThrough *ZedToken `protobuf:"bytes,2,opt,name=changes_through,json=changesThrough,proto3" json:"changes_through,omitempty"`
+ // optional_transaction_metadata is an optional field that returns the transaction metadata
+ // given to SpiceDB during the transaction that produced the changes in this response.
+ // This field may not exist if no transaction metadata was provided.
+ OptionalTransactionMetadata *structpb.Struct `protobuf:"bytes,3,opt,name=optional_transaction_metadata,json=optionalTransactionMetadata,proto3" json:"optional_transaction_metadata,omitempty"`
+ // schema_updated, if true, indicates that the schema was changed in this revision.
+ SchemaUpdated bool `protobuf:"varint,4,opt,name=schema_updated,json=schemaUpdated,proto3" json:"schema_updated,omitempty"`
+ // is_checkpoint, if true, indicates that a checkpoint was reached.
+ // A checkpoint indicates that the server guarantees that the client
+ // will not observe any changes at a revision below or equal to the revision in this response.
+ IsCheckpoint bool `protobuf:"varint,5,opt,name=is_checkpoint,json=isCheckpoint,proto3" json:"is_checkpoint,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *WatchResponse) Reset() {
+ *x = WatchResponse{}
+ mi := &file_authzed_api_v1_watch_service_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *WatchResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WatchResponse) ProtoMessage() {}
+
+func (x *WatchResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_authzed_api_v1_watch_service_proto_msgTypes[1]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WatchResponse.ProtoReflect.Descriptor instead.
+func (*WatchResponse) Descriptor() ([]byte, []int) {
+ return file_authzed_api_v1_watch_service_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *WatchResponse) GetUpdates() []*RelationshipUpdate {
+ if x != nil {
+ return x.Updates
+ }
+ return nil
+}
+
+func (x *WatchResponse) GetChangesThrough() *ZedToken {
+ if x != nil {
+ return x.ChangesThrough
+ }
+ return nil
+}
+
+func (x *WatchResponse) GetOptionalTransactionMetadata() *structpb.Struct {
+ if x != nil {
+ return x.OptionalTransactionMetadata
+ }
+ return nil
+}
+
+func (x *WatchResponse) GetSchemaUpdated() bool {
+ if x != nil {
+ return x.SchemaUpdated
+ }
+ return false
+}
+
+func (x *WatchResponse) GetIsCheckpoint() bool {
+ if x != nil {
+ return x.IsCheckpoint
+ }
+ return false
+}
+
+var File_authzed_api_v1_watch_service_proto protoreflect.FileDescriptor
+
+const file_authzed_api_v1_watch_service_proto_rawDesc = "" +
+ "\n" +
+ "\"authzed/api/v1/watch_service.proto\x12\x0eauthzed.api.v1\x1a\x19authzed/api/v1/core.proto\x1a'authzed/api/v1/permission_service.proto\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17validate/validate.proto\"\xe9\x03\n" +
+ "\fWatchRequest\x12\xd3\x01\n" +
+ "\x15optional_object_types\x18\x01 \x03(\tB\x9e\x01\xfaBL\x92\x01I\b\x00\"ErC(\x80\x012>^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\xbaHL\x92\x01I\b\x00\"ErC(\x80\x012>^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x13optionalObjectTypes\x12L\n" +
+ "\x15optional_start_cursor\x18\x02 \x01(\v2\x18.authzed.api.v1.ZedTokenR\x13optionalStartCursor\x12f\n" +
+ "\x1doptional_relationship_filters\x18\x03 \x03(\v2\".authzed.api.v1.RelationshipFilterR\x1boptionalRelationshipFilters\x12M\n" +
+ "\x15optional_update_kinds\x18\x04 \x03(\x0e2\x19.authzed.api.v1.WatchKindR\x13optionalUpdateKinds\"\xb9\x02\n" +
+ "\rWatchResponse\x12<\n" +
+ "\aupdates\x18\x01 \x03(\v2\".authzed.api.v1.RelationshipUpdateR\aupdates\x12A\n" +
+ "\x0fchanges_through\x18\x02 \x01(\v2\x18.authzed.api.v1.ZedTokenR\x0echangesThrough\x12[\n" +
+ "\x1doptional_transaction_metadata\x18\x03 \x01(\v2\x17.google.protobuf.StructR\x1boptionalTransactionMetadata\x12%\n" +
+ "\x0eschema_updated\x18\x04 \x01(\bR\rschemaUpdated\x12#\n" +
+ "\ris_checkpoint\x18\x05 \x01(\bR\fisCheckpoint*\x9f\x01\n" +
+ "\tWatchKind\x12\x1a\n" +
+ "\x16WATCH_KIND_UNSPECIFIED\x10\x00\x12+\n" +
+ "'WATCH_KIND_INCLUDE_RELATIONSHIP_UPDATES\x10\x01\x12%\n" +
+ "!WATCH_KIND_INCLUDE_SCHEMA_UPDATES\x10\x02\x12\"\n" +
+ "\x1eWATCH_KIND_INCLUDE_CHECKPOINTS\x10\x032l\n" +
+ "\fWatchService\x12\\\n" +
+ "\x05Watch\x12\x1c.authzed.api.v1.WatchRequest\x1a\x1d.authzed.api.v1.WatchResponse\"\x14\x82\xd3\xe4\x93\x02\x0e:\x01*\"\t/v1/watch0\x01BJ\n" +
+ "\x12com.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
+
+var (
+ file_authzed_api_v1_watch_service_proto_rawDescOnce sync.Once
+ file_authzed_api_v1_watch_service_proto_rawDescData []byte
+)
+
+func file_authzed_api_v1_watch_service_proto_rawDescGZIP() []byte {
+ file_authzed_api_v1_watch_service_proto_rawDescOnce.Do(func() {
+ file_authzed_api_v1_watch_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_authzed_api_v1_watch_service_proto_rawDesc), len(file_authzed_api_v1_watch_service_proto_rawDesc)))
+ })
+ return file_authzed_api_v1_watch_service_proto_rawDescData
+}
+
+var file_authzed_api_v1_watch_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_authzed_api_v1_watch_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_authzed_api_v1_watch_service_proto_goTypes = []any{
+ (WatchKind)(0), // 0: authzed.api.v1.WatchKind
+ (*WatchRequest)(nil), // 1: authzed.api.v1.WatchRequest
+ (*WatchResponse)(nil), // 2: authzed.api.v1.WatchResponse
+ (*ZedToken)(nil), // 3: authzed.api.v1.ZedToken
+ (*RelationshipFilter)(nil), // 4: authzed.api.v1.RelationshipFilter
+ (*RelationshipUpdate)(nil), // 5: authzed.api.v1.RelationshipUpdate
+ (*structpb.Struct)(nil), // 6: google.protobuf.Struct
+}
+var file_authzed_api_v1_watch_service_proto_depIdxs = []int32{
+ 3, // 0: authzed.api.v1.WatchRequest.optional_start_cursor:type_name -> authzed.api.v1.ZedToken
+ 4, // 1: authzed.api.v1.WatchRequest.optional_relationship_filters:type_name -> authzed.api.v1.RelationshipFilter
+ 0, // 2: authzed.api.v1.WatchRequest.optional_update_kinds:type_name -> authzed.api.v1.WatchKind
+ 5, // 3: authzed.api.v1.WatchResponse.updates:type_name -> authzed.api.v1.RelationshipUpdate
+ 3, // 4: authzed.api.v1.WatchResponse.changes_through:type_name -> authzed.api.v1.ZedToken
+ 6, // 5: authzed.api.v1.WatchResponse.optional_transaction_metadata:type_name -> google.protobuf.Struct
+ 1, // 6: authzed.api.v1.WatchService.Watch:input_type -> authzed.api.v1.WatchRequest
+ 2, // 7: authzed.api.v1.WatchService.Watch:output_type -> authzed.api.v1.WatchResponse
+ 7, // [7:8] is the sub-list for method output_type
+ 6, // [6:7] is the sub-list for method input_type
+ 6, // [6:6] is the sub-list for extension type_name
+ 6, // [6:6] is the sub-list for extension extendee
+ 0, // [0:6] is the sub-list for field type_name
+}
+
+func init() { file_authzed_api_v1_watch_service_proto_init() }
+func file_authzed_api_v1_watch_service_proto_init() {
+ if File_authzed_api_v1_watch_service_proto != nil {
+ return
+ }
+ file_authzed_api_v1_core_proto_init()
+ file_authzed_api_v1_permission_service_proto_init()
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: unsafe.Slice(unsafe.StringData(file_authzed_api_v1_watch_service_proto_rawDesc), len(file_authzed_api_v1_watch_service_proto_rawDesc)),
+ NumEnums: 1,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_authzed_api_v1_watch_service_proto_goTypes,
+ DependencyIndexes: file_authzed_api_v1_watch_service_proto_depIdxs,
+ EnumInfos: file_authzed_api_v1_watch_service_proto_enumTypes,
+ MessageInfos: file_authzed_api_v1_watch_service_proto_msgTypes,
+ }.Build()
+ File_authzed_api_v1_watch_service_proto = out.File
+ file_authzed_api_v1_watch_service_proto_goTypes = nil
+ file_authzed_api_v1_watch_service_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service.pb.gw.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service.pb.gw.go
new file mode 100644
index 0000000..461e9ae
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service.pb.gw.go
@@ -0,0 +1,136 @@
+// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
+// source: authzed/api/v1/watch_service.proto
+
+/*
+Package v1 is a reverse proxy.
+
+It translates gRPC into RESTful JSON APIs.
+*/
+package v1
+
+import (
+ "context"
+ "errors"
+ "io"
+ "net/http"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+)
+
+// Suppress "imported and not used" errors
+var (
+ _ codes.Code
+ _ io.Reader
+ _ status.Status
+ _ = errors.New
+ _ = runtime.String
+ _ = utilities.NewDoubleArray
+ _ = metadata.Join
+)
+
+func request_WatchService_Watch_0(ctx context.Context, marshaler runtime.Marshaler, client WatchServiceClient, req *http.Request, pathParams map[string]string) (WatchService_WatchClient, runtime.ServerMetadata, error) {
+ var (
+ protoReq WatchRequest
+ metadata runtime.ServerMetadata
+ )
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ stream, err := client.Watch(ctx, &protoReq)
+ if err != nil {
+ return nil, metadata, err
+ }
+ header, err := stream.Header()
+ if err != nil {
+ return nil, metadata, err
+ }
+ metadata.HeaderMD = header
+ return stream, metadata, nil
+}
+
+// RegisterWatchServiceHandlerServer registers the http handlers for service WatchService to "mux".
+// UnaryRPC :call WatchServiceServer directly.
+// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWatchServiceHandlerFromEndpoint instead.
+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
+func RegisterWatchServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WatchServiceServer) error {
+ mux.Handle(http.MethodPost, pattern_WatchService_Watch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
+ _, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ })
+
+ return nil
+}
+
+// RegisterWatchServiceHandlerFromEndpoint is same as RegisterWatchServiceHandler but
+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
+func RegisterWatchServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
+ conn, err := grpc.NewClient(endpoint, opts...)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err != nil {
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ return
+ }
+ go func() {
+ <-ctx.Done()
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ }()
+ }()
+ return RegisterWatchServiceHandler(ctx, mux, conn)
+}
+
+// RegisterWatchServiceHandler registers the http handlers for service WatchService to "mux".
+// The handlers forward requests to the grpc endpoint over "conn".
+func RegisterWatchServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterWatchServiceHandlerClient(ctx, mux, NewWatchServiceClient(conn))
+}
+
+// RegisterWatchServiceHandlerClient registers the http handlers for service WatchService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WatchServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WatchServiceClient"
+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
+// "WatchServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.
+func RegisterWatchServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WatchServiceClient) error {
+ mux.Handle(http.MethodPost, pattern_WatchService_Watch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/authzed.api.v1.WatchService/Watch", runtime.WithHTTPPathPattern("/v1/watch"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_WatchService_Watch_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_WatchService_Watch_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
+ })
+ return nil
+}
+
+var (
+ pattern_WatchService_Watch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "watch"}, ""))
+)
+
+var (
+ forward_WatchService_Watch_0 = runtime.ForwardResponseStream
+)
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service.pb.validate.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service.pb.validate.go
new file mode 100644
index 0000000..384afc4
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service.pb.validate.go
@@ -0,0 +1,423 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: authzed/api/v1/watch_service.proto
+
+package v1
+
+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 WatchRequest 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 *WatchRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on WatchRequest 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 WatchRequestMultiError, or
+// nil if none found.
+func (m *WatchRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *WatchRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetOptionalObjectTypes() {
+ _, _ = idx, item
+
+ if len(item) > 128 {
+ err := WatchRequestValidationError{
+ field: fmt.Sprintf("OptionalObjectTypes[%v]", idx),
+ reason: "value length must be at most 128 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_WatchRequest_OptionalObjectTypes_Pattern.MatchString(item) {
+ err := WatchRequestValidationError{
+ field: fmt.Sprintf("OptionalObjectTypes[%v]", idx),
+ reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetOptionalStartCursor()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, WatchRequestValidationError{
+ field: "OptionalStartCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, WatchRequestValidationError{
+ field: "OptionalStartCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalStartCursor()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return WatchRequestValidationError{
+ field: "OptionalStartCursor",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetOptionalRelationshipFilters() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, WatchRequestValidationError{
+ field: fmt.Sprintf("OptionalRelationshipFilters[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, WatchRequestValidationError{
+ field: fmt.Sprintf("OptionalRelationshipFilters[%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 WatchRequestValidationError{
+ field: fmt.Sprintf("OptionalRelationshipFilters[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return WatchRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// WatchRequestMultiError is an error wrapping multiple validation errors
+// returned by WatchRequest.ValidateAll() if the designated constraints aren't met.
+type WatchRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m WatchRequestMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m WatchRequestMultiError) AllErrors() []error { return m }
+
+// WatchRequestValidationError is the validation error returned by
+// WatchRequest.Validate if the designated constraints aren't met.
+type WatchRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e WatchRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e WatchRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e WatchRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e WatchRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e WatchRequestValidationError) ErrorName() string { return "WatchRequestValidationError" }
+
+// Error satisfies the builtin error interface
+func (e WatchRequestValidationError) 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 %sWatchRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = WatchRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = WatchRequestValidationError{}
+
+var _WatchRequest_OptionalObjectTypes_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$")
+
+// Validate checks the field values on WatchResponse 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 *WatchResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on WatchResponse 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 WatchResponseMultiError, or
+// nil if none found.
+func (m *WatchResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *WatchResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetUpdates() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, WatchResponseValidationError{
+ field: fmt.Sprintf("Updates[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, WatchResponseValidationError{
+ field: fmt.Sprintf("Updates[%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 WatchResponseValidationError{
+ field: fmt.Sprintf("Updates[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetChangesThrough()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, WatchResponseValidationError{
+ field: "ChangesThrough",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, WatchResponseValidationError{
+ field: "ChangesThrough",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetChangesThrough()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return WatchResponseValidationError{
+ field: "ChangesThrough",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetOptionalTransactionMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, WatchResponseValidationError{
+ field: "OptionalTransactionMetadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, WatchResponseValidationError{
+ field: "OptionalTransactionMetadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOptionalTransactionMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return WatchResponseValidationError{
+ field: "OptionalTransactionMetadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for SchemaUpdated
+
+ // no validation rules for IsCheckpoint
+
+ if len(errors) > 0 {
+ return WatchResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// WatchResponseMultiError is an error wrapping multiple validation errors
+// returned by WatchResponse.ValidateAll() if the designated constraints
+// aren't met.
+type WatchResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m WatchResponseMultiError) Error() string {
+ msgs := make([]string, 0, len(m))
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m WatchResponseMultiError) AllErrors() []error { return m }
+
+// WatchResponseValidationError is the validation error returned by
+// WatchResponse.Validate if the designated constraints aren't met.
+type WatchResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e WatchResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e WatchResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e WatchResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e WatchResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e WatchResponseValidationError) ErrorName() string { return "WatchResponseValidationError" }
+
+// Error satisfies the builtin error interface
+func (e WatchResponseValidationError) 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 %sWatchResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = WatchResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = WatchResponseValidationError{}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service_grpc.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service_grpc.pb.go
new file mode 100644
index 0000000..c792edc
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service_grpc.pb.go
@@ -0,0 +1,124 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.5.1
+// - protoc (unknown)
+// source: authzed/api/v1/watch_service.proto
+
+package v1
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.64.0 or later.
+const _ = grpc.SupportPackageIsVersion9
+
+const (
+ WatchService_Watch_FullMethodName = "/authzed.api.v1.WatchService/Watch"
+)
+
+// WatchServiceClient is the client API for WatchService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type WatchServiceClient interface {
+ Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[WatchResponse], error)
+}
+
+type watchServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewWatchServiceClient(cc grpc.ClientConnInterface) WatchServiceClient {
+ return &watchServiceClient{cc}
+}
+
+func (c *watchServiceClient) Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[WatchResponse], error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ stream, err := c.cc.NewStream(ctx, &WatchService_ServiceDesc.Streams[0], WatchService_Watch_FullMethodName, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &grpc.GenericClientStream[WatchRequest, WatchResponse]{ClientStream: stream}
+ if err := x.ClientStream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type WatchService_WatchClient = grpc.ServerStreamingClient[WatchResponse]
+
+// WatchServiceServer is the server API for WatchService service.
+// All implementations must embed UnimplementedWatchServiceServer
+// for forward compatibility.
+type WatchServiceServer interface {
+ Watch(*WatchRequest, grpc.ServerStreamingServer[WatchResponse]) error
+ mustEmbedUnimplementedWatchServiceServer()
+}
+
+// UnimplementedWatchServiceServer must be embedded to have
+// forward compatible implementations.
+//
+// NOTE: this should be embedded by value instead of pointer to avoid a nil
+// pointer dereference when methods are called.
+type UnimplementedWatchServiceServer struct{}
+
+func (UnimplementedWatchServiceServer) Watch(*WatchRequest, grpc.ServerStreamingServer[WatchResponse]) error {
+ return status.Errorf(codes.Unimplemented, "method Watch not implemented")
+}
+func (UnimplementedWatchServiceServer) mustEmbedUnimplementedWatchServiceServer() {}
+func (UnimplementedWatchServiceServer) testEmbeddedByValue() {}
+
+// UnsafeWatchServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to WatchServiceServer will
+// result in compilation errors.
+type UnsafeWatchServiceServer interface {
+ mustEmbedUnimplementedWatchServiceServer()
+}
+
+func RegisterWatchServiceServer(s grpc.ServiceRegistrar, srv WatchServiceServer) {
+ // If the following call pancis, it indicates UnimplementedWatchServiceServer was
+ // embedded by pointer and is nil. This will cause panics if an
+ // unimplemented method is ever invoked, so we test this at initialization
+ // time to prevent it from happening at runtime later due to I/O.
+ if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
+ t.testEmbeddedByValue()
+ }
+ s.RegisterService(&WatchService_ServiceDesc, srv)
+}
+
+func _WatchService_Watch_Handler(srv interface{}, stream grpc.ServerStream) error {
+ m := new(WatchRequest)
+ if err := stream.RecvMsg(m); err != nil {
+ return err
+ }
+ return srv.(WatchServiceServer).Watch(m, &grpc.GenericServerStream[WatchRequest, WatchResponse]{ServerStream: stream})
+}
+
+// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
+type WatchService_WatchServer = grpc.ServerStreamingServer[WatchResponse]
+
+// WatchService_ServiceDesc is the grpc.ServiceDesc for WatchService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var WatchService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "authzed.api.v1.WatchService",
+ HandlerType: (*WatchServiceServer)(nil),
+ Methods: []grpc.MethodDesc{},
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "Watch",
+ Handler: _WatchService_Watch_Handler,
+ ServerStreams: true,
+ },
+ },
+ Metadata: "authzed/api/v1/watch_service.proto",
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service_vtproto.pb.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service_vtproto.pb.go
new file mode 100644
index 0000000..9b5d0eb
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/watch_service_vtproto.pb.go
@@ -0,0 +1,835 @@
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// protoc-gen-go-vtproto version: v0.6.1-0.20240319094008-0393e58bdf10
+// source: authzed/api/v1/watch_service.proto
+
+package v1
+
+import (
+ fmt "fmt"
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ structpb1 "github.com/planetscale/vtprotobuf/types/known/structpb"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ io "io"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *WatchRequest) CloneVT() *WatchRequest {
+ if m == nil {
+ return (*WatchRequest)(nil)
+ }
+ r := new(WatchRequest)
+ r.OptionalStartCursor = m.OptionalStartCursor.CloneVT()
+ if rhs := m.OptionalObjectTypes; rhs != nil {
+ tmpContainer := make([]string, len(rhs))
+ copy(tmpContainer, rhs)
+ r.OptionalObjectTypes = tmpContainer
+ }
+ if rhs := m.OptionalRelationshipFilters; rhs != nil {
+ tmpContainer := make([]*RelationshipFilter, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.OptionalRelationshipFilters = tmpContainer
+ }
+ if rhs := m.OptionalUpdateKinds; rhs != nil {
+ tmpContainer := make([]WatchKind, len(rhs))
+ copy(tmpContainer, rhs)
+ r.OptionalUpdateKinds = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *WatchRequest) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (m *WatchResponse) CloneVT() *WatchResponse {
+ if m == nil {
+ return (*WatchResponse)(nil)
+ }
+ r := new(WatchResponse)
+ r.ChangesThrough = m.ChangesThrough.CloneVT()
+ r.OptionalTransactionMetadata = (*structpb.Struct)((*structpb1.Struct)(m.OptionalTransactionMetadata).CloneVT())
+ r.SchemaUpdated = m.SchemaUpdated
+ r.IsCheckpoint = m.IsCheckpoint
+ if rhs := m.Updates; rhs != nil {
+ tmpContainer := make([]*RelationshipUpdate, len(rhs))
+ for k, v := range rhs {
+ tmpContainer[k] = v.CloneVT()
+ }
+ r.Updates = tmpContainer
+ }
+ if len(m.unknownFields) > 0 {
+ r.unknownFields = make([]byte, len(m.unknownFields))
+ copy(r.unknownFields, m.unknownFields)
+ }
+ return r
+}
+
+func (m *WatchResponse) CloneMessageVT() proto.Message {
+ return m.CloneVT()
+}
+
+func (this *WatchRequest) EqualVT(that *WatchRequest) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if len(this.OptionalObjectTypes) != len(that.OptionalObjectTypes) {
+ return false
+ }
+ for i, vx := range this.OptionalObjectTypes {
+ vy := that.OptionalObjectTypes[i]
+ if vx != vy {
+ return false
+ }
+ }
+ if !this.OptionalStartCursor.EqualVT(that.OptionalStartCursor) {
+ return false
+ }
+ if len(this.OptionalRelationshipFilters) != len(that.OptionalRelationshipFilters) {
+ return false
+ }
+ for i, vx := range this.OptionalRelationshipFilters {
+ vy := that.OptionalRelationshipFilters[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &RelationshipFilter{}
+ }
+ if q == nil {
+ q = &RelationshipFilter{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if len(this.OptionalUpdateKinds) != len(that.OptionalUpdateKinds) {
+ return false
+ }
+ for i, vx := range this.OptionalUpdateKinds {
+ vy := that.OptionalUpdateKinds[i]
+ if vx != vy {
+ return false
+ }
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *WatchRequest) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*WatchRequest)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (this *WatchResponse) EqualVT(that *WatchResponse) bool {
+ if this == that {
+ return true
+ } else if this == nil || that == nil {
+ return false
+ }
+ if len(this.Updates) != len(that.Updates) {
+ return false
+ }
+ for i, vx := range this.Updates {
+ vy := that.Updates[i]
+ if p, q := vx, vy; p != q {
+ if p == nil {
+ p = &RelationshipUpdate{}
+ }
+ if q == nil {
+ q = &RelationshipUpdate{}
+ }
+ if !p.EqualVT(q) {
+ return false
+ }
+ }
+ }
+ if !this.ChangesThrough.EqualVT(that.ChangesThrough) {
+ return false
+ }
+ if !(*structpb1.Struct)(this.OptionalTransactionMetadata).EqualVT((*structpb1.Struct)(that.OptionalTransactionMetadata)) {
+ return false
+ }
+ if this.SchemaUpdated != that.SchemaUpdated {
+ return false
+ }
+ if this.IsCheckpoint != that.IsCheckpoint {
+ return false
+ }
+ return string(this.unknownFields) == string(that.unknownFields)
+}
+
+func (this *WatchResponse) EqualMessageVT(thatMsg proto.Message) bool {
+ that, ok := thatMsg.(*WatchResponse)
+ if !ok {
+ return false
+ }
+ return this.EqualVT(that)
+}
+func (m *WatchRequest) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *WatchRequest) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *WatchRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.OptionalUpdateKinds) > 0 {
+ var pksize2 int
+ for _, num := range m.OptionalUpdateKinds {
+ pksize2 += protohelpers.SizeOfVarint(uint64(num))
+ }
+ i -= pksize2
+ j1 := i
+ for _, num1 := range m.OptionalUpdateKinds {
+ num := uint64(num1)
+ for num >= 1<<7 {
+ dAtA[j1] = uint8(uint64(num)&0x7f | 0x80)
+ num >>= 7
+ j1++
+ }
+ dAtA[j1] = uint8(num)
+ j1++
+ }
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.OptionalRelationshipFilters) > 0 {
+ for iNdEx := len(m.OptionalRelationshipFilters) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.OptionalRelationshipFilters[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if m.OptionalStartCursor != nil {
+ size, err := m.OptionalStartCursor.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.OptionalObjectTypes) > 0 {
+ for iNdEx := len(m.OptionalObjectTypes) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.OptionalObjectTypes[iNdEx])
+ copy(dAtA[i:], m.OptionalObjectTypes[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OptionalObjectTypes[iNdEx])))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *WatchResponse) MarshalVT() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVT(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *WatchResponse) MarshalToVT(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVT(dAtA[:size])
+}
+
+func (m *WatchResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.IsCheckpoint {
+ i--
+ if m.IsCheckpoint {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x28
+ }
+ if m.SchemaUpdated {
+ i--
+ if m.SchemaUpdated {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x20
+ }
+ if m.OptionalTransactionMetadata != nil {
+ size, err := (*structpb1.Struct)(m.OptionalTransactionMetadata).MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.ChangesThrough != nil {
+ size, err := m.ChangesThrough.MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Updates) > 0 {
+ for iNdEx := len(m.Updates) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Updates[iNdEx].MarshalToSizedBufferVT(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *WatchRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.OptionalObjectTypes) > 0 {
+ for _, s := range m.OptionalObjectTypes {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.OptionalStartCursor != nil {
+ l = m.OptionalStartCursor.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.OptionalRelationshipFilters) > 0 {
+ for _, e := range m.OptionalRelationshipFilters {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if len(m.OptionalUpdateKinds) > 0 {
+ l = 0
+ for _, e := range m.OptionalUpdateKinds {
+ l += protohelpers.SizeOfVarint(uint64(e))
+ }
+ n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *WatchResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Updates) > 0 {
+ for _, e := range m.Updates {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.ChangesThrough != nil {
+ l = m.ChangesThrough.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OptionalTransactionMetadata != nil {
+ l = (*structpb1.Struct)(m.OptionalTransactionMetadata).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.SchemaUpdated {
+ n += 2
+ }
+ if m.IsCheckpoint {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *WatchRequest) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: WatchRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: WatchRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalObjectTypes", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalObjectTypes = append(m.OptionalObjectTypes, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalStartCursor", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalStartCursor == nil {
+ m.OptionalStartCursor = &ZedToken{}
+ }
+ if err := m.OptionalStartCursor.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalRelationshipFilters", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.OptionalRelationshipFilters = append(m.OptionalRelationshipFilters, &RelationshipFilter{})
+ if err := m.OptionalRelationshipFilters[len(m.OptionalRelationshipFilters)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType == 0 {
+ var v WatchKind
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= WatchKind(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.OptionalUpdateKinds = append(m.OptionalUpdateKinds, v)
+ } else if wireType == 2 {
+ var packedLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ packedLen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if packedLen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + packedLen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ var elementCount int
+ if elementCount != 0 && len(m.OptionalUpdateKinds) == 0 {
+ m.OptionalUpdateKinds = make([]WatchKind, 0, elementCount)
+ }
+ for iNdEx < postIndex {
+ var v WatchKind
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= WatchKind(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.OptionalUpdateKinds = append(m.OptionalUpdateKinds, v)
+ }
+ } else {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalUpdateKinds", wireType)
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *WatchResponse) UnmarshalVT(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: WatchResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: WatchResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Updates", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Updates = append(m.Updates, &RelationshipUpdate{})
+ if err := m.Updates[len(m.Updates)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ChangesThrough", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ChangesThrough == nil {
+ m.ChangesThrough = &ZedToken{}
+ }
+ if err := m.ChangesThrough.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OptionalTransactionMetadata", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.OptionalTransactionMetadata == nil {
+ m.OptionalTransactionMetadata = &structpb.Struct{}
+ }
+ if err := (*structpb1.Struct)(m.OptionalTransactionMetadata).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SchemaUpdated", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.SchemaUpdated = bool(v != 0)
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IsCheckpoint", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protohelpers.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.IsCheckpoint = bool(v != 0)
+ default:
+ iNdEx = preIndex
+ skippy, err := protohelpers.Skip(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return protohelpers.ErrInvalidLength
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
diff --git a/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/zz_generated.version.go b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/zz_generated.version.go
new file mode 100644
index 0000000..c8b384b
--- /dev/null
+++ b/vendor/github.com/authzed/authzed-go/proto/authzed/api/v1/zz_generated.version.go
@@ -0,0 +1,6 @@
+package v1
+
+const (
+ BufRepository = "buf.build/authzed/api"
+ BufTag = "cd1170f065014690acaefaf0a9d93c62"
+)