diff --git a/.gitignore b/.gitignore index 22ac775..b0a1ba3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .idea/ .vscode/ *.sublime-workspace +.devcontainer/ # Vim temp files *~ .dccache diff --git a/Makefile b/Makefile index c70c06c..28bf1b9 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ all: patch-swagger-doc format buf-gen: init-git-hooks - ./buf.gen.yaml + buf generate --template buf.gen.yaml + buf generate --template buf.gen.swagger.yaml --exclude-path storage/v1beta1 patch-swagger-doc: buf-gen ./scripts/update_swagger.sh docs/openapiv2/apidocs.swagger.json diff --git a/buf.gen.swagger.yaml b/buf.gen.swagger.yaml new file mode 100644 index 0000000..1cebad5 --- /dev/null +++ b/buf.gen.swagger.yaml @@ -0,0 +1,15 @@ +version: v1 +managed: + enabled: true + go_package_prefix: + default: github.com/openfga/api/proto + except: + - buf.build/googleapis/googleapis + - buf.build/envoyproxy/protoc-gen-validate + - buf.build/grpc-ecosystem/grpc-gateway +plugins: + - plugin: buf.build/grpc-ecosystem/openapiv2:v2.16.0 + out: docs/openapiv2 + opt: + - openapi_naming_strategy=simple + - allow_merge=true diff --git a/buf.gen.yaml b/buf.gen.yaml index d35618e..0fcf34a 100755 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -27,8 +27,3 @@ plugins: opt: - paths=source_relative - logtostderr=true - - plugin: buf.build/grpc-ecosystem/openapiv2:v2.16.0 - out: docs/openapiv2 - opt: - - openapi_naming_strategy=simple - - allow_merge=true diff --git a/proto/storage/v1beta1/storage.pb.go b/proto/storage/v1beta1/storage.pb.go new file mode 100644 index 0000000..498f62e --- /dev/null +++ b/proto/storage/v1beta1/storage.pb.go @@ -0,0 +1,3546 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.0 +// protoc (unknown) +// source: storage/v1beta1/storage.proto + +package storagev1beta1 + +import ( + v1 "github.com/openfga/api/proto/openfga/v1" + _ "google.golang.org/genproto/googleapis/api/visibility" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +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) +) + +// OnMissingDelete specifies behavior when attempting to delete a non-existent tuple. +type OnMissingDelete int32 + +const ( + OnMissingDelete_ON_MISSING_DELETE_ERROR OnMissingDelete = 0 // Return an error + OnMissingDelete_ON_MISSING_DELETE_IGNORE OnMissingDelete = 1 // Silently ignore (no-op) +) + +// Enum value maps for OnMissingDelete. +var ( + OnMissingDelete_name = map[int32]string{ + 0: "ON_MISSING_DELETE_ERROR", + 1: "ON_MISSING_DELETE_IGNORE", + } + OnMissingDelete_value = map[string]int32{ + "ON_MISSING_DELETE_ERROR": 0, + "ON_MISSING_DELETE_IGNORE": 1, + } +) + +func (x OnMissingDelete) Enum() *OnMissingDelete { + p := new(OnMissingDelete) + *p = x + return p +} + +func (x OnMissingDelete) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OnMissingDelete) Descriptor() protoreflect.EnumDescriptor { + return file_storage_v1beta1_storage_proto_enumTypes[0].Descriptor() +} + +func (OnMissingDelete) Type() protoreflect.EnumType { + return &file_storage_v1beta1_storage_proto_enumTypes[0] +} + +func (x OnMissingDelete) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OnMissingDelete.Descriptor instead. +func (OnMissingDelete) EnumDescriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{0} +} + +// OnDuplicateInsert specifies behavior when attempting to insert an existing tuple. +type OnDuplicateInsert int32 + +const ( + OnDuplicateInsert_ON_DUPLICATE_INSERT_ERROR OnDuplicateInsert = 0 // Return an error + OnDuplicateInsert_ON_DUPLICATE_INSERT_IGNORE OnDuplicateInsert = 1 // Silently ignore (no-op) +) + +// Enum value maps for OnDuplicateInsert. +var ( + OnDuplicateInsert_name = map[int32]string{ + 0: "ON_DUPLICATE_INSERT_ERROR", + 1: "ON_DUPLICATE_INSERT_IGNORE", + } + OnDuplicateInsert_value = map[string]int32{ + "ON_DUPLICATE_INSERT_ERROR": 0, + "ON_DUPLICATE_INSERT_IGNORE": 1, + } +) + +func (x OnDuplicateInsert) Enum() *OnDuplicateInsert { + p := new(OnDuplicateInsert) + *p = x + return p +} + +func (x OnDuplicateInsert) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OnDuplicateInsert) Descriptor() protoreflect.EnumDescriptor { + return file_storage_v1beta1_storage_proto_enumTypes[1].Descriptor() +} + +func (OnDuplicateInsert) Type() protoreflect.EnumType { + return &file_storage_v1beta1_storage_proto_enumTypes[1] +} + +func (x OnDuplicateInsert) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OnDuplicateInsert.Descriptor instead. +func (OnDuplicateInsert) EnumDescriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{1} +} + +// StorageErrorReason provides standardized error reasons for gRPC error details. +// Server implementations MUST use these reason codes when returning errors via +// google.rpc.ErrorInfo.reason to enable proper error handling on the client side. +// +// These reasons are embedded in gRPC status error details (google.rpc.ErrorInfo) +// with domain "openfga.storage" to distinguish specific storage errors that map +// to the same gRPC status code. +// +// Example server usage: +// +// st := status.New(codes.NotFound, "tuple not found") +// st, _ = st.WithDetails(&errdetails.ErrorInfo{ +// Reason: storagev1.StorageErrorReason_NOT_FOUND.String(), +// Domain: "openfga.storage", +// }) +// return st.Err() +type StorageErrorReason int32 + +const ( + // STORAGE_ERROR_REASON_UNSPECIFIED is the default value and should not be used. + StorageErrorReason_STORAGE_ERROR_REASON_UNSPECIFIED StorageErrorReason = 0 + // NOT_FOUND is returned when the object does not exist. + // Maps to gRPC status code: NOT_FOUND + StorageErrorReason_NOT_FOUND StorageErrorReason = 1 + // COLLISION is returned when an item already exists within the store. + // Maps to gRPC status code: ALREADY_EXISTS + StorageErrorReason_COLLISION StorageErrorReason = 2 + // INVALID_CONTINUATION_TOKEN is returned when the continuation token is invalid. + // Maps to gRPC status code: INVALID_ARGUMENT + StorageErrorReason_INVALID_CONTINUATION_TOKEN StorageErrorReason = 3 + // INVALID_START_TIME is returned when start time param for ReadChanges API is invalid. + // Maps to gRPC status code: INVALID_ARGUMENT + StorageErrorReason_INVALID_START_TIME StorageErrorReason = 4 + // INVALID_WRITE_INPUT is returned when the tuple to be written already existed + // or the tuple to be deleted did not exist. + // Maps to gRPC status code: INVALID_ARGUMENT + StorageErrorReason_INVALID_WRITE_INPUT StorageErrorReason = 5 + // WRITE_CONFLICT_ON_INSERT is returned when two writes attempt to insert the same tuple at the same time. + // Maps to gRPC status code: ABORTED + StorageErrorReason_WRITE_CONFLICT_ON_INSERT StorageErrorReason = 6 + // WRITE_CONFLICT_ON_DELETE is returned when two writes attempt to delete the same tuple at the same time. + // Maps to gRPC status code: ABORTED + StorageErrorReason_WRITE_CONFLICT_ON_DELETE StorageErrorReason = 7 + // TRANSACTIONAL_WRITE_FAILED is returned when two writes attempt to write the same tuple at the same time. + // Maps to gRPC status code: ABORTED + StorageErrorReason_TRANSACTIONAL_WRITE_FAILED StorageErrorReason = 8 + // TRANSACTION_THROTTLED is returned when throttling is applied at the datastore level. + // Maps to gRPC status code: RESOURCE_EXHAUSTED + StorageErrorReason_TRANSACTION_THROTTLED StorageErrorReason = 9 +) + +// Enum value maps for StorageErrorReason. +var ( + StorageErrorReason_name = map[int32]string{ + 0: "STORAGE_ERROR_REASON_UNSPECIFIED", + 1: "NOT_FOUND", + 2: "COLLISION", + 3: "INVALID_CONTINUATION_TOKEN", + 4: "INVALID_START_TIME", + 5: "INVALID_WRITE_INPUT", + 6: "WRITE_CONFLICT_ON_INSERT", + 7: "WRITE_CONFLICT_ON_DELETE", + 8: "TRANSACTIONAL_WRITE_FAILED", + 9: "TRANSACTION_THROTTLED", + } + StorageErrorReason_value = map[string]int32{ + "STORAGE_ERROR_REASON_UNSPECIFIED": 0, + "NOT_FOUND": 1, + "COLLISION": 2, + "INVALID_CONTINUATION_TOKEN": 3, + "INVALID_START_TIME": 4, + "INVALID_WRITE_INPUT": 5, + "WRITE_CONFLICT_ON_INSERT": 6, + "WRITE_CONFLICT_ON_DELETE": 7, + "TRANSACTIONAL_WRITE_FAILED": 8, + "TRANSACTION_THROTTLED": 9, + } +) + +func (x StorageErrorReason) Enum() *StorageErrorReason { + p := new(StorageErrorReason) + *p = x + return p +} + +func (x StorageErrorReason) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StorageErrorReason) Descriptor() protoreflect.EnumDescriptor { + return file_storage_v1beta1_storage_proto_enumTypes[2].Descriptor() +} + +func (StorageErrorReason) Type() protoreflect.EnumType { + return &file_storage_v1beta1_storage_proto_enumTypes[2] +} + +func (x StorageErrorReason) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StorageErrorReason.Descriptor instead. +func (StorageErrorReason) EnumDescriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{2} +} + +type ReadRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Store string `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` + Filter *ReadFilter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + Consistency *ConsistencyOptions `protobuf:"bytes,3,opt,name=consistency,proto3" json:"consistency,omitempty"` +} + +func (x *ReadRequest) Reset() { + *x = ReadRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadRequest) ProtoMessage() {} + +func (x *ReadRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead. +func (*ReadRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{0} +} + +func (x *ReadRequest) GetStore() string { + if x != nil { + return x.Store + } + return "" +} + +func (x *ReadRequest) GetFilter() *ReadFilter { + if x != nil { + return x.Filter + } + return nil +} + +func (x *ReadRequest) GetConsistency() *ConsistencyOptions { + if x != nil { + return x.Consistency + } + return nil +} + +type ReadResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tuple *v1.Tuple `protobuf:"bytes,1,opt,name=tuple,proto3" json:"tuple,omitempty"` +} + +func (x *ReadResponse) Reset() { + *x = ReadResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadResponse) ProtoMessage() {} + +func (x *ReadResponse) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead. +func (*ReadResponse) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{1} +} + +func (x *ReadResponse) GetTuple() *v1.Tuple { + if x != nil { + return x.Tuple + } + return nil +} + +type ReadPageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Store string `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` + Filter *ReadFilter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + Pagination *PaginationOptions `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` + Consistency *ConsistencyOptions `protobuf:"bytes,4,opt,name=consistency,proto3" json:"consistency,omitempty"` +} + +func (x *ReadPageRequest) Reset() { + *x = ReadPageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadPageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadPageRequest) ProtoMessage() {} + +func (x *ReadPageRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadPageRequest.ProtoReflect.Descriptor instead. +func (*ReadPageRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{2} +} + +func (x *ReadPageRequest) GetStore() string { + if x != nil { + return x.Store + } + return "" +} + +func (x *ReadPageRequest) GetFilter() *ReadFilter { + if x != nil { + return x.Filter + } + return nil +} + +func (x *ReadPageRequest) GetPagination() *PaginationOptions { + if x != nil { + return x.Pagination + } + return nil +} + +func (x *ReadPageRequest) GetConsistency() *ConsistencyOptions { + if x != nil { + return x.Consistency + } + return nil +} + +type ReadPageResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tuples []*v1.Tuple `protobuf:"bytes,1,rep,name=tuples,proto3" json:"tuples,omitempty"` + ContinuationToken string `protobuf:"bytes,2,opt,name=continuation_token,json=continuationToken,proto3" json:"continuation_token,omitempty"` +} + +func (x *ReadPageResponse) Reset() { + *x = ReadPageResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadPageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadPageResponse) ProtoMessage() {} + +func (x *ReadPageResponse) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadPageResponse.ProtoReflect.Descriptor instead. +func (*ReadPageResponse) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{3} +} + +func (x *ReadPageResponse) GetTuples() []*v1.Tuple { + if x != nil { + return x.Tuples + } + return nil +} + +func (x *ReadPageResponse) GetContinuationToken() string { + if x != nil { + return x.ContinuationToken + } + return "" +} + +type ReadUserTupleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Store string `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` + Filter *ReadFilter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + Consistency *ConsistencyOptions `protobuf:"bytes,3,opt,name=consistency,proto3" json:"consistency,omitempty"` +} + +func (x *ReadUserTupleRequest) Reset() { + *x = ReadUserTupleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadUserTupleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadUserTupleRequest) ProtoMessage() {} + +func (x *ReadUserTupleRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadUserTupleRequest.ProtoReflect.Descriptor instead. +func (*ReadUserTupleRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{4} +} + +func (x *ReadUserTupleRequest) GetStore() string { + if x != nil { + return x.Store + } + return "" +} + +func (x *ReadUserTupleRequest) GetFilter() *ReadFilter { + if x != nil { + return x.Filter + } + return nil +} + +func (x *ReadUserTupleRequest) GetConsistency() *ConsistencyOptions { + if x != nil { + return x.Consistency + } + return nil +} + +type ReadUsersetTuplesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Store string `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` + Filter *ReadUsersetTuplesFilter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + Consistency *ConsistencyOptions `protobuf:"bytes,3,opt,name=consistency,proto3" json:"consistency,omitempty"` +} + +func (x *ReadUsersetTuplesRequest) Reset() { + *x = ReadUsersetTuplesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadUsersetTuplesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadUsersetTuplesRequest) ProtoMessage() {} + +func (x *ReadUsersetTuplesRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadUsersetTuplesRequest.ProtoReflect.Descriptor instead. +func (*ReadUsersetTuplesRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{5} +} + +func (x *ReadUsersetTuplesRequest) GetStore() string { + if x != nil { + return x.Store + } + return "" +} + +func (x *ReadUsersetTuplesRequest) GetFilter() *ReadUsersetTuplesFilter { + if x != nil { + return x.Filter + } + return nil +} + +func (x *ReadUsersetTuplesRequest) GetConsistency() *ConsistencyOptions { + if x != nil { + return x.Consistency + } + return nil +} + +type ReadStartingWithUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Store string `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` + Filter *ReadStartingWithUserFilter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + Consistency *ConsistencyOptions `protobuf:"bytes,3,opt,name=consistency,proto3" json:"consistency,omitempty"` + WithResultsSortedAscending bool `protobuf:"varint,4,opt,name=with_results_sorted_ascending,json=withResultsSortedAscending,proto3" json:"with_results_sorted_ascending,omitempty"` +} + +func (x *ReadStartingWithUserRequest) Reset() { + *x = ReadStartingWithUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadStartingWithUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadStartingWithUserRequest) ProtoMessage() {} + +func (x *ReadStartingWithUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadStartingWithUserRequest.ProtoReflect.Descriptor instead. +func (*ReadStartingWithUserRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{6} +} + +func (x *ReadStartingWithUserRequest) GetStore() string { + if x != nil { + return x.Store + } + return "" +} + +func (x *ReadStartingWithUserRequest) GetFilter() *ReadStartingWithUserFilter { + if x != nil { + return x.Filter + } + return nil +} + +func (x *ReadStartingWithUserRequest) GetConsistency() *ConsistencyOptions { + if x != nil { + return x.Consistency + } + return nil +} + +func (x *ReadStartingWithUserRequest) GetWithResultsSortedAscending() bool { + if x != nil { + return x.WithResultsSortedAscending + } + return false +} + +type WriteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Store string `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` + // deletes contains tuples to delete. The condition field is ignored for deletes; + // deletion matches on user, relation, and object only. + Deletes []*v1.TupleKey `protobuf:"bytes,2,rep,name=deletes,proto3" json:"deletes,omitempty"` + Writes []*v1.TupleKey `protobuf:"bytes,3,rep,name=writes,proto3" json:"writes,omitempty"` + Options *TupleWriteOptions `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"` +} + +func (x *WriteRequest) Reset() { + *x = WriteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteRequest) ProtoMessage() {} + +func (x *WriteRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead. +func (*WriteRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{7} +} + +func (x *WriteRequest) GetStore() string { + if x != nil { + return x.Store + } + return "" +} + +func (x *WriteRequest) GetDeletes() []*v1.TupleKey { + if x != nil { + return x.Deletes + } + return nil +} + +func (x *WriteRequest) GetWrites() []*v1.TupleKey { + if x != nil { + return x.Writes + } + return nil +} + +func (x *WriteRequest) GetOptions() *TupleWriteOptions { + if x != nil { + return x.Options + } + return nil +} + +type WriteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *WriteResponse) Reset() { + *x = WriteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteResponse) ProtoMessage() {} + +func (x *WriteResponse) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteResponse.ProtoReflect.Descriptor instead. +func (*WriteResponse) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{8} +} + +type ReadAuthorizationModelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Store string `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *ReadAuthorizationModelRequest) Reset() { + *x = ReadAuthorizationModelRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadAuthorizationModelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadAuthorizationModelRequest) ProtoMessage() {} + +func (x *ReadAuthorizationModelRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadAuthorizationModelRequest.ProtoReflect.Descriptor instead. +func (*ReadAuthorizationModelRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{9} +} + +func (x *ReadAuthorizationModelRequest) GetStore() string { + if x != nil { + return x.Store + } + return "" +} + +func (x *ReadAuthorizationModelRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ReadAuthorizationModelResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Model *v1.AuthorizationModel `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` +} + +func (x *ReadAuthorizationModelResponse) Reset() { + *x = ReadAuthorizationModelResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadAuthorizationModelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadAuthorizationModelResponse) ProtoMessage() {} + +func (x *ReadAuthorizationModelResponse) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadAuthorizationModelResponse.ProtoReflect.Descriptor instead. +func (*ReadAuthorizationModelResponse) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{10} +} + +func (x *ReadAuthorizationModelResponse) GetModel() *v1.AuthorizationModel { + if x != nil { + return x.Model + } + return nil +} + +type ReadAuthorizationModelsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Store string `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` + Pagination *PaginationOptions `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *ReadAuthorizationModelsRequest) Reset() { + *x = ReadAuthorizationModelsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadAuthorizationModelsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadAuthorizationModelsRequest) ProtoMessage() {} + +func (x *ReadAuthorizationModelsRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadAuthorizationModelsRequest.ProtoReflect.Descriptor instead. +func (*ReadAuthorizationModelsRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{11} +} + +func (x *ReadAuthorizationModelsRequest) GetStore() string { + if x != nil { + return x.Store + } + return "" +} + +func (x *ReadAuthorizationModelsRequest) GetPagination() *PaginationOptions { + if x != nil { + return x.Pagination + } + return nil +} + +type ReadAuthorizationModelsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Models []*v1.AuthorizationModel `protobuf:"bytes,1,rep,name=models,proto3" json:"models,omitempty"` + ContinuationToken string `protobuf:"bytes,2,opt,name=continuation_token,json=continuationToken,proto3" json:"continuation_token,omitempty"` +} + +func (x *ReadAuthorizationModelsResponse) Reset() { + *x = ReadAuthorizationModelsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadAuthorizationModelsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadAuthorizationModelsResponse) ProtoMessage() {} + +func (x *ReadAuthorizationModelsResponse) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadAuthorizationModelsResponse.ProtoReflect.Descriptor instead. +func (*ReadAuthorizationModelsResponse) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{12} +} + +func (x *ReadAuthorizationModelsResponse) GetModels() []*v1.AuthorizationModel { + if x != nil { + return x.Models + } + return nil +} + +func (x *ReadAuthorizationModelsResponse) GetContinuationToken() string { + if x != nil { + return x.ContinuationToken + } + return "" +} + +type FindLatestAuthorizationModelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Store string `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` +} + +func (x *FindLatestAuthorizationModelRequest) Reset() { + *x = FindLatestAuthorizationModelRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindLatestAuthorizationModelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindLatestAuthorizationModelRequest) ProtoMessage() {} + +func (x *FindLatestAuthorizationModelRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FindLatestAuthorizationModelRequest.ProtoReflect.Descriptor instead. +func (*FindLatestAuthorizationModelRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{13} +} + +func (x *FindLatestAuthorizationModelRequest) GetStore() string { + if x != nil { + return x.Store + } + return "" +} + +type FindLatestAuthorizationModelResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Model *v1.AuthorizationModel `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` +} + +func (x *FindLatestAuthorizationModelResponse) Reset() { + *x = FindLatestAuthorizationModelResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FindLatestAuthorizationModelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FindLatestAuthorizationModelResponse) ProtoMessage() {} + +func (x *FindLatestAuthorizationModelResponse) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FindLatestAuthorizationModelResponse.ProtoReflect.Descriptor instead. +func (*FindLatestAuthorizationModelResponse) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{14} +} + +func (x *FindLatestAuthorizationModelResponse) GetModel() *v1.AuthorizationModel { + if x != nil { + return x.Model + } + return nil +} + +type WriteAuthorizationModelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Store string `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` + Model *v1.AuthorizationModel `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"` +} + +func (x *WriteAuthorizationModelRequest) Reset() { + *x = WriteAuthorizationModelRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteAuthorizationModelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteAuthorizationModelRequest) ProtoMessage() {} + +func (x *WriteAuthorizationModelRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteAuthorizationModelRequest.ProtoReflect.Descriptor instead. +func (*WriteAuthorizationModelRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{15} +} + +func (x *WriteAuthorizationModelRequest) GetStore() string { + if x != nil { + return x.Store + } + return "" +} + +func (x *WriteAuthorizationModelRequest) GetModel() *v1.AuthorizationModel { + if x != nil { + return x.Model + } + return nil +} + +type WriteAuthorizationModelResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *WriteAuthorizationModelResponse) Reset() { + *x = WriteAuthorizationModelResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteAuthorizationModelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteAuthorizationModelResponse) ProtoMessage() {} + +func (x *WriteAuthorizationModelResponse) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteAuthorizationModelResponse.ProtoReflect.Descriptor instead. +func (*WriteAuthorizationModelResponse) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{16} +} + +type CreateStoreRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Store *v1.Store `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` +} + +func (x *CreateStoreRequest) Reset() { + *x = CreateStoreRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateStoreRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateStoreRequest) ProtoMessage() {} + +func (x *CreateStoreRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateStoreRequest.ProtoReflect.Descriptor instead. +func (*CreateStoreRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{17} +} + +func (x *CreateStoreRequest) GetStore() *v1.Store { + if x != nil { + return x.Store + } + return nil +} + +type CreateStoreResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Store *v1.Store `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` +} + +func (x *CreateStoreResponse) Reset() { + *x = CreateStoreResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateStoreResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateStoreResponse) ProtoMessage() {} + +func (x *CreateStoreResponse) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateStoreResponse.ProtoReflect.Descriptor instead. +func (*CreateStoreResponse) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{18} +} + +func (x *CreateStoreResponse) GetStore() *v1.Store { + if x != nil { + return x.Store + } + return nil +} + +type DeleteStoreRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteStoreRequest) Reset() { + *x = DeleteStoreRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteStoreRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteStoreRequest) ProtoMessage() {} + +func (x *DeleteStoreRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteStoreRequest.ProtoReflect.Descriptor instead. +func (*DeleteStoreRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{19} +} + +func (x *DeleteStoreRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteStoreResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteStoreResponse) Reset() { + *x = DeleteStoreResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteStoreResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteStoreResponse) ProtoMessage() {} + +func (x *DeleteStoreResponse) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteStoreResponse.ProtoReflect.Descriptor instead. +func (*DeleteStoreResponse) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{20} +} + +type GetStoreRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetStoreRequest) Reset() { + *x = GetStoreRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStoreRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStoreRequest) ProtoMessage() {} + +func (x *GetStoreRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStoreRequest.ProtoReflect.Descriptor instead. +func (*GetStoreRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{21} +} + +func (x *GetStoreRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetStoreResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Store *v1.Store `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` +} + +func (x *GetStoreResponse) Reset() { + *x = GetStoreResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStoreResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStoreResponse) ProtoMessage() {} + +func (x *GetStoreResponse) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStoreResponse.ProtoReflect.Descriptor instead. +func (*GetStoreResponse) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{22} +} + +func (x *GetStoreResponse) GetStore() *v1.Store { + if x != nil { + return x.Store + } + return nil +} + +type ListStoresRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Pagination *PaginationOptions `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *ListStoresRequest) Reset() { + *x = ListStoresRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStoresRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStoresRequest) ProtoMessage() {} + +func (x *ListStoresRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStoresRequest.ProtoReflect.Descriptor instead. +func (*ListStoresRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{23} +} + +func (x *ListStoresRequest) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + +func (x *ListStoresRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ListStoresRequest) GetPagination() *PaginationOptions { + if x != nil { + return x.Pagination + } + return nil +} + +type ListStoresResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Stores []*v1.Store `protobuf:"bytes,1,rep,name=stores,proto3" json:"stores,omitempty"` + ContinuationToken string `protobuf:"bytes,2,opt,name=continuation_token,json=continuationToken,proto3" json:"continuation_token,omitempty"` +} + +func (x *ListStoresResponse) Reset() { + *x = ListStoresResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStoresResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStoresResponse) ProtoMessage() {} + +func (x *ListStoresResponse) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStoresResponse.ProtoReflect.Descriptor instead. +func (*ListStoresResponse) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{24} +} + +func (x *ListStoresResponse) GetStores() []*v1.Store { + if x != nil { + return x.Stores + } + return nil +} + +func (x *ListStoresResponse) GetContinuationToken() string { + if x != nil { + return x.ContinuationToken + } + return "" +} + +type WriteAssertionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Store string `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` + ModelId string `protobuf:"bytes,2,opt,name=model_id,json=modelId,proto3" json:"model_id,omitempty"` + Assertions []*v1.Assertion `protobuf:"bytes,3,rep,name=assertions,proto3" json:"assertions,omitempty"` +} + +func (x *WriteAssertionsRequest) Reset() { + *x = WriteAssertionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteAssertionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteAssertionsRequest) ProtoMessage() {} + +func (x *WriteAssertionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteAssertionsRequest.ProtoReflect.Descriptor instead. +func (*WriteAssertionsRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{25} +} + +func (x *WriteAssertionsRequest) GetStore() string { + if x != nil { + return x.Store + } + return "" +} + +func (x *WriteAssertionsRequest) GetModelId() string { + if x != nil { + return x.ModelId + } + return "" +} + +func (x *WriteAssertionsRequest) GetAssertions() []*v1.Assertion { + if x != nil { + return x.Assertions + } + return nil +} + +type WriteAssertionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *WriteAssertionsResponse) Reset() { + *x = WriteAssertionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteAssertionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteAssertionsResponse) ProtoMessage() {} + +func (x *WriteAssertionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteAssertionsResponse.ProtoReflect.Descriptor instead. +func (*WriteAssertionsResponse) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{26} +} + +type ReadAssertionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Store string `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` + ModelId string `protobuf:"bytes,2,opt,name=model_id,json=modelId,proto3" json:"model_id,omitempty"` +} + +func (x *ReadAssertionsRequest) Reset() { + *x = ReadAssertionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadAssertionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadAssertionsRequest) ProtoMessage() {} + +func (x *ReadAssertionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadAssertionsRequest.ProtoReflect.Descriptor instead. +func (*ReadAssertionsRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{27} +} + +func (x *ReadAssertionsRequest) GetStore() string { + if x != nil { + return x.Store + } + return "" +} + +func (x *ReadAssertionsRequest) GetModelId() string { + if x != nil { + return x.ModelId + } + return "" +} + +type ReadAssertionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Assertions []*v1.Assertion `protobuf:"bytes,1,rep,name=assertions,proto3" json:"assertions,omitempty"` +} + +func (x *ReadAssertionsResponse) Reset() { + *x = ReadAssertionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadAssertionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadAssertionsResponse) ProtoMessage() {} + +func (x *ReadAssertionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadAssertionsResponse.ProtoReflect.Descriptor instead. +func (*ReadAssertionsResponse) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{28} +} + +func (x *ReadAssertionsResponse) GetAssertions() []*v1.Assertion { + if x != nil { + return x.Assertions + } + return nil +} + +type ReadChangesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Store string `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"` + Filter *ReadChangesFilter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + Pagination *PaginationOptions `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` + SortDesc bool `protobuf:"varint,4,opt,name=sort_desc,json=sortDesc,proto3" json:"sort_desc,omitempty"` +} + +func (x *ReadChangesRequest) Reset() { + *x = ReadChangesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadChangesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadChangesRequest) ProtoMessage() {} + +func (x *ReadChangesRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadChangesRequest.ProtoReflect.Descriptor instead. +func (*ReadChangesRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{29} +} + +func (x *ReadChangesRequest) GetStore() string { + if x != nil { + return x.Store + } + return "" +} + +func (x *ReadChangesRequest) GetFilter() *ReadChangesFilter { + if x != nil { + return x.Filter + } + return nil +} + +func (x *ReadChangesRequest) GetPagination() *PaginationOptions { + if x != nil { + return x.Pagination + } + return nil +} + +func (x *ReadChangesRequest) GetSortDesc() bool { + if x != nil { + return x.SortDesc + } + return false +} + +type ReadChangesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Changes []*v1.TupleChange `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes,omitempty"` + ContinuationToken string `protobuf:"bytes,2,opt,name=continuation_token,json=continuationToken,proto3" json:"continuation_token,omitempty"` +} + +func (x *ReadChangesResponse) Reset() { + *x = ReadChangesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadChangesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadChangesResponse) ProtoMessage() {} + +func (x *ReadChangesResponse) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadChangesResponse.ProtoReflect.Descriptor instead. +func (*ReadChangesResponse) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{30} +} + +func (x *ReadChangesResponse) GetChanges() []*v1.TupleChange { + if x != nil { + return x.Changes + } + return nil +} + +func (x *ReadChangesResponse) GetContinuationToken() string { + if x != nil { + return x.ContinuationToken + } + return "" +} + +type IsReadyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *IsReadyRequest) Reset() { + *x = IsReadyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsReadyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsReadyRequest) ProtoMessage() {} + +func (x *IsReadyRequest) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsReadyRequest.ProtoReflect.Descriptor instead. +func (*IsReadyRequest) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{31} +} + +type IsReadyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + IsReady bool `protobuf:"varint,2,opt,name=is_ready,json=isReady,proto3" json:"is_ready,omitempty"` +} + +func (x *IsReadyResponse) Reset() { + *x = IsReadyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsReadyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsReadyResponse) ProtoMessage() {} + +func (x *IsReadyResponse) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsReadyResponse.ProtoReflect.Descriptor instead. +func (*IsReadyResponse) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{32} +} + +func (x *IsReadyResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *IsReadyResponse) GetIsReady() bool { + if x != nil { + return x.IsReady + } + return false +} + +// ReadFilter specifies filter criteria for reading tuples. +// Empty strings act as wildcards (match any value). +type ReadFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // object filters by object ID. Empty string matches any object. + Object string `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` + // relation filters by relation name. Empty string matches any relation. + Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` + // user filters by user or userset. Empty string matches any user. + User string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` + // conditions filters by condition names. Empty list matches any condition. + // Can include empty string to match tuples without conditions. + Conditions []string `protobuf:"bytes,4,rep,name=conditions,proto3" json:"conditions,omitempty"` +} + +func (x *ReadFilter) Reset() { + *x = ReadFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadFilter) ProtoMessage() {} + +func (x *ReadFilter) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadFilter.ProtoReflect.Descriptor instead. +func (*ReadFilter) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{33} +} + +func (x *ReadFilter) GetObject() string { + if x != nil { + return x.Object + } + return "" +} + +func (x *ReadFilter) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + +func (x *ReadFilter) GetUser() string { + if x != nil { + return x.User + } + return "" +} + +func (x *ReadFilter) GetConditions() []string { + if x != nil { + return x.Conditions + } + return nil +} + +// ReadUsersetTuplesFilter specifies filter criteria for reading userset tuples. +type ReadUsersetTuplesFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // object is the object to query (required). + Object string `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` + // relation is the relation to query (required). + Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` + // allowed_user_type_restrictions filters results to only these user types. + // Empty list returns all userset tuples. + AllowedUserTypeRestrictions []*v1.RelationReference `protobuf:"bytes,3,rep,name=allowed_user_type_restrictions,json=allowedUserTypeRestrictions,proto3" json:"allowed_user_type_restrictions,omitempty"` + // conditions filters by condition names. + Conditions []string `protobuf:"bytes,4,rep,name=conditions,proto3" json:"conditions,omitempty"` +} + +func (x *ReadUsersetTuplesFilter) Reset() { + *x = ReadUsersetTuplesFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadUsersetTuplesFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadUsersetTuplesFilter) ProtoMessage() {} + +func (x *ReadUsersetTuplesFilter) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadUsersetTuplesFilter.ProtoReflect.Descriptor instead. +func (*ReadUsersetTuplesFilter) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{34} +} + +func (x *ReadUsersetTuplesFilter) GetObject() string { + if x != nil { + return x.Object + } + return "" +} + +func (x *ReadUsersetTuplesFilter) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + +func (x *ReadUsersetTuplesFilter) GetAllowedUserTypeRestrictions() []*v1.RelationReference { + if x != nil { + return x.AllowedUserTypeRestrictions + } + return nil +} + +func (x *ReadUsersetTuplesFilter) GetConditions() []string { + if x != nil { + return x.Conditions + } + return nil +} + +// ReadStartingWithUserFilter specifies criteria for reverse reads starting from users. +type ReadStartingWithUserFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // object_type is the type of objects to return (required). + ObjectType string `protobuf:"bytes,1,opt,name=object_type,json=objectType,proto3" json:"object_type,omitempty"` + // relation is the relation to check (required). + Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` + // user_filter specifies the users/usersets to start from (required). + UserFilter []*v1.ObjectRelation `protobuf:"bytes,3,rep,name=user_filter,json=userFilter,proto3" json:"user_filter,omitempty"` + // object_ids restricts results to specific object IDs. + // Empty list returns results for all objects. + // When provided, must be sorted in ascending order. + ObjectIds []string `protobuf:"bytes,4,rep,name=object_ids,json=objectIds,proto3" json:"object_ids,omitempty"` + // conditions filters by condition names. + Conditions []string `protobuf:"bytes,5,rep,name=conditions,proto3" json:"conditions,omitempty"` +} + +func (x *ReadStartingWithUserFilter) Reset() { + *x = ReadStartingWithUserFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadStartingWithUserFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadStartingWithUserFilter) ProtoMessage() {} + +func (x *ReadStartingWithUserFilter) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadStartingWithUserFilter.ProtoReflect.Descriptor instead. +func (*ReadStartingWithUserFilter) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{35} +} + +func (x *ReadStartingWithUserFilter) GetObjectType() string { + if x != nil { + return x.ObjectType + } + return "" +} + +func (x *ReadStartingWithUserFilter) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + +func (x *ReadStartingWithUserFilter) GetUserFilter() []*v1.ObjectRelation { + if x != nil { + return x.UserFilter + } + return nil +} + +func (x *ReadStartingWithUserFilter) GetObjectIds() []string { + if x != nil { + return x.ObjectIds + } + return nil +} + +func (x *ReadStartingWithUserFilter) GetConditions() []string { + if x != nil { + return x.Conditions + } + return nil +} + +// ReadChangesFilter specifies filter criteria for reading changelog entries. +type ReadChangesFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // object_type filters changes to a specific object type. + // Empty string returns changes for all object types. + ObjectType string `protobuf:"bytes,1,opt,name=object_type,json=objectType,proto3" json:"object_type,omitempty"` + // horizon_offset_ms specifies how far back to read changes (in milliseconds). + // Changes older than this offset are excluded. + HorizonOffsetMs int64 `protobuf:"varint,2,opt,name=horizon_offset_ms,json=horizonOffsetMs,proto3" json:"horizon_offset_ms,omitempty"` +} + +func (x *ReadChangesFilter) Reset() { + *x = ReadChangesFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadChangesFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadChangesFilter) ProtoMessage() {} + +func (x *ReadChangesFilter) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadChangesFilter.ProtoReflect.Descriptor instead. +func (*ReadChangesFilter) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{36} +} + +func (x *ReadChangesFilter) GetObjectType() string { + if x != nil { + return x.ObjectType + } + return "" +} + +func (x *ReadChangesFilter) GetHorizonOffsetMs() int64 { + if x != nil { + return x.HorizonOffsetMs + } + return 0 +} + +// PaginationOptions controls pagination behavior. +type PaginationOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // page_size is the maximum number of items to return per page. + // Must be greater than 0. Default is determined by the storage backend. + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // from is a continuation token from a previous response. + // Empty string starts from the beginning. + From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` +} + +func (x *PaginationOptions) Reset() { + *x = PaginationOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PaginationOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaginationOptions) ProtoMessage() {} + +func (x *PaginationOptions) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PaginationOptions.ProtoReflect.Descriptor instead. +func (*PaginationOptions) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{37} +} + +func (x *PaginationOptions) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *PaginationOptions) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +// ConsistencyOptions specifies the desired consistency level. +type ConsistencyOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // preference allows trading off between latency and consistency. + Preference v1.ConsistencyPreference `protobuf:"varint,1,opt,name=preference,proto3,enum=openfga.v1.ConsistencyPreference" json:"preference,omitempty"` +} + +func (x *ConsistencyOptions) Reset() { + *x = ConsistencyOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConsistencyOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConsistencyOptions) ProtoMessage() {} + +func (x *ConsistencyOptions) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConsistencyOptions.ProtoReflect.Descriptor instead. +func (*ConsistencyOptions) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{38} +} + +func (x *ConsistencyOptions) GetPreference() v1.ConsistencyPreference { + if x != nil { + return x.Preference + } + return v1.ConsistencyPreference(0) +} + +// TupleWriteOptions configures behavior for write operations. +type TupleWriteOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // on_missing_delete specifies behavior when deleting a non-existent tuple. + OnMissingDelete OnMissingDelete `protobuf:"varint,1,opt,name=on_missing_delete,json=onMissingDelete,proto3,enum=storage.v1beta1.OnMissingDelete" json:"on_missing_delete,omitempty"` + // on_duplicate_insert specifies behavior when inserting an existing tuple. + OnDuplicateInsert OnDuplicateInsert `protobuf:"varint,2,opt,name=on_duplicate_insert,json=onDuplicateInsert,proto3,enum=storage.v1beta1.OnDuplicateInsert" json:"on_duplicate_insert,omitempty"` +} + +func (x *TupleWriteOptions) Reset() { + *x = TupleWriteOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_storage_v1beta1_storage_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TupleWriteOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TupleWriteOptions) ProtoMessage() {} + +func (x *TupleWriteOptions) ProtoReflect() protoreflect.Message { + mi := &file_storage_v1beta1_storage_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TupleWriteOptions.ProtoReflect.Descriptor instead. +func (*TupleWriteOptions) Descriptor() ([]byte, []int) { + return file_storage_v1beta1_storage_proto_rawDescGZIP(), []int{39} +} + +func (x *TupleWriteOptions) GetOnMissingDelete() OnMissingDelete { + if x != nil { + return x.OnMissingDelete + } + return OnMissingDelete_ON_MISSING_DELETE_ERROR +} + +func (x *TupleWriteOptions) GetOnDuplicateInsert() OnDuplicateInsert { + if x != nil { + return x.OnDuplicateInsert + } + return OnDuplicateInsert_ON_DUPLICATE_INSERT_ERROR +} + +var File_storage_v1beta1_storage_proto protoreflect.FileDescriptor + +var file_storage_v1beta1_storage_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, + 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6f, + 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6f, 0x70, 0x65, 0x6e, + 0x66, 0x67, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, 0x76, 0x31, + 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, + 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9f, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, + 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, + 0x45, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x63, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x22, 0x37, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x22, + 0xe7, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x61, 0x64, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x42, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x45, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x63, 0x6f, + 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x22, 0x6c, 0x0a, 0x10, 0x52, 0x65, 0x61, + 0x64, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, + 0x06, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x52, 0x06, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, + 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xa8, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x61, 0x64, + 0x55, 0x73, 0x65, 0x72, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0b, 0x63, + 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x63, 0x79, 0x22, 0xb9, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x65, 0x74, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x40, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, + 0x73, 0x65, 0x74, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, + 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x22, 0x82, + 0x02, 0x0a, 0x1b, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x57, + 0x69, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x12, 0x43, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x69, 0x6e, 0x67, 0x57, 0x69, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, + 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, + 0x12, 0x41, 0x0a, 0x1d, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x5f, 0x73, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x63, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x77, 0x69, 0x74, 0x68, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x41, 0x73, 0x63, 0x65, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x22, 0xc0, 0x01, 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x4b, 0x65, + 0x79, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x77, 0x72, + 0x69, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x4b, 0x65, 0x79, + 0x52, 0x06, 0x77, 0x72, 0x69, 0x74, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, + 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x0f, 0x0a, 0x0d, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x0a, 0x1d, 0x52, 0x65, 0x61, 0x64, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x56, + 0x0a, 0x1e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x34, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, + 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x7a, 0x0a, 0x1e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x42, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x88, 0x01, 0x0a, 0x1f, 0x52, 0x65, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x12, 0x2d, + 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, + 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x3b, 0x0a, + 0x23, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x5c, 0x0a, 0x24, 0x46, 0x69, + 0x6e, 0x64, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x6c, 0x0a, 0x1e, 0x57, 0x72, 0x69, 0x74, + 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x12, 0x34, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, + 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x21, 0x0a, 0x1f, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x0a, 0x12, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x27, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x3e, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x27, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x24, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x15, + 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3b, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x05, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x7d, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, + 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x42, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6e, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x06, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x80, 0x01, 0x0a, 0x16, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x73, + 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x49, 0x64, + 0x12, 0x35, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x73, 0x73, + 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x57, 0x72, 0x69, 0x74, 0x65, + 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x48, 0x0a, 0x15, 0x52, 0x65, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x4f, 0x0a, 0x16, + 0x52, 0x65, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xc7, 0x01, + 0x0a, 0x12, 0x52, 0x65, 0x61, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, + 0x64, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6f, + 0x72, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, + 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x22, 0x77, 0x0a, 0x13, 0x52, 0x65, 0x61, 0x64, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, + 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0x10, 0x0a, 0x0e, 0x49, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x46, 0x0a, 0x0f, 0x49, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x69, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x22, 0x74, 0x0a, 0x0a, 0x52, 0x65, + 0x61, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, + 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, + 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0xd1, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x62, 0x0a, 0x1e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, + 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x1b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, + 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd5, 0x01, 0x0a, 0x1a, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x69, 0x6e, 0x67, 0x57, 0x69, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1d, 0x0a, + 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x09, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x0a, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x60, 0x0a, 0x11, + 0x52, 0x65, 0x61, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x5f, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x6f, 0x6e, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x4d, 0x73, 0x22, 0x44, + 0x0a, 0x11, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x66, 0x72, 0x6f, 0x6d, 0x22, 0x57, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x63, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x0a, 0x70, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xb5, 0x01, + 0x0a, 0x11, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x4c, 0x0a, 0x11, 0x6f, 0x6e, 0x5f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, + 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4f, 0x6e, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x0f, 0x6f, 0x6e, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x12, 0x52, 0x0a, 0x13, 0x6f, 0x6e, 0x5f, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4f, 0x6e, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x65, + 0x72, 0x74, 0x52, 0x11, 0x6f, 0x6e, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x49, + 0x6e, 0x73, 0x65, 0x72, 0x74, 0x2a, 0x4c, 0x0a, 0x0f, 0x4f, 0x6e, 0x4d, 0x69, 0x73, 0x73, 0x69, + 0x6e, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x4f, 0x4e, 0x5f, 0x4d, + 0x49, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x53, 0x53, + 0x49, 0x4e, 0x47, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x49, 0x47, 0x4e, 0x4f, 0x52, + 0x45, 0x10, 0x01, 0x2a, 0x52, 0x0a, 0x11, 0x4f, 0x6e, 0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x4e, 0x5f, 0x44, + 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x5f, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x4f, 0x4e, 0x5f, 0x44, 0x55, + 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x5f, 0x49, + 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x10, 0x01, 0x2a, 0xa0, 0x02, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x24, + 0x0a, 0x20, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, + 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x4c, 0x4c, 0x49, 0x53, 0x49, 0x4f, 0x4e, + 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x43, 0x4f, + 0x4e, 0x54, 0x49, 0x4e, 0x55, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, + 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x53, 0x54, + 0x41, 0x52, 0x54, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x04, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4e, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x50, 0x55, + 0x54, 0x10, 0x05, 0x12, 0x1c, 0x0a, 0x18, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4e, + 0x46, 0x4c, 0x49, 0x43, 0x54, 0x5f, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x10, + 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x4c, + 0x49, 0x43, 0x54, 0x5f, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x07, 0x12, + 0x1e, 0x0a, 0x1a, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, + 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, + 0x19, 0x0a, 0x15, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, + 0x48, 0x52, 0x4f, 0x54, 0x54, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x32, 0xe1, 0x0d, 0x0a, 0x0e, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x45, 0x0a, + 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, 0x1c, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x30, 0x01, 0x12, 0x4f, 0x0a, 0x08, 0x52, 0x65, 0x61, 0x64, 0x50, 0x61, 0x67, 0x65, + 0x12, 0x20, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x64, 0x55, 0x73, 0x65, + 0x72, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x25, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x55, 0x73, 0x65, + 0x72, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x11, + 0x52, 0x65, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x12, 0x29, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, + 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x65, 0x0a, + 0x14, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x57, 0x69, 0x74, + 0x68, 0x55, 0x73, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x69, 0x6e, 0x67, 0x57, 0x69, 0x74, 0x68, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x30, 0x01, 0x12, 0x46, 0x0a, 0x05, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x1d, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, + 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x16, + 0x52, 0x65, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x2e, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x64, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x73, 0x12, 0x2f, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x1c, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x34, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x4c, 0x61, 0x74, + 0x65, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, + 0x69, 0x6e, 0x64, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x17, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x2f, + 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x30, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x58, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x65, + 0x12, 0x23, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, + 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0b, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x23, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x24, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x12, 0x20, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, + 0x6f, 0x72, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, + 0x0f, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x27, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, + 0x65, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x72, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, + 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x52, 0x65, 0x61, 0x64, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x61, + 0x64, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4c, 0x0a, 0x07, 0x49, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x1f, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x73, + 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, + 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xbd, + 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0f, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1b, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_storage_v1beta1_storage_proto_rawDescOnce sync.Once + file_storage_v1beta1_storage_proto_rawDescData = file_storage_v1beta1_storage_proto_rawDesc +) + +func file_storage_v1beta1_storage_proto_rawDescGZIP() []byte { + file_storage_v1beta1_storage_proto_rawDescOnce.Do(func() { + file_storage_v1beta1_storage_proto_rawDescData = protoimpl.X.CompressGZIP(file_storage_v1beta1_storage_proto_rawDescData) + }) + return file_storage_v1beta1_storage_proto_rawDescData +} + +var file_storage_v1beta1_storage_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_storage_v1beta1_storage_proto_msgTypes = make([]protoimpl.MessageInfo, 40) +var file_storage_v1beta1_storage_proto_goTypes = []interface{}{ + (OnMissingDelete)(0), // 0: storage.v1beta1.OnMissingDelete + (OnDuplicateInsert)(0), // 1: storage.v1beta1.OnDuplicateInsert + (StorageErrorReason)(0), // 2: storage.v1beta1.StorageErrorReason + (*ReadRequest)(nil), // 3: storage.v1beta1.ReadRequest + (*ReadResponse)(nil), // 4: storage.v1beta1.ReadResponse + (*ReadPageRequest)(nil), // 5: storage.v1beta1.ReadPageRequest + (*ReadPageResponse)(nil), // 6: storage.v1beta1.ReadPageResponse + (*ReadUserTupleRequest)(nil), // 7: storage.v1beta1.ReadUserTupleRequest + (*ReadUsersetTuplesRequest)(nil), // 8: storage.v1beta1.ReadUsersetTuplesRequest + (*ReadStartingWithUserRequest)(nil), // 9: storage.v1beta1.ReadStartingWithUserRequest + (*WriteRequest)(nil), // 10: storage.v1beta1.WriteRequest + (*WriteResponse)(nil), // 11: storage.v1beta1.WriteResponse + (*ReadAuthorizationModelRequest)(nil), // 12: storage.v1beta1.ReadAuthorizationModelRequest + (*ReadAuthorizationModelResponse)(nil), // 13: storage.v1beta1.ReadAuthorizationModelResponse + (*ReadAuthorizationModelsRequest)(nil), // 14: storage.v1beta1.ReadAuthorizationModelsRequest + (*ReadAuthorizationModelsResponse)(nil), // 15: storage.v1beta1.ReadAuthorizationModelsResponse + (*FindLatestAuthorizationModelRequest)(nil), // 16: storage.v1beta1.FindLatestAuthorizationModelRequest + (*FindLatestAuthorizationModelResponse)(nil), // 17: storage.v1beta1.FindLatestAuthorizationModelResponse + (*WriteAuthorizationModelRequest)(nil), // 18: storage.v1beta1.WriteAuthorizationModelRequest + (*WriteAuthorizationModelResponse)(nil), // 19: storage.v1beta1.WriteAuthorizationModelResponse + (*CreateStoreRequest)(nil), // 20: storage.v1beta1.CreateStoreRequest + (*CreateStoreResponse)(nil), // 21: storage.v1beta1.CreateStoreResponse + (*DeleteStoreRequest)(nil), // 22: storage.v1beta1.DeleteStoreRequest + (*DeleteStoreResponse)(nil), // 23: storage.v1beta1.DeleteStoreResponse + (*GetStoreRequest)(nil), // 24: storage.v1beta1.GetStoreRequest + (*GetStoreResponse)(nil), // 25: storage.v1beta1.GetStoreResponse + (*ListStoresRequest)(nil), // 26: storage.v1beta1.ListStoresRequest + (*ListStoresResponse)(nil), // 27: storage.v1beta1.ListStoresResponse + (*WriteAssertionsRequest)(nil), // 28: storage.v1beta1.WriteAssertionsRequest + (*WriteAssertionsResponse)(nil), // 29: storage.v1beta1.WriteAssertionsResponse + (*ReadAssertionsRequest)(nil), // 30: storage.v1beta1.ReadAssertionsRequest + (*ReadAssertionsResponse)(nil), // 31: storage.v1beta1.ReadAssertionsResponse + (*ReadChangesRequest)(nil), // 32: storage.v1beta1.ReadChangesRequest + (*ReadChangesResponse)(nil), // 33: storage.v1beta1.ReadChangesResponse + (*IsReadyRequest)(nil), // 34: storage.v1beta1.IsReadyRequest + (*IsReadyResponse)(nil), // 35: storage.v1beta1.IsReadyResponse + (*ReadFilter)(nil), // 36: storage.v1beta1.ReadFilter + (*ReadUsersetTuplesFilter)(nil), // 37: storage.v1beta1.ReadUsersetTuplesFilter + (*ReadStartingWithUserFilter)(nil), // 38: storage.v1beta1.ReadStartingWithUserFilter + (*ReadChangesFilter)(nil), // 39: storage.v1beta1.ReadChangesFilter + (*PaginationOptions)(nil), // 40: storage.v1beta1.PaginationOptions + (*ConsistencyOptions)(nil), // 41: storage.v1beta1.ConsistencyOptions + (*TupleWriteOptions)(nil), // 42: storage.v1beta1.TupleWriteOptions + (*v1.Tuple)(nil), // 43: openfga.v1.Tuple + (*v1.TupleKey)(nil), // 44: openfga.v1.TupleKey + (*v1.AuthorizationModel)(nil), // 45: openfga.v1.AuthorizationModel + (*v1.Store)(nil), // 46: openfga.v1.Store + (*v1.Assertion)(nil), // 47: openfga.v1.Assertion + (*v1.TupleChange)(nil), // 48: openfga.v1.TupleChange + (*v1.RelationReference)(nil), // 49: openfga.v1.RelationReference + (*v1.ObjectRelation)(nil), // 50: openfga.v1.ObjectRelation + (v1.ConsistencyPreference)(0), // 51: openfga.v1.ConsistencyPreference +} +var file_storage_v1beta1_storage_proto_depIdxs = []int32{ + 36, // 0: storage.v1beta1.ReadRequest.filter:type_name -> storage.v1beta1.ReadFilter + 41, // 1: storage.v1beta1.ReadRequest.consistency:type_name -> storage.v1beta1.ConsistencyOptions + 43, // 2: storage.v1beta1.ReadResponse.tuple:type_name -> openfga.v1.Tuple + 36, // 3: storage.v1beta1.ReadPageRequest.filter:type_name -> storage.v1beta1.ReadFilter + 40, // 4: storage.v1beta1.ReadPageRequest.pagination:type_name -> storage.v1beta1.PaginationOptions + 41, // 5: storage.v1beta1.ReadPageRequest.consistency:type_name -> storage.v1beta1.ConsistencyOptions + 43, // 6: storage.v1beta1.ReadPageResponse.tuples:type_name -> openfga.v1.Tuple + 36, // 7: storage.v1beta1.ReadUserTupleRequest.filter:type_name -> storage.v1beta1.ReadFilter + 41, // 8: storage.v1beta1.ReadUserTupleRequest.consistency:type_name -> storage.v1beta1.ConsistencyOptions + 37, // 9: storage.v1beta1.ReadUsersetTuplesRequest.filter:type_name -> storage.v1beta1.ReadUsersetTuplesFilter + 41, // 10: storage.v1beta1.ReadUsersetTuplesRequest.consistency:type_name -> storage.v1beta1.ConsistencyOptions + 38, // 11: storage.v1beta1.ReadStartingWithUserRequest.filter:type_name -> storage.v1beta1.ReadStartingWithUserFilter + 41, // 12: storage.v1beta1.ReadStartingWithUserRequest.consistency:type_name -> storage.v1beta1.ConsistencyOptions + 44, // 13: storage.v1beta1.WriteRequest.deletes:type_name -> openfga.v1.TupleKey + 44, // 14: storage.v1beta1.WriteRequest.writes:type_name -> openfga.v1.TupleKey + 42, // 15: storage.v1beta1.WriteRequest.options:type_name -> storage.v1beta1.TupleWriteOptions + 45, // 16: storage.v1beta1.ReadAuthorizationModelResponse.model:type_name -> openfga.v1.AuthorizationModel + 40, // 17: storage.v1beta1.ReadAuthorizationModelsRequest.pagination:type_name -> storage.v1beta1.PaginationOptions + 45, // 18: storage.v1beta1.ReadAuthorizationModelsResponse.models:type_name -> openfga.v1.AuthorizationModel + 45, // 19: storage.v1beta1.FindLatestAuthorizationModelResponse.model:type_name -> openfga.v1.AuthorizationModel + 45, // 20: storage.v1beta1.WriteAuthorizationModelRequest.model:type_name -> openfga.v1.AuthorizationModel + 46, // 21: storage.v1beta1.CreateStoreRequest.store:type_name -> openfga.v1.Store + 46, // 22: storage.v1beta1.CreateStoreResponse.store:type_name -> openfga.v1.Store + 46, // 23: storage.v1beta1.GetStoreResponse.store:type_name -> openfga.v1.Store + 40, // 24: storage.v1beta1.ListStoresRequest.pagination:type_name -> storage.v1beta1.PaginationOptions + 46, // 25: storage.v1beta1.ListStoresResponse.stores:type_name -> openfga.v1.Store + 47, // 26: storage.v1beta1.WriteAssertionsRequest.assertions:type_name -> openfga.v1.Assertion + 47, // 27: storage.v1beta1.ReadAssertionsResponse.assertions:type_name -> openfga.v1.Assertion + 39, // 28: storage.v1beta1.ReadChangesRequest.filter:type_name -> storage.v1beta1.ReadChangesFilter + 40, // 29: storage.v1beta1.ReadChangesRequest.pagination:type_name -> storage.v1beta1.PaginationOptions + 48, // 30: storage.v1beta1.ReadChangesResponse.changes:type_name -> openfga.v1.TupleChange + 49, // 31: storage.v1beta1.ReadUsersetTuplesFilter.allowed_user_type_restrictions:type_name -> openfga.v1.RelationReference + 50, // 32: storage.v1beta1.ReadStartingWithUserFilter.user_filter:type_name -> openfga.v1.ObjectRelation + 51, // 33: storage.v1beta1.ConsistencyOptions.preference:type_name -> openfga.v1.ConsistencyPreference + 0, // 34: storage.v1beta1.TupleWriteOptions.on_missing_delete:type_name -> storage.v1beta1.OnMissingDelete + 1, // 35: storage.v1beta1.TupleWriteOptions.on_duplicate_insert:type_name -> storage.v1beta1.OnDuplicateInsert + 3, // 36: storage.v1beta1.StorageService.Read:input_type -> storage.v1beta1.ReadRequest + 5, // 37: storage.v1beta1.StorageService.ReadPage:input_type -> storage.v1beta1.ReadPageRequest + 7, // 38: storage.v1beta1.StorageService.ReadUserTuple:input_type -> storage.v1beta1.ReadUserTupleRequest + 8, // 39: storage.v1beta1.StorageService.ReadUsersetTuples:input_type -> storage.v1beta1.ReadUsersetTuplesRequest + 9, // 40: storage.v1beta1.StorageService.ReadStartingWithUser:input_type -> storage.v1beta1.ReadStartingWithUserRequest + 10, // 41: storage.v1beta1.StorageService.Write:input_type -> storage.v1beta1.WriteRequest + 12, // 42: storage.v1beta1.StorageService.ReadAuthorizationModel:input_type -> storage.v1beta1.ReadAuthorizationModelRequest + 14, // 43: storage.v1beta1.StorageService.ReadAuthorizationModels:input_type -> storage.v1beta1.ReadAuthorizationModelsRequest + 16, // 44: storage.v1beta1.StorageService.FindLatestAuthorizationModel:input_type -> storage.v1beta1.FindLatestAuthorizationModelRequest + 18, // 45: storage.v1beta1.StorageService.WriteAuthorizationModel:input_type -> storage.v1beta1.WriteAuthorizationModelRequest + 20, // 46: storage.v1beta1.StorageService.CreateStore:input_type -> storage.v1beta1.CreateStoreRequest + 22, // 47: storage.v1beta1.StorageService.DeleteStore:input_type -> storage.v1beta1.DeleteStoreRequest + 24, // 48: storage.v1beta1.StorageService.GetStore:input_type -> storage.v1beta1.GetStoreRequest + 26, // 49: storage.v1beta1.StorageService.ListStores:input_type -> storage.v1beta1.ListStoresRequest + 28, // 50: storage.v1beta1.StorageService.WriteAssertions:input_type -> storage.v1beta1.WriteAssertionsRequest + 30, // 51: storage.v1beta1.StorageService.ReadAssertions:input_type -> storage.v1beta1.ReadAssertionsRequest + 32, // 52: storage.v1beta1.StorageService.ReadChanges:input_type -> storage.v1beta1.ReadChangesRequest + 34, // 53: storage.v1beta1.StorageService.IsReady:input_type -> storage.v1beta1.IsReadyRequest + 4, // 54: storage.v1beta1.StorageService.Read:output_type -> storage.v1beta1.ReadResponse + 6, // 55: storage.v1beta1.StorageService.ReadPage:output_type -> storage.v1beta1.ReadPageResponse + 4, // 56: storage.v1beta1.StorageService.ReadUserTuple:output_type -> storage.v1beta1.ReadResponse + 4, // 57: storage.v1beta1.StorageService.ReadUsersetTuples:output_type -> storage.v1beta1.ReadResponse + 4, // 58: storage.v1beta1.StorageService.ReadStartingWithUser:output_type -> storage.v1beta1.ReadResponse + 11, // 59: storage.v1beta1.StorageService.Write:output_type -> storage.v1beta1.WriteResponse + 13, // 60: storage.v1beta1.StorageService.ReadAuthorizationModel:output_type -> storage.v1beta1.ReadAuthorizationModelResponse + 15, // 61: storage.v1beta1.StorageService.ReadAuthorizationModels:output_type -> storage.v1beta1.ReadAuthorizationModelsResponse + 17, // 62: storage.v1beta1.StorageService.FindLatestAuthorizationModel:output_type -> storage.v1beta1.FindLatestAuthorizationModelResponse + 19, // 63: storage.v1beta1.StorageService.WriteAuthorizationModel:output_type -> storage.v1beta1.WriteAuthorizationModelResponse + 21, // 64: storage.v1beta1.StorageService.CreateStore:output_type -> storage.v1beta1.CreateStoreResponse + 23, // 65: storage.v1beta1.StorageService.DeleteStore:output_type -> storage.v1beta1.DeleteStoreResponse + 25, // 66: storage.v1beta1.StorageService.GetStore:output_type -> storage.v1beta1.GetStoreResponse + 27, // 67: storage.v1beta1.StorageService.ListStores:output_type -> storage.v1beta1.ListStoresResponse + 29, // 68: storage.v1beta1.StorageService.WriteAssertions:output_type -> storage.v1beta1.WriteAssertionsResponse + 31, // 69: storage.v1beta1.StorageService.ReadAssertions:output_type -> storage.v1beta1.ReadAssertionsResponse + 33, // 70: storage.v1beta1.StorageService.ReadChanges:output_type -> storage.v1beta1.ReadChangesResponse + 35, // 71: storage.v1beta1.StorageService.IsReady:output_type -> storage.v1beta1.IsReadyResponse + 54, // [54:72] is the sub-list for method output_type + 36, // [36:54] is the sub-list for method input_type + 36, // [36:36] is the sub-list for extension type_name + 36, // [36:36] is the sub-list for extension extendee + 0, // [0:36] is the sub-list for field type_name +} + +func init() { file_storage_v1beta1_storage_proto_init() } +func file_storage_v1beta1_storage_proto_init() { + if File_storage_v1beta1_storage_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_storage_v1beta1_storage_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadPageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadPageResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadUserTupleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadUsersetTuplesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadStartingWithUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadAuthorizationModelRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadAuthorizationModelResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadAuthorizationModelsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadAuthorizationModelsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindLatestAuthorizationModelRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FindLatestAuthorizationModelResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteAuthorizationModelRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteAuthorizationModelResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateStoreRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateStoreResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteStoreRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteStoreResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStoreRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStoreResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListStoresRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListStoresResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteAssertionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteAssertionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadAssertionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadAssertionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadChangesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadChangesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsReadyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsReadyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadUsersetTuplesFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadStartingWithUserFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadChangesFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PaginationOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConsistencyOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_storage_v1beta1_storage_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TupleWriteOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_storage_v1beta1_storage_proto_rawDesc, + NumEnums: 3, + NumMessages: 40, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_storage_v1beta1_storage_proto_goTypes, + DependencyIndexes: file_storage_v1beta1_storage_proto_depIdxs, + EnumInfos: file_storage_v1beta1_storage_proto_enumTypes, + MessageInfos: file_storage_v1beta1_storage_proto_msgTypes, + }.Build() + File_storage_v1beta1_storage_proto = out.File + file_storage_v1beta1_storage_proto_rawDesc = nil + file_storage_v1beta1_storage_proto_goTypes = nil + file_storage_v1beta1_storage_proto_depIdxs = nil +} diff --git a/proto/storage/v1beta1/storage.pb.validate.go b/proto/storage/v1beta1/storage.pb.validate.go new file mode 100644 index 0000000..a9abb51 --- /dev/null +++ b/proto/storage/v1beta1/storage.pb.validate.go @@ -0,0 +1,5196 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: storage/v1beta1/storage.proto + +package storagev1beta1 + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" + + openfgav1 "github.com/openfga/api/proto/openfga/v1" +) + +// 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 + + _ = openfgav1.ConsistencyPreference(0) +) + +// Validate checks the field values on ReadRequest 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 *ReadRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadRequest 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 ReadRequestMultiError, or +// nil if none found. +func (m *ReadRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Store + + if all { + switch v := interface{}(m.GetFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadRequestValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadRequestValidationError{ + 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 ReadRequestValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetConsistency()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadRequestValidationError{ + field: "Consistency", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadRequestValidationError{ + 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 ReadRequestValidationError{ + field: "Consistency", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ReadRequestMultiError(errors) + } + + return nil +} + +// ReadRequestMultiError is an error wrapping multiple validation errors +// returned by ReadRequest.ValidateAll() if the designated constraints aren't met. +type ReadRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadRequestMultiError) AllErrors() []error { return m } + +// ReadRequestValidationError is the validation error returned by +// ReadRequest.Validate if the designated constraints aren't met. +type ReadRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadRequestValidationError) ErrorName() string { return "ReadRequestValidationError" } + +// Error satisfies the builtin error interface +func (e ReadRequestValidationError) 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 %sReadRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadRequestValidationError{} + +// Validate checks the field values on ReadResponse 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 *ReadResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadResponse 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 ReadResponseMultiError, or +// nil if none found. +func (m *ReadResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetTuple()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadResponseValidationError{ + field: "Tuple", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadResponseValidationError{ + field: "Tuple", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTuple()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ReadResponseValidationError{ + field: "Tuple", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ReadResponseMultiError(errors) + } + + return nil +} + +// ReadResponseMultiError is an error wrapping multiple validation errors +// returned by ReadResponse.ValidateAll() if the designated constraints aren't met. +type ReadResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadResponseMultiError) AllErrors() []error { return m } + +// ReadResponseValidationError is the validation error returned by +// ReadResponse.Validate if the designated constraints aren't met. +type ReadResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadResponseValidationError) ErrorName() string { return "ReadResponseValidationError" } + +// Error satisfies the builtin error interface +func (e ReadResponseValidationError) 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 %sReadResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadResponseValidationError{} + +// Validate checks the field values on ReadPageRequest 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 *ReadPageRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadPageRequest 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 +// ReadPageRequestMultiError, or nil if none found. +func (m *ReadPageRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadPageRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Store + + if all { + switch v := interface{}(m.GetFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadPageRequestValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadPageRequestValidationError{ + 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 ReadPageRequestValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetPagination()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadPageRequestValidationError{ + field: "Pagination", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadPageRequestValidationError{ + field: "Pagination", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPagination()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ReadPageRequestValidationError{ + field: "Pagination", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetConsistency()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadPageRequestValidationError{ + field: "Consistency", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadPageRequestValidationError{ + 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 ReadPageRequestValidationError{ + field: "Consistency", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ReadPageRequestMultiError(errors) + } + + return nil +} + +// ReadPageRequestMultiError is an error wrapping multiple validation errors +// returned by ReadPageRequest.ValidateAll() if the designated constraints +// aren't met. +type ReadPageRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadPageRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadPageRequestMultiError) AllErrors() []error { return m } + +// ReadPageRequestValidationError is the validation error returned by +// ReadPageRequest.Validate if the designated constraints aren't met. +type ReadPageRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadPageRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadPageRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadPageRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadPageRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadPageRequestValidationError) ErrorName() string { return "ReadPageRequestValidationError" } + +// Error satisfies the builtin error interface +func (e ReadPageRequestValidationError) 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 %sReadPageRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadPageRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadPageRequestValidationError{} + +// Validate checks the field values on ReadPageResponse 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 *ReadPageResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadPageResponse 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 +// ReadPageResponseMultiError, or nil if none found. +func (m *ReadPageResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadPageResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetTuples() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadPageResponseValidationError{ + field: fmt.Sprintf("Tuples[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadPageResponseValidationError{ + field: fmt.Sprintf("Tuples[%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 ReadPageResponseValidationError{ + field: fmt.Sprintf("Tuples[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for ContinuationToken + + if len(errors) > 0 { + return ReadPageResponseMultiError(errors) + } + + return nil +} + +// ReadPageResponseMultiError is an error wrapping multiple validation errors +// returned by ReadPageResponse.ValidateAll() if the designated constraints +// aren't met. +type ReadPageResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadPageResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadPageResponseMultiError) AllErrors() []error { return m } + +// ReadPageResponseValidationError is the validation error returned by +// ReadPageResponse.Validate if the designated constraints aren't met. +type ReadPageResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadPageResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadPageResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadPageResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadPageResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadPageResponseValidationError) ErrorName() string { return "ReadPageResponseValidationError" } + +// Error satisfies the builtin error interface +func (e ReadPageResponseValidationError) 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 %sReadPageResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadPageResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadPageResponseValidationError{} + +// Validate checks the field values on ReadUserTupleRequest 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 *ReadUserTupleRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadUserTupleRequest 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 +// ReadUserTupleRequestMultiError, or nil if none found. +func (m *ReadUserTupleRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadUserTupleRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Store + + if all { + switch v := interface{}(m.GetFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadUserTupleRequestValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadUserTupleRequestValidationError{ + 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 ReadUserTupleRequestValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetConsistency()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadUserTupleRequestValidationError{ + field: "Consistency", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadUserTupleRequestValidationError{ + 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 ReadUserTupleRequestValidationError{ + field: "Consistency", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ReadUserTupleRequestMultiError(errors) + } + + return nil +} + +// ReadUserTupleRequestMultiError is an error wrapping multiple validation +// errors returned by ReadUserTupleRequest.ValidateAll() if the designated +// constraints aren't met. +type ReadUserTupleRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadUserTupleRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadUserTupleRequestMultiError) AllErrors() []error { return m } + +// ReadUserTupleRequestValidationError is the validation error returned by +// ReadUserTupleRequest.Validate if the designated constraints aren't met. +type ReadUserTupleRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadUserTupleRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadUserTupleRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadUserTupleRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadUserTupleRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadUserTupleRequestValidationError) ErrorName() string { + return "ReadUserTupleRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ReadUserTupleRequestValidationError) 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 %sReadUserTupleRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadUserTupleRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadUserTupleRequestValidationError{} + +// Validate checks the field values on ReadUsersetTuplesRequest 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 *ReadUsersetTuplesRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadUsersetTuplesRequest 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 +// ReadUsersetTuplesRequestMultiError, or nil if none found. +func (m *ReadUsersetTuplesRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadUsersetTuplesRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Store + + if all { + switch v := interface{}(m.GetFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadUsersetTuplesRequestValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadUsersetTuplesRequestValidationError{ + 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 ReadUsersetTuplesRequestValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetConsistency()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadUsersetTuplesRequestValidationError{ + field: "Consistency", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadUsersetTuplesRequestValidationError{ + 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 ReadUsersetTuplesRequestValidationError{ + field: "Consistency", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ReadUsersetTuplesRequestMultiError(errors) + } + + return nil +} + +// ReadUsersetTuplesRequestMultiError is an error wrapping multiple validation +// errors returned by ReadUsersetTuplesRequest.ValidateAll() if the designated +// constraints aren't met. +type ReadUsersetTuplesRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadUsersetTuplesRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadUsersetTuplesRequestMultiError) AllErrors() []error { return m } + +// ReadUsersetTuplesRequestValidationError is the validation error returned by +// ReadUsersetTuplesRequest.Validate if the designated constraints aren't met. +type ReadUsersetTuplesRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadUsersetTuplesRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadUsersetTuplesRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadUsersetTuplesRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadUsersetTuplesRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadUsersetTuplesRequestValidationError) ErrorName() string { + return "ReadUsersetTuplesRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ReadUsersetTuplesRequestValidationError) 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 %sReadUsersetTuplesRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadUsersetTuplesRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadUsersetTuplesRequestValidationError{} + +// Validate checks the field values on ReadStartingWithUserRequest 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 *ReadStartingWithUserRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadStartingWithUserRequest 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 +// ReadStartingWithUserRequestMultiError, or nil if none found. +func (m *ReadStartingWithUserRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadStartingWithUserRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Store + + if all { + switch v := interface{}(m.GetFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadStartingWithUserRequestValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadStartingWithUserRequestValidationError{ + 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 ReadStartingWithUserRequestValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetConsistency()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadStartingWithUserRequestValidationError{ + field: "Consistency", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadStartingWithUserRequestValidationError{ + 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 ReadStartingWithUserRequestValidationError{ + field: "Consistency", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for WithResultsSortedAscending + + if len(errors) > 0 { + return ReadStartingWithUserRequestMultiError(errors) + } + + return nil +} + +// ReadStartingWithUserRequestMultiError is an error wrapping multiple +// validation errors returned by ReadStartingWithUserRequest.ValidateAll() if +// the designated constraints aren't met. +type ReadStartingWithUserRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadStartingWithUserRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadStartingWithUserRequestMultiError) AllErrors() []error { return m } + +// ReadStartingWithUserRequestValidationError is the validation error returned +// by ReadStartingWithUserRequest.Validate if the designated constraints +// aren't met. +type ReadStartingWithUserRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadStartingWithUserRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadStartingWithUserRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadStartingWithUserRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadStartingWithUserRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadStartingWithUserRequestValidationError) ErrorName() string { + return "ReadStartingWithUserRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ReadStartingWithUserRequestValidationError) 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 %sReadStartingWithUserRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadStartingWithUserRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadStartingWithUserRequestValidationError{} + +// Validate checks the field values on WriteRequest 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 *WriteRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WriteRequest 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 WriteRequestMultiError, or +// nil if none found. +func (m *WriteRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *WriteRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Store + + for idx, item := range m.GetDeletes() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WriteRequestValidationError{ + field: fmt.Sprintf("Deletes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WriteRequestValidationError{ + field: fmt.Sprintf("Deletes[%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 WriteRequestValidationError{ + field: fmt.Sprintf("Deletes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetWrites() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WriteRequestValidationError{ + field: fmt.Sprintf("Writes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WriteRequestValidationError{ + field: fmt.Sprintf("Writes[%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 WriteRequestValidationError{ + field: fmt.Sprintf("Writes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetOptions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WriteRequestValidationError{ + field: "Options", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WriteRequestValidationError{ + field: "Options", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOptions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return WriteRequestValidationError{ + field: "Options", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return WriteRequestMultiError(errors) + } + + return nil +} + +// WriteRequestMultiError is an error wrapping multiple validation errors +// returned by WriteRequest.ValidateAll() if the designated constraints aren't met. +type WriteRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WriteRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WriteRequestMultiError) AllErrors() []error { return m } + +// WriteRequestValidationError is the validation error returned by +// WriteRequest.Validate if the designated constraints aren't met. +type WriteRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WriteRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WriteRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WriteRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WriteRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WriteRequestValidationError) ErrorName() string { return "WriteRequestValidationError" } + +// Error satisfies the builtin error interface +func (e WriteRequestValidationError) 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 %sWriteRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WriteRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WriteRequestValidationError{} + +// Validate checks the field values on WriteResponse 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 *WriteResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WriteResponse 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 WriteResponseMultiError, or +// nil if none found. +func (m *WriteResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *WriteResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return WriteResponseMultiError(errors) + } + + return nil +} + +// WriteResponseMultiError is an error wrapping multiple validation errors +// returned by WriteResponse.ValidateAll() if the designated constraints +// aren't met. +type WriteResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WriteResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WriteResponseMultiError) AllErrors() []error { return m } + +// WriteResponseValidationError is the validation error returned by +// WriteResponse.Validate if the designated constraints aren't met. +type WriteResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WriteResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WriteResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WriteResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WriteResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WriteResponseValidationError) ErrorName() string { return "WriteResponseValidationError" } + +// Error satisfies the builtin error interface +func (e WriteResponseValidationError) 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 %sWriteResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WriteResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WriteResponseValidationError{} + +// Validate checks the field values on ReadAuthorizationModelRequest 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 *ReadAuthorizationModelRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadAuthorizationModelRequest 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 +// ReadAuthorizationModelRequestMultiError, or nil if none found. +func (m *ReadAuthorizationModelRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadAuthorizationModelRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Store + + // no validation rules for Id + + if len(errors) > 0 { + return ReadAuthorizationModelRequestMultiError(errors) + } + + return nil +} + +// ReadAuthorizationModelRequestMultiError is an error wrapping multiple +// validation errors returned by ReadAuthorizationModelRequest.ValidateAll() +// if the designated constraints aren't met. +type ReadAuthorizationModelRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadAuthorizationModelRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadAuthorizationModelRequestMultiError) AllErrors() []error { return m } + +// ReadAuthorizationModelRequestValidationError is the validation error +// returned by ReadAuthorizationModelRequest.Validate if the designated +// constraints aren't met. +type ReadAuthorizationModelRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadAuthorizationModelRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadAuthorizationModelRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadAuthorizationModelRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadAuthorizationModelRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadAuthorizationModelRequestValidationError) ErrorName() string { + return "ReadAuthorizationModelRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ReadAuthorizationModelRequestValidationError) 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 %sReadAuthorizationModelRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadAuthorizationModelRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadAuthorizationModelRequestValidationError{} + +// Validate checks the field values on ReadAuthorizationModelResponse 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 *ReadAuthorizationModelResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadAuthorizationModelResponse 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 +// ReadAuthorizationModelResponseMultiError, or nil if none found. +func (m *ReadAuthorizationModelResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadAuthorizationModelResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetModel()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadAuthorizationModelResponseValidationError{ + field: "Model", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadAuthorizationModelResponseValidationError{ + field: "Model", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetModel()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ReadAuthorizationModelResponseValidationError{ + field: "Model", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ReadAuthorizationModelResponseMultiError(errors) + } + + return nil +} + +// ReadAuthorizationModelResponseMultiError is an error wrapping multiple +// validation errors returned by ReadAuthorizationModelResponse.ValidateAll() +// if the designated constraints aren't met. +type ReadAuthorizationModelResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadAuthorizationModelResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadAuthorizationModelResponseMultiError) AllErrors() []error { return m } + +// ReadAuthorizationModelResponseValidationError is the validation error +// returned by ReadAuthorizationModelResponse.Validate if the designated +// constraints aren't met. +type ReadAuthorizationModelResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadAuthorizationModelResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadAuthorizationModelResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadAuthorizationModelResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadAuthorizationModelResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadAuthorizationModelResponseValidationError) ErrorName() string { + return "ReadAuthorizationModelResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ReadAuthorizationModelResponseValidationError) 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 %sReadAuthorizationModelResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadAuthorizationModelResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadAuthorizationModelResponseValidationError{} + +// Validate checks the field values on ReadAuthorizationModelsRequest 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 *ReadAuthorizationModelsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadAuthorizationModelsRequest 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 +// ReadAuthorizationModelsRequestMultiError, or nil if none found. +func (m *ReadAuthorizationModelsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadAuthorizationModelsRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Store + + if all { + switch v := interface{}(m.GetPagination()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadAuthorizationModelsRequestValidationError{ + field: "Pagination", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadAuthorizationModelsRequestValidationError{ + field: "Pagination", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPagination()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ReadAuthorizationModelsRequestValidationError{ + field: "Pagination", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ReadAuthorizationModelsRequestMultiError(errors) + } + + return nil +} + +// ReadAuthorizationModelsRequestMultiError is an error wrapping multiple +// validation errors returned by ReadAuthorizationModelsRequest.ValidateAll() +// if the designated constraints aren't met. +type ReadAuthorizationModelsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadAuthorizationModelsRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadAuthorizationModelsRequestMultiError) AllErrors() []error { return m } + +// ReadAuthorizationModelsRequestValidationError is the validation error +// returned by ReadAuthorizationModelsRequest.Validate if the designated +// constraints aren't met. +type ReadAuthorizationModelsRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadAuthorizationModelsRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadAuthorizationModelsRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadAuthorizationModelsRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadAuthorizationModelsRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadAuthorizationModelsRequestValidationError) ErrorName() string { + return "ReadAuthorizationModelsRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ReadAuthorizationModelsRequestValidationError) 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 %sReadAuthorizationModelsRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadAuthorizationModelsRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadAuthorizationModelsRequestValidationError{} + +// Validate checks the field values on ReadAuthorizationModelsResponse 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 *ReadAuthorizationModelsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadAuthorizationModelsResponse 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 +// ReadAuthorizationModelsResponseMultiError, or nil if none found. +func (m *ReadAuthorizationModelsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadAuthorizationModelsResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetModels() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadAuthorizationModelsResponseValidationError{ + field: fmt.Sprintf("Models[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadAuthorizationModelsResponseValidationError{ + field: fmt.Sprintf("Models[%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 ReadAuthorizationModelsResponseValidationError{ + field: fmt.Sprintf("Models[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for ContinuationToken + + if len(errors) > 0 { + return ReadAuthorizationModelsResponseMultiError(errors) + } + + return nil +} + +// ReadAuthorizationModelsResponseMultiError is an error wrapping multiple +// validation errors returned by ReadAuthorizationModelsResponse.ValidateAll() +// if the designated constraints aren't met. +type ReadAuthorizationModelsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadAuthorizationModelsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadAuthorizationModelsResponseMultiError) AllErrors() []error { return m } + +// ReadAuthorizationModelsResponseValidationError is the validation error +// returned by ReadAuthorizationModelsResponse.Validate if the designated +// constraints aren't met. +type ReadAuthorizationModelsResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadAuthorizationModelsResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadAuthorizationModelsResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadAuthorizationModelsResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadAuthorizationModelsResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadAuthorizationModelsResponseValidationError) ErrorName() string { + return "ReadAuthorizationModelsResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ReadAuthorizationModelsResponseValidationError) 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 %sReadAuthorizationModelsResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadAuthorizationModelsResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadAuthorizationModelsResponseValidationError{} + +// Validate checks the field values on FindLatestAuthorizationModelRequest 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 *FindLatestAuthorizationModelRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FindLatestAuthorizationModelRequest +// 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 +// FindLatestAuthorizationModelRequestMultiError, or nil if none found. +func (m *FindLatestAuthorizationModelRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *FindLatestAuthorizationModelRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Store + + if len(errors) > 0 { + return FindLatestAuthorizationModelRequestMultiError(errors) + } + + return nil +} + +// FindLatestAuthorizationModelRequestMultiError is an error wrapping multiple +// validation errors returned by +// FindLatestAuthorizationModelRequest.ValidateAll() if the designated +// constraints aren't met. +type FindLatestAuthorizationModelRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FindLatestAuthorizationModelRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FindLatestAuthorizationModelRequestMultiError) AllErrors() []error { return m } + +// FindLatestAuthorizationModelRequestValidationError is the validation error +// returned by FindLatestAuthorizationModelRequest.Validate if the designated +// constraints aren't met. +type FindLatestAuthorizationModelRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FindLatestAuthorizationModelRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FindLatestAuthorizationModelRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FindLatestAuthorizationModelRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FindLatestAuthorizationModelRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FindLatestAuthorizationModelRequestValidationError) ErrorName() string { + return "FindLatestAuthorizationModelRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e FindLatestAuthorizationModelRequestValidationError) 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 %sFindLatestAuthorizationModelRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FindLatestAuthorizationModelRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FindLatestAuthorizationModelRequestValidationError{} + +// Validate checks the field values on FindLatestAuthorizationModelResponse +// 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 *FindLatestAuthorizationModelResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FindLatestAuthorizationModelResponse +// 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 +// FindLatestAuthorizationModelResponseMultiError, or nil if none found. +func (m *FindLatestAuthorizationModelResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *FindLatestAuthorizationModelResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetModel()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FindLatestAuthorizationModelResponseValidationError{ + field: "Model", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FindLatestAuthorizationModelResponseValidationError{ + field: "Model", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetModel()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FindLatestAuthorizationModelResponseValidationError{ + field: "Model", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return FindLatestAuthorizationModelResponseMultiError(errors) + } + + return nil +} + +// FindLatestAuthorizationModelResponseMultiError is an error wrapping multiple +// validation errors returned by +// FindLatestAuthorizationModelResponse.ValidateAll() if the designated +// constraints aren't met. +type FindLatestAuthorizationModelResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FindLatestAuthorizationModelResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FindLatestAuthorizationModelResponseMultiError) AllErrors() []error { return m } + +// FindLatestAuthorizationModelResponseValidationError is the validation error +// returned by FindLatestAuthorizationModelResponse.Validate if the designated +// constraints aren't met. +type FindLatestAuthorizationModelResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FindLatestAuthorizationModelResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FindLatestAuthorizationModelResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FindLatestAuthorizationModelResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FindLatestAuthorizationModelResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FindLatestAuthorizationModelResponseValidationError) ErrorName() string { + return "FindLatestAuthorizationModelResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e FindLatestAuthorizationModelResponseValidationError) 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 %sFindLatestAuthorizationModelResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FindLatestAuthorizationModelResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FindLatestAuthorizationModelResponseValidationError{} + +// Validate checks the field values on WriteAuthorizationModelRequest 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 *WriteAuthorizationModelRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WriteAuthorizationModelRequest 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 +// WriteAuthorizationModelRequestMultiError, or nil if none found. +func (m *WriteAuthorizationModelRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *WriteAuthorizationModelRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Store + + if all { + switch v := interface{}(m.GetModel()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WriteAuthorizationModelRequestValidationError{ + field: "Model", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WriteAuthorizationModelRequestValidationError{ + field: "Model", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetModel()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return WriteAuthorizationModelRequestValidationError{ + field: "Model", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return WriteAuthorizationModelRequestMultiError(errors) + } + + return nil +} + +// WriteAuthorizationModelRequestMultiError is an error wrapping multiple +// validation errors returned by WriteAuthorizationModelRequest.ValidateAll() +// if the designated constraints aren't met. +type WriteAuthorizationModelRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WriteAuthorizationModelRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WriteAuthorizationModelRequestMultiError) AllErrors() []error { return m } + +// WriteAuthorizationModelRequestValidationError is the validation error +// returned by WriteAuthorizationModelRequest.Validate if the designated +// constraints aren't met. +type WriteAuthorizationModelRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WriteAuthorizationModelRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WriteAuthorizationModelRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WriteAuthorizationModelRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WriteAuthorizationModelRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WriteAuthorizationModelRequestValidationError) ErrorName() string { + return "WriteAuthorizationModelRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e WriteAuthorizationModelRequestValidationError) 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 %sWriteAuthorizationModelRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WriteAuthorizationModelRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WriteAuthorizationModelRequestValidationError{} + +// Validate checks the field values on WriteAuthorizationModelResponse 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 *WriteAuthorizationModelResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WriteAuthorizationModelResponse 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 +// WriteAuthorizationModelResponseMultiError, or nil if none found. +func (m *WriteAuthorizationModelResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *WriteAuthorizationModelResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return WriteAuthorizationModelResponseMultiError(errors) + } + + return nil +} + +// WriteAuthorizationModelResponseMultiError is an error wrapping multiple +// validation errors returned by WriteAuthorizationModelResponse.ValidateAll() +// if the designated constraints aren't met. +type WriteAuthorizationModelResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WriteAuthorizationModelResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WriteAuthorizationModelResponseMultiError) AllErrors() []error { return m } + +// WriteAuthorizationModelResponseValidationError is the validation error +// returned by WriteAuthorizationModelResponse.Validate if the designated +// constraints aren't met. +type WriteAuthorizationModelResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WriteAuthorizationModelResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WriteAuthorizationModelResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WriteAuthorizationModelResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WriteAuthorizationModelResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WriteAuthorizationModelResponseValidationError) ErrorName() string { + return "WriteAuthorizationModelResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e WriteAuthorizationModelResponseValidationError) 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 %sWriteAuthorizationModelResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WriteAuthorizationModelResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WriteAuthorizationModelResponseValidationError{} + +// Validate checks the field values on CreateStoreRequest 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 *CreateStoreRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CreateStoreRequest 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 +// CreateStoreRequestMultiError, or nil if none found. +func (m *CreateStoreRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *CreateStoreRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetStore()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CreateStoreRequestValidationError{ + field: "Store", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CreateStoreRequestValidationError{ + field: "Store", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStore()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CreateStoreRequestValidationError{ + field: "Store", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return CreateStoreRequestMultiError(errors) + } + + return nil +} + +// CreateStoreRequestMultiError is an error wrapping multiple validation errors +// returned by CreateStoreRequest.ValidateAll() if the designated constraints +// aren't met. +type CreateStoreRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CreateStoreRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CreateStoreRequestMultiError) AllErrors() []error { return m } + +// CreateStoreRequestValidationError is the validation error returned by +// CreateStoreRequest.Validate if the designated constraints aren't met. +type CreateStoreRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CreateStoreRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CreateStoreRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CreateStoreRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CreateStoreRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CreateStoreRequestValidationError) ErrorName() string { + return "CreateStoreRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e CreateStoreRequestValidationError) 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 %sCreateStoreRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CreateStoreRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CreateStoreRequestValidationError{} + +// Validate checks the field values on CreateStoreResponse 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 *CreateStoreResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CreateStoreResponse 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 +// CreateStoreResponseMultiError, or nil if none found. +func (m *CreateStoreResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *CreateStoreResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetStore()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CreateStoreResponseValidationError{ + field: "Store", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CreateStoreResponseValidationError{ + field: "Store", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStore()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CreateStoreResponseValidationError{ + field: "Store", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return CreateStoreResponseMultiError(errors) + } + + return nil +} + +// CreateStoreResponseMultiError is an error wrapping multiple validation +// errors returned by CreateStoreResponse.ValidateAll() if the designated +// constraints aren't met. +type CreateStoreResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CreateStoreResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CreateStoreResponseMultiError) AllErrors() []error { return m } + +// CreateStoreResponseValidationError is the validation error returned by +// CreateStoreResponse.Validate if the designated constraints aren't met. +type CreateStoreResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CreateStoreResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CreateStoreResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CreateStoreResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CreateStoreResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CreateStoreResponseValidationError) ErrorName() string { + return "CreateStoreResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e CreateStoreResponseValidationError) 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 %sCreateStoreResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CreateStoreResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CreateStoreResponseValidationError{} + +// Validate checks the field values on DeleteStoreRequest 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 *DeleteStoreRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DeleteStoreRequest 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 +// DeleteStoreRequestMultiError, or nil if none found. +func (m *DeleteStoreRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *DeleteStoreRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + if len(errors) > 0 { + return DeleteStoreRequestMultiError(errors) + } + + return nil +} + +// DeleteStoreRequestMultiError is an error wrapping multiple validation errors +// returned by DeleteStoreRequest.ValidateAll() if the designated constraints +// aren't met. +type DeleteStoreRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DeleteStoreRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DeleteStoreRequestMultiError) AllErrors() []error { return m } + +// DeleteStoreRequestValidationError is the validation error returned by +// DeleteStoreRequest.Validate if the designated constraints aren't met. +type DeleteStoreRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DeleteStoreRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DeleteStoreRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DeleteStoreRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DeleteStoreRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DeleteStoreRequestValidationError) ErrorName() string { + return "DeleteStoreRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e DeleteStoreRequestValidationError) 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 %sDeleteStoreRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DeleteStoreRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DeleteStoreRequestValidationError{} + +// Validate checks the field values on DeleteStoreResponse 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 *DeleteStoreResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DeleteStoreResponse 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 +// DeleteStoreResponseMultiError, or nil if none found. +func (m *DeleteStoreResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *DeleteStoreResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return DeleteStoreResponseMultiError(errors) + } + + return nil +} + +// DeleteStoreResponseMultiError is an error wrapping multiple validation +// errors returned by DeleteStoreResponse.ValidateAll() if the designated +// constraints aren't met. +type DeleteStoreResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DeleteStoreResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DeleteStoreResponseMultiError) AllErrors() []error { return m } + +// DeleteStoreResponseValidationError is the validation error returned by +// DeleteStoreResponse.Validate if the designated constraints aren't met. +type DeleteStoreResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DeleteStoreResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DeleteStoreResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DeleteStoreResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DeleteStoreResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DeleteStoreResponseValidationError) ErrorName() string { + return "DeleteStoreResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e DeleteStoreResponseValidationError) 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 %sDeleteStoreResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DeleteStoreResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DeleteStoreResponseValidationError{} + +// Validate checks the field values on GetStoreRequest 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 *GetStoreRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetStoreRequest 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 +// GetStoreRequestMultiError, or nil if none found. +func (m *GetStoreRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *GetStoreRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + if len(errors) > 0 { + return GetStoreRequestMultiError(errors) + } + + return nil +} + +// GetStoreRequestMultiError is an error wrapping multiple validation errors +// returned by GetStoreRequest.ValidateAll() if the designated constraints +// aren't met. +type GetStoreRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetStoreRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetStoreRequestMultiError) AllErrors() []error { return m } + +// GetStoreRequestValidationError is the validation error returned by +// GetStoreRequest.Validate if the designated constraints aren't met. +type GetStoreRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetStoreRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetStoreRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetStoreRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetStoreRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetStoreRequestValidationError) ErrorName() string { return "GetStoreRequestValidationError" } + +// Error satisfies the builtin error interface +func (e GetStoreRequestValidationError) 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 %sGetStoreRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetStoreRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetStoreRequestValidationError{} + +// Validate checks the field values on GetStoreResponse 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 *GetStoreResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetStoreResponse 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 +// GetStoreResponseMultiError, or nil if none found. +func (m *GetStoreResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *GetStoreResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetStore()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetStoreResponseValidationError{ + field: "Store", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetStoreResponseValidationError{ + field: "Store", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStore()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetStoreResponseValidationError{ + field: "Store", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return GetStoreResponseMultiError(errors) + } + + return nil +} + +// GetStoreResponseMultiError is an error wrapping multiple validation errors +// returned by GetStoreResponse.ValidateAll() if the designated constraints +// aren't met. +type GetStoreResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetStoreResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetStoreResponseMultiError) AllErrors() []error { return m } + +// GetStoreResponseValidationError is the validation error returned by +// GetStoreResponse.Validate if the designated constraints aren't met. +type GetStoreResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetStoreResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetStoreResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetStoreResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetStoreResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetStoreResponseValidationError) ErrorName() string { return "GetStoreResponseValidationError" } + +// Error satisfies the builtin error interface +func (e GetStoreResponseValidationError) 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 %sGetStoreResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetStoreResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetStoreResponseValidationError{} + +// Validate checks the field values on ListStoresRequest 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 *ListStoresRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListStoresRequest 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 +// ListStoresRequestMultiError, or nil if none found. +func (m *ListStoresRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ListStoresRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + if all { + switch v := interface{}(m.GetPagination()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListStoresRequestValidationError{ + field: "Pagination", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListStoresRequestValidationError{ + field: "Pagination", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPagination()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListStoresRequestValidationError{ + field: "Pagination", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ListStoresRequestMultiError(errors) + } + + return nil +} + +// ListStoresRequestMultiError is an error wrapping multiple validation errors +// returned by ListStoresRequest.ValidateAll() if the designated constraints +// aren't met. +type ListStoresRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListStoresRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListStoresRequestMultiError) AllErrors() []error { return m } + +// ListStoresRequestValidationError is the validation error returned by +// ListStoresRequest.Validate if the designated constraints aren't met. +type ListStoresRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListStoresRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListStoresRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListStoresRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListStoresRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListStoresRequestValidationError) ErrorName() string { + return "ListStoresRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ListStoresRequestValidationError) 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 %sListStoresRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListStoresRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListStoresRequestValidationError{} + +// Validate checks the field values on ListStoresResponse 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 *ListStoresResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListStoresResponse 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 +// ListStoresResponseMultiError, or nil if none found. +func (m *ListStoresResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ListStoresResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetStores() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListStoresResponseValidationError{ + field: fmt.Sprintf("Stores[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListStoresResponseValidationError{ + field: fmt.Sprintf("Stores[%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 ListStoresResponseValidationError{ + field: fmt.Sprintf("Stores[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for ContinuationToken + + if len(errors) > 0 { + return ListStoresResponseMultiError(errors) + } + + return nil +} + +// ListStoresResponseMultiError is an error wrapping multiple validation errors +// returned by ListStoresResponse.ValidateAll() if the designated constraints +// aren't met. +type ListStoresResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListStoresResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListStoresResponseMultiError) AllErrors() []error { return m } + +// ListStoresResponseValidationError is the validation error returned by +// ListStoresResponse.Validate if the designated constraints aren't met. +type ListStoresResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListStoresResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListStoresResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListStoresResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListStoresResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListStoresResponseValidationError) ErrorName() string { + return "ListStoresResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ListStoresResponseValidationError) 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 %sListStoresResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListStoresResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListStoresResponseValidationError{} + +// Validate checks the field values on WriteAssertionsRequest 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 *WriteAssertionsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WriteAssertionsRequest 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 +// WriteAssertionsRequestMultiError, or nil if none found. +func (m *WriteAssertionsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *WriteAssertionsRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Store + + // no validation rules for ModelId + + for idx, item := range m.GetAssertions() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, WriteAssertionsRequestValidationError{ + field: fmt.Sprintf("Assertions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, WriteAssertionsRequestValidationError{ + field: fmt.Sprintf("Assertions[%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 WriteAssertionsRequestValidationError{ + field: fmt.Sprintf("Assertions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return WriteAssertionsRequestMultiError(errors) + } + + return nil +} + +// WriteAssertionsRequestMultiError is an error wrapping multiple validation +// errors returned by WriteAssertionsRequest.ValidateAll() if the designated +// constraints aren't met. +type WriteAssertionsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WriteAssertionsRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WriteAssertionsRequestMultiError) AllErrors() []error { return m } + +// WriteAssertionsRequestValidationError is the validation error returned by +// WriteAssertionsRequest.Validate if the designated constraints aren't met. +type WriteAssertionsRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WriteAssertionsRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WriteAssertionsRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WriteAssertionsRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WriteAssertionsRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WriteAssertionsRequestValidationError) ErrorName() string { + return "WriteAssertionsRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e WriteAssertionsRequestValidationError) 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 %sWriteAssertionsRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WriteAssertionsRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WriteAssertionsRequestValidationError{} + +// Validate checks the field values on WriteAssertionsResponse 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 *WriteAssertionsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on WriteAssertionsResponse 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 +// WriteAssertionsResponseMultiError, or nil if none found. +func (m *WriteAssertionsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *WriteAssertionsResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return WriteAssertionsResponseMultiError(errors) + } + + return nil +} + +// WriteAssertionsResponseMultiError is an error wrapping multiple validation +// errors returned by WriteAssertionsResponse.ValidateAll() if the designated +// constraints aren't met. +type WriteAssertionsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m WriteAssertionsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m WriteAssertionsResponseMultiError) AllErrors() []error { return m } + +// WriteAssertionsResponseValidationError is the validation error returned by +// WriteAssertionsResponse.Validate if the designated constraints aren't met. +type WriteAssertionsResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e WriteAssertionsResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e WriteAssertionsResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e WriteAssertionsResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e WriteAssertionsResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e WriteAssertionsResponseValidationError) ErrorName() string { + return "WriteAssertionsResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e WriteAssertionsResponseValidationError) 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 %sWriteAssertionsResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = WriteAssertionsResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = WriteAssertionsResponseValidationError{} + +// Validate checks the field values on ReadAssertionsRequest 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 *ReadAssertionsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadAssertionsRequest 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 +// ReadAssertionsRequestMultiError, or nil if none found. +func (m *ReadAssertionsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadAssertionsRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Store + + // no validation rules for ModelId + + if len(errors) > 0 { + return ReadAssertionsRequestMultiError(errors) + } + + return nil +} + +// ReadAssertionsRequestMultiError is an error wrapping multiple validation +// errors returned by ReadAssertionsRequest.ValidateAll() if the designated +// constraints aren't met. +type ReadAssertionsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadAssertionsRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadAssertionsRequestMultiError) AllErrors() []error { return m } + +// ReadAssertionsRequestValidationError is the validation error returned by +// ReadAssertionsRequest.Validate if the designated constraints aren't met. +type ReadAssertionsRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadAssertionsRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadAssertionsRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadAssertionsRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadAssertionsRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadAssertionsRequestValidationError) ErrorName() string { + return "ReadAssertionsRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ReadAssertionsRequestValidationError) 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 %sReadAssertionsRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadAssertionsRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadAssertionsRequestValidationError{} + +// Validate checks the field values on ReadAssertionsResponse 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 *ReadAssertionsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadAssertionsResponse 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 +// ReadAssertionsResponseMultiError, or nil if none found. +func (m *ReadAssertionsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadAssertionsResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetAssertions() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadAssertionsResponseValidationError{ + field: fmt.Sprintf("Assertions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadAssertionsResponseValidationError{ + field: fmt.Sprintf("Assertions[%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 ReadAssertionsResponseValidationError{ + field: fmt.Sprintf("Assertions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ReadAssertionsResponseMultiError(errors) + } + + return nil +} + +// ReadAssertionsResponseMultiError is an error wrapping multiple validation +// errors returned by ReadAssertionsResponse.ValidateAll() if the designated +// constraints aren't met. +type ReadAssertionsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadAssertionsResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadAssertionsResponseMultiError) AllErrors() []error { return m } + +// ReadAssertionsResponseValidationError is the validation error returned by +// ReadAssertionsResponse.Validate if the designated constraints aren't met. +type ReadAssertionsResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadAssertionsResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadAssertionsResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadAssertionsResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadAssertionsResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadAssertionsResponseValidationError) ErrorName() string { + return "ReadAssertionsResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ReadAssertionsResponseValidationError) 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 %sReadAssertionsResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadAssertionsResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadAssertionsResponseValidationError{} + +// Validate checks the field values on ReadChangesRequest 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 *ReadChangesRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadChangesRequest 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 +// ReadChangesRequestMultiError, or nil if none found. +func (m *ReadChangesRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadChangesRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Store + + if all { + switch v := interface{}(m.GetFilter()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadChangesRequestValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadChangesRequestValidationError{ + 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 ReadChangesRequestValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetPagination()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadChangesRequestValidationError{ + field: "Pagination", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadChangesRequestValidationError{ + field: "Pagination", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPagination()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ReadChangesRequestValidationError{ + field: "Pagination", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for SortDesc + + if len(errors) > 0 { + return ReadChangesRequestMultiError(errors) + } + + return nil +} + +// ReadChangesRequestMultiError is an error wrapping multiple validation errors +// returned by ReadChangesRequest.ValidateAll() if the designated constraints +// aren't met. +type ReadChangesRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadChangesRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadChangesRequestMultiError) AllErrors() []error { return m } + +// ReadChangesRequestValidationError is the validation error returned by +// ReadChangesRequest.Validate if the designated constraints aren't met. +type ReadChangesRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadChangesRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadChangesRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadChangesRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadChangesRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadChangesRequestValidationError) ErrorName() string { + return "ReadChangesRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ReadChangesRequestValidationError) 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 %sReadChangesRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadChangesRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadChangesRequestValidationError{} + +// Validate checks the field values on ReadChangesResponse 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 *ReadChangesResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadChangesResponse 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 +// ReadChangesResponseMultiError, or nil if none found. +func (m *ReadChangesResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadChangesResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetChanges() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadChangesResponseValidationError{ + field: fmt.Sprintf("Changes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadChangesResponseValidationError{ + field: fmt.Sprintf("Changes[%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 ReadChangesResponseValidationError{ + field: fmt.Sprintf("Changes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for ContinuationToken + + if len(errors) > 0 { + return ReadChangesResponseMultiError(errors) + } + + return nil +} + +// ReadChangesResponseMultiError is an error wrapping multiple validation +// errors returned by ReadChangesResponse.ValidateAll() if the designated +// constraints aren't met. +type ReadChangesResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadChangesResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadChangesResponseMultiError) AllErrors() []error { return m } + +// ReadChangesResponseValidationError is the validation error returned by +// ReadChangesResponse.Validate if the designated constraints aren't met. +type ReadChangesResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadChangesResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadChangesResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadChangesResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadChangesResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadChangesResponseValidationError) ErrorName() string { + return "ReadChangesResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ReadChangesResponseValidationError) 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 %sReadChangesResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadChangesResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadChangesResponseValidationError{} + +// Validate checks the field values on IsReadyRequest 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 *IsReadyRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on IsReadyRequest 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 IsReadyRequestMultiError, +// or nil if none found. +func (m *IsReadyRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *IsReadyRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return IsReadyRequestMultiError(errors) + } + + return nil +} + +// IsReadyRequestMultiError is an error wrapping multiple validation errors +// returned by IsReadyRequest.ValidateAll() if the designated constraints +// aren't met. +type IsReadyRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m IsReadyRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m IsReadyRequestMultiError) AllErrors() []error { return m } + +// IsReadyRequestValidationError is the validation error returned by +// IsReadyRequest.Validate if the designated constraints aren't met. +type IsReadyRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e IsReadyRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e IsReadyRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e IsReadyRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e IsReadyRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e IsReadyRequestValidationError) ErrorName() string { return "IsReadyRequestValidationError" } + +// Error satisfies the builtin error interface +func (e IsReadyRequestValidationError) 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 %sIsReadyRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = IsReadyRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = IsReadyRequestValidationError{} + +// Validate checks the field values on IsReadyResponse 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 *IsReadyResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on IsReadyResponse 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 +// IsReadyResponseMultiError, or nil if none found. +func (m *IsReadyResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *IsReadyResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Message + + // no validation rules for IsReady + + if len(errors) > 0 { + return IsReadyResponseMultiError(errors) + } + + return nil +} + +// IsReadyResponseMultiError is an error wrapping multiple validation errors +// returned by IsReadyResponse.ValidateAll() if the designated constraints +// aren't met. +type IsReadyResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m IsReadyResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m IsReadyResponseMultiError) AllErrors() []error { return m } + +// IsReadyResponseValidationError is the validation error returned by +// IsReadyResponse.Validate if the designated constraints aren't met. +type IsReadyResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e IsReadyResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e IsReadyResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e IsReadyResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e IsReadyResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e IsReadyResponseValidationError) ErrorName() string { return "IsReadyResponseValidationError" } + +// Error satisfies the builtin error interface +func (e IsReadyResponseValidationError) 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 %sIsReadyResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = IsReadyResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = IsReadyResponseValidationError{} + +// Validate checks the field values on ReadFilter 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 *ReadFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadFilter 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 ReadFilterMultiError, or +// nil if none found. +func (m *ReadFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadFilter) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Object + + // no validation rules for Relation + + // no validation rules for User + + if len(errors) > 0 { + return ReadFilterMultiError(errors) + } + + return nil +} + +// ReadFilterMultiError is an error wrapping multiple validation errors +// returned by ReadFilter.ValidateAll() if the designated constraints aren't met. +type ReadFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadFilterMultiError) AllErrors() []error { return m } + +// ReadFilterValidationError is the validation error returned by +// ReadFilter.Validate if the designated constraints aren't met. +type ReadFilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadFilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadFilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadFilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadFilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadFilterValidationError) ErrorName() string { return "ReadFilterValidationError" } + +// Error satisfies the builtin error interface +func (e ReadFilterValidationError) 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 %sReadFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadFilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadFilterValidationError{} + +// Validate checks the field values on ReadUsersetTuplesFilter 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 *ReadUsersetTuplesFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadUsersetTuplesFilter 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 +// ReadUsersetTuplesFilterMultiError, or nil if none found. +func (m *ReadUsersetTuplesFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadUsersetTuplesFilter) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Object + + // no validation rules for Relation + + for idx, item := range m.GetAllowedUserTypeRestrictions() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadUsersetTuplesFilterValidationError{ + field: fmt.Sprintf("AllowedUserTypeRestrictions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadUsersetTuplesFilterValidationError{ + field: fmt.Sprintf("AllowedUserTypeRestrictions[%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 ReadUsersetTuplesFilterValidationError{ + field: fmt.Sprintf("AllowedUserTypeRestrictions[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ReadUsersetTuplesFilterMultiError(errors) + } + + return nil +} + +// ReadUsersetTuplesFilterMultiError is an error wrapping multiple validation +// errors returned by ReadUsersetTuplesFilter.ValidateAll() if the designated +// constraints aren't met. +type ReadUsersetTuplesFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadUsersetTuplesFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadUsersetTuplesFilterMultiError) AllErrors() []error { return m } + +// ReadUsersetTuplesFilterValidationError is the validation error returned by +// ReadUsersetTuplesFilter.Validate if the designated constraints aren't met. +type ReadUsersetTuplesFilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadUsersetTuplesFilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadUsersetTuplesFilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadUsersetTuplesFilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadUsersetTuplesFilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadUsersetTuplesFilterValidationError) ErrorName() string { + return "ReadUsersetTuplesFilterValidationError" +} + +// Error satisfies the builtin error interface +func (e ReadUsersetTuplesFilterValidationError) 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 %sReadUsersetTuplesFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadUsersetTuplesFilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadUsersetTuplesFilterValidationError{} + +// Validate checks the field values on ReadStartingWithUserFilter 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 *ReadStartingWithUserFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadStartingWithUserFilter 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 +// ReadStartingWithUserFilterMultiError, or nil if none found. +func (m *ReadStartingWithUserFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadStartingWithUserFilter) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ObjectType + + // no validation rules for Relation + + for idx, item := range m.GetUserFilter() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ReadStartingWithUserFilterValidationError{ + field: fmt.Sprintf("UserFilter[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ReadStartingWithUserFilterValidationError{ + field: fmt.Sprintf("UserFilter[%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 ReadStartingWithUserFilterValidationError{ + field: fmt.Sprintf("UserFilter[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ReadStartingWithUserFilterMultiError(errors) + } + + return nil +} + +// ReadStartingWithUserFilterMultiError is an error wrapping multiple +// validation errors returned by ReadStartingWithUserFilter.ValidateAll() if +// the designated constraints aren't met. +type ReadStartingWithUserFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadStartingWithUserFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadStartingWithUserFilterMultiError) AllErrors() []error { return m } + +// ReadStartingWithUserFilterValidationError is the validation error returned +// by ReadStartingWithUserFilter.Validate if the designated constraints aren't met. +type ReadStartingWithUserFilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadStartingWithUserFilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadStartingWithUserFilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadStartingWithUserFilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadStartingWithUserFilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadStartingWithUserFilterValidationError) ErrorName() string { + return "ReadStartingWithUserFilterValidationError" +} + +// Error satisfies the builtin error interface +func (e ReadStartingWithUserFilterValidationError) 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 %sReadStartingWithUserFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadStartingWithUserFilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadStartingWithUserFilterValidationError{} + +// Validate checks the field values on ReadChangesFilter 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 *ReadChangesFilter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ReadChangesFilter 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 +// ReadChangesFilterMultiError, or nil if none found. +func (m *ReadChangesFilter) ValidateAll() error { + return m.validate(true) +} + +func (m *ReadChangesFilter) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for ObjectType + + // no validation rules for HorizonOffsetMs + + if len(errors) > 0 { + return ReadChangesFilterMultiError(errors) + } + + return nil +} + +// ReadChangesFilterMultiError is an error wrapping multiple validation errors +// returned by ReadChangesFilter.ValidateAll() if the designated constraints +// aren't met. +type ReadChangesFilterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ReadChangesFilterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ReadChangesFilterMultiError) AllErrors() []error { return m } + +// ReadChangesFilterValidationError is the validation error returned by +// ReadChangesFilter.Validate if the designated constraints aren't met. +type ReadChangesFilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ReadChangesFilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ReadChangesFilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ReadChangesFilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ReadChangesFilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ReadChangesFilterValidationError) ErrorName() string { + return "ReadChangesFilterValidationError" +} + +// Error satisfies the builtin error interface +func (e ReadChangesFilterValidationError) 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 %sReadChangesFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ReadChangesFilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ReadChangesFilterValidationError{} + +// Validate checks the field values on PaginationOptions 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 *PaginationOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PaginationOptions 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 +// PaginationOptionsMultiError, or nil if none found. +func (m *PaginationOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *PaginationOptions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for PageSize + + // no validation rules for From + + if len(errors) > 0 { + return PaginationOptionsMultiError(errors) + } + + return nil +} + +// PaginationOptionsMultiError is an error wrapping multiple validation errors +// returned by PaginationOptions.ValidateAll() if the designated constraints +// aren't met. +type PaginationOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PaginationOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PaginationOptionsMultiError) AllErrors() []error { return m } + +// PaginationOptionsValidationError is the validation error returned by +// PaginationOptions.Validate if the designated constraints aren't met. +type PaginationOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PaginationOptionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PaginationOptionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PaginationOptionsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PaginationOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PaginationOptionsValidationError) ErrorName() string { + return "PaginationOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e PaginationOptionsValidationError) 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 %sPaginationOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PaginationOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PaginationOptionsValidationError{} + +// Validate checks the field values on ConsistencyOptions 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 *ConsistencyOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConsistencyOptions 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 +// ConsistencyOptionsMultiError, or nil if none found. +func (m *ConsistencyOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *ConsistencyOptions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Preference + + if len(errors) > 0 { + return ConsistencyOptionsMultiError(errors) + } + + return nil +} + +// ConsistencyOptionsMultiError is an error wrapping multiple validation errors +// returned by ConsistencyOptions.ValidateAll() if the designated constraints +// aren't met. +type ConsistencyOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConsistencyOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConsistencyOptionsMultiError) AllErrors() []error { return m } + +// ConsistencyOptionsValidationError is the validation error returned by +// ConsistencyOptions.Validate if the designated constraints aren't met. +type ConsistencyOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConsistencyOptionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConsistencyOptionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConsistencyOptionsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConsistencyOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConsistencyOptionsValidationError) ErrorName() string { + return "ConsistencyOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e ConsistencyOptionsValidationError) 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 %sConsistencyOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConsistencyOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConsistencyOptionsValidationError{} + +// Validate checks the field values on TupleWriteOptions 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 *TupleWriteOptions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TupleWriteOptions 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 +// TupleWriteOptionsMultiError, or nil if none found. +func (m *TupleWriteOptions) ValidateAll() error { + return m.validate(true) +} + +func (m *TupleWriteOptions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for OnMissingDelete + + // no validation rules for OnDuplicateInsert + + if len(errors) > 0 { + return TupleWriteOptionsMultiError(errors) + } + + return nil +} + +// TupleWriteOptionsMultiError is an error wrapping multiple validation errors +// returned by TupleWriteOptions.ValidateAll() if the designated constraints +// aren't met. +type TupleWriteOptionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TupleWriteOptionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TupleWriteOptionsMultiError) AllErrors() []error { return m } + +// TupleWriteOptionsValidationError is the validation error returned by +// TupleWriteOptions.Validate if the designated constraints aren't met. +type TupleWriteOptionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TupleWriteOptionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TupleWriteOptionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TupleWriteOptionsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TupleWriteOptionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TupleWriteOptionsValidationError) ErrorName() string { + return "TupleWriteOptionsValidationError" +} + +// Error satisfies the builtin error interface +func (e TupleWriteOptionsValidationError) 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 %sTupleWriteOptions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TupleWriteOptionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TupleWriteOptionsValidationError{} diff --git a/proto/storage/v1beta1/storage_grpc.pb.go b/proto/storage/v1beta1/storage_grpc.pb.go new file mode 100644 index 0000000..bf0ef19 --- /dev/null +++ b/proto/storage/v1beta1/storage_grpc.pb.go @@ -0,0 +1,870 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: storage/v1beta1/storage.proto + +package storagev1beta1 + +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.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + StorageService_Read_FullMethodName = "/storage.v1beta1.StorageService/Read" + StorageService_ReadPage_FullMethodName = "/storage.v1beta1.StorageService/ReadPage" + StorageService_ReadUserTuple_FullMethodName = "/storage.v1beta1.StorageService/ReadUserTuple" + StorageService_ReadUsersetTuples_FullMethodName = "/storage.v1beta1.StorageService/ReadUsersetTuples" + StorageService_ReadStartingWithUser_FullMethodName = "/storage.v1beta1.StorageService/ReadStartingWithUser" + StorageService_Write_FullMethodName = "/storage.v1beta1.StorageService/Write" + StorageService_ReadAuthorizationModel_FullMethodName = "/storage.v1beta1.StorageService/ReadAuthorizationModel" + StorageService_ReadAuthorizationModels_FullMethodName = "/storage.v1beta1.StorageService/ReadAuthorizationModels" + StorageService_FindLatestAuthorizationModel_FullMethodName = "/storage.v1beta1.StorageService/FindLatestAuthorizationModel" + StorageService_WriteAuthorizationModel_FullMethodName = "/storage.v1beta1.StorageService/WriteAuthorizationModel" + StorageService_CreateStore_FullMethodName = "/storage.v1beta1.StorageService/CreateStore" + StorageService_DeleteStore_FullMethodName = "/storage.v1beta1.StorageService/DeleteStore" + StorageService_GetStore_FullMethodName = "/storage.v1beta1.StorageService/GetStore" + StorageService_ListStores_FullMethodName = "/storage.v1beta1.StorageService/ListStores" + StorageService_WriteAssertions_FullMethodName = "/storage.v1beta1.StorageService/WriteAssertions" + StorageService_ReadAssertions_FullMethodName = "/storage.v1beta1.StorageService/ReadAssertions" + StorageService_ReadChanges_FullMethodName = "/storage.v1beta1.StorageService/ReadChanges" + StorageService_IsReady_FullMethodName = "/storage.v1beta1.StorageService/IsReady" +) + +// StorageServiceClient is the client API for StorageService 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 StorageServiceClient interface { + // Read streams tuples matching the provided filter. + // Returns an iterator over all matching tuples with no guaranteed order. + Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (StorageService_ReadClient, error) + // ReadPage returns a paginated list of tuples matching the filter. + // Use this when you need bounded result sets with continuation tokens. + ReadPage(ctx context.Context, in *ReadPageRequest, opts ...grpc.CallOption) (*ReadPageResponse, error) + // ReadUserTuple returns exactly one tuple matching the provided key. + // Returns NOT_FOUND error if no matching tuple exists. + ReadUserTuple(ctx context.Context, in *ReadUserTupleRequest, opts ...grpc.CallOption) (*ReadResponse, error) + // ReadUsersetTuples streams userset tuples for a specified object and relation. + // Can be filtered by allowed user type restrictions. + ReadUsersetTuples(ctx context.Context, in *ReadUsersetTuplesRequest, opts ...grpc.CallOption) (StorageService_ReadUsersetTuplesClient, error) + // ReadStartingWithUser performs a reverse read starting from user(s)/userset(s). + // Useful for finding all objects a user has access to. + ReadStartingWithUser(ctx context.Context, in *ReadStartingWithUserRequest, opts ...grpc.CallOption) (StorageService_ReadStartingWithUserClient, error) + // Write performs tuple write and delete operations atomically. + // All deletes are performed before writes. + Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) + // ReadAuthorizationModel retrieves a specific authorization model by ID. + ReadAuthorizationModel(ctx context.Context, in *ReadAuthorizationModelRequest, opts ...grpc.CallOption) (*ReadAuthorizationModelResponse, error) + // ReadAuthorizationModels returns all authorization models for a store. + // Models are returned in descending order (newest first). + ReadAuthorizationModels(ctx context.Context, in *ReadAuthorizationModelsRequest, opts ...grpc.CallOption) (*ReadAuthorizationModelsResponse, error) + // FindLatestAuthorizationModel returns the most recent authorization model for a store. + FindLatestAuthorizationModel(ctx context.Context, in *FindLatestAuthorizationModelRequest, opts ...grpc.CallOption) (*FindLatestAuthorizationModelResponse, error) + // WriteAuthorizationModel creates a new authorization model version. + WriteAuthorizationModel(ctx context.Context, in *WriteAuthorizationModelRequest, opts ...grpc.CallOption) (*WriteAuthorizationModelResponse, error) + // CreateStore creates a new OpenFGA store. + CreateStore(ctx context.Context, in *CreateStoreRequest, opts ...grpc.CallOption) (*CreateStoreResponse, error) + // DeleteStore deletes a store (soft delete). + DeleteStore(ctx context.Context, in *DeleteStoreRequest, opts ...grpc.CallOption) (*DeleteStoreResponse, error) + // GetStore retrieves a store by ID. + GetStore(ctx context.Context, in *GetStoreRequest, opts ...grpc.CallOption) (*GetStoreResponse, error) + // ListStores returns a paginated list of stores. + ListStores(ctx context.Context, in *ListStoresRequest, opts ...grpc.CallOption) (*ListStoresResponse, error) + // WriteAssertions writes test assertions for an authorization model. + WriteAssertions(ctx context.Context, in *WriteAssertionsRequest, opts ...grpc.CallOption) (*WriteAssertionsResponse, error) + // ReadAssertions retrieves assertions for a specific authorization model. + ReadAssertions(ctx context.Context, in *ReadAssertionsRequest, opts ...grpc.CallOption) (*ReadAssertionsResponse, error) + // ReadChanges returns tuple changes (writes and deletes) in chronological order. + ReadChanges(ctx context.Context, in *ReadChangesRequest, opts ...grpc.CallOption) (*ReadChangesResponse, error) + // IsReady checks if the storage backend is ready to accept requests. + IsReady(ctx context.Context, in *IsReadyRequest, opts ...grpc.CallOption) (*IsReadyResponse, error) +} + +type storageServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewStorageServiceClient(cc grpc.ClientConnInterface) StorageServiceClient { + return &storageServiceClient{cc} +} + +func (c *storageServiceClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (StorageService_ReadClient, error) { + stream, err := c.cc.NewStream(ctx, &StorageService_ServiceDesc.Streams[0], StorageService_Read_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &storageServiceReadClient{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 +} + +type StorageService_ReadClient interface { + Recv() (*ReadResponse, error) + grpc.ClientStream +} + +type storageServiceReadClient struct { + grpc.ClientStream +} + +func (x *storageServiceReadClient) Recv() (*ReadResponse, error) { + m := new(ReadResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *storageServiceClient) ReadPage(ctx context.Context, in *ReadPageRequest, opts ...grpc.CallOption) (*ReadPageResponse, error) { + out := new(ReadPageResponse) + err := c.cc.Invoke(ctx, StorageService_ReadPage_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageServiceClient) ReadUserTuple(ctx context.Context, in *ReadUserTupleRequest, opts ...grpc.CallOption) (*ReadResponse, error) { + out := new(ReadResponse) + err := c.cc.Invoke(ctx, StorageService_ReadUserTuple_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageServiceClient) ReadUsersetTuples(ctx context.Context, in *ReadUsersetTuplesRequest, opts ...grpc.CallOption) (StorageService_ReadUsersetTuplesClient, error) { + stream, err := c.cc.NewStream(ctx, &StorageService_ServiceDesc.Streams[1], StorageService_ReadUsersetTuples_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &storageServiceReadUsersetTuplesClient{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 +} + +type StorageService_ReadUsersetTuplesClient interface { + Recv() (*ReadResponse, error) + grpc.ClientStream +} + +type storageServiceReadUsersetTuplesClient struct { + grpc.ClientStream +} + +func (x *storageServiceReadUsersetTuplesClient) Recv() (*ReadResponse, error) { + m := new(ReadResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *storageServiceClient) ReadStartingWithUser(ctx context.Context, in *ReadStartingWithUserRequest, opts ...grpc.CallOption) (StorageService_ReadStartingWithUserClient, error) { + stream, err := c.cc.NewStream(ctx, &StorageService_ServiceDesc.Streams[2], StorageService_ReadStartingWithUser_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &storageServiceReadStartingWithUserClient{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 +} + +type StorageService_ReadStartingWithUserClient interface { + Recv() (*ReadResponse, error) + grpc.ClientStream +} + +type storageServiceReadStartingWithUserClient struct { + grpc.ClientStream +} + +func (x *storageServiceReadStartingWithUserClient) Recv() (*ReadResponse, error) { + m := new(ReadResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *storageServiceClient) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) { + out := new(WriteResponse) + err := c.cc.Invoke(ctx, StorageService_Write_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageServiceClient) ReadAuthorizationModel(ctx context.Context, in *ReadAuthorizationModelRequest, opts ...grpc.CallOption) (*ReadAuthorizationModelResponse, error) { + out := new(ReadAuthorizationModelResponse) + err := c.cc.Invoke(ctx, StorageService_ReadAuthorizationModel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageServiceClient) ReadAuthorizationModels(ctx context.Context, in *ReadAuthorizationModelsRequest, opts ...grpc.CallOption) (*ReadAuthorizationModelsResponse, error) { + out := new(ReadAuthorizationModelsResponse) + err := c.cc.Invoke(ctx, StorageService_ReadAuthorizationModels_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageServiceClient) FindLatestAuthorizationModel(ctx context.Context, in *FindLatestAuthorizationModelRequest, opts ...grpc.CallOption) (*FindLatestAuthorizationModelResponse, error) { + out := new(FindLatestAuthorizationModelResponse) + err := c.cc.Invoke(ctx, StorageService_FindLatestAuthorizationModel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageServiceClient) WriteAuthorizationModel(ctx context.Context, in *WriteAuthorizationModelRequest, opts ...grpc.CallOption) (*WriteAuthorizationModelResponse, error) { + out := new(WriteAuthorizationModelResponse) + err := c.cc.Invoke(ctx, StorageService_WriteAuthorizationModel_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageServiceClient) CreateStore(ctx context.Context, in *CreateStoreRequest, opts ...grpc.CallOption) (*CreateStoreResponse, error) { + out := new(CreateStoreResponse) + err := c.cc.Invoke(ctx, StorageService_CreateStore_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageServiceClient) DeleteStore(ctx context.Context, in *DeleteStoreRequest, opts ...grpc.CallOption) (*DeleteStoreResponse, error) { + out := new(DeleteStoreResponse) + err := c.cc.Invoke(ctx, StorageService_DeleteStore_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageServiceClient) GetStore(ctx context.Context, in *GetStoreRequest, opts ...grpc.CallOption) (*GetStoreResponse, error) { + out := new(GetStoreResponse) + err := c.cc.Invoke(ctx, StorageService_GetStore_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageServiceClient) ListStores(ctx context.Context, in *ListStoresRequest, opts ...grpc.CallOption) (*ListStoresResponse, error) { + out := new(ListStoresResponse) + err := c.cc.Invoke(ctx, StorageService_ListStores_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageServiceClient) WriteAssertions(ctx context.Context, in *WriteAssertionsRequest, opts ...grpc.CallOption) (*WriteAssertionsResponse, error) { + out := new(WriteAssertionsResponse) + err := c.cc.Invoke(ctx, StorageService_WriteAssertions_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageServiceClient) ReadAssertions(ctx context.Context, in *ReadAssertionsRequest, opts ...grpc.CallOption) (*ReadAssertionsResponse, error) { + out := new(ReadAssertionsResponse) + err := c.cc.Invoke(ctx, StorageService_ReadAssertions_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageServiceClient) ReadChanges(ctx context.Context, in *ReadChangesRequest, opts ...grpc.CallOption) (*ReadChangesResponse, error) { + out := new(ReadChangesResponse) + err := c.cc.Invoke(ctx, StorageService_ReadChanges_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storageServiceClient) IsReady(ctx context.Context, in *IsReadyRequest, opts ...grpc.CallOption) (*IsReadyResponse, error) { + out := new(IsReadyResponse) + err := c.cc.Invoke(ctx, StorageService_IsReady_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// StorageServiceServer is the server API for StorageService service. +// All implementations must embed UnimplementedStorageServiceServer +// for forward compatibility +type StorageServiceServer interface { + // Read streams tuples matching the provided filter. + // Returns an iterator over all matching tuples with no guaranteed order. + Read(*ReadRequest, StorageService_ReadServer) error + // ReadPage returns a paginated list of tuples matching the filter. + // Use this when you need bounded result sets with continuation tokens. + ReadPage(context.Context, *ReadPageRequest) (*ReadPageResponse, error) + // ReadUserTuple returns exactly one tuple matching the provided key. + // Returns NOT_FOUND error if no matching tuple exists. + ReadUserTuple(context.Context, *ReadUserTupleRequest) (*ReadResponse, error) + // ReadUsersetTuples streams userset tuples for a specified object and relation. + // Can be filtered by allowed user type restrictions. + ReadUsersetTuples(*ReadUsersetTuplesRequest, StorageService_ReadUsersetTuplesServer) error + // ReadStartingWithUser performs a reverse read starting from user(s)/userset(s). + // Useful for finding all objects a user has access to. + ReadStartingWithUser(*ReadStartingWithUserRequest, StorageService_ReadStartingWithUserServer) error + // Write performs tuple write and delete operations atomically. + // All deletes are performed before writes. + Write(context.Context, *WriteRequest) (*WriteResponse, error) + // ReadAuthorizationModel retrieves a specific authorization model by ID. + ReadAuthorizationModel(context.Context, *ReadAuthorizationModelRequest) (*ReadAuthorizationModelResponse, error) + // ReadAuthorizationModels returns all authorization models for a store. + // Models are returned in descending order (newest first). + ReadAuthorizationModels(context.Context, *ReadAuthorizationModelsRequest) (*ReadAuthorizationModelsResponse, error) + // FindLatestAuthorizationModel returns the most recent authorization model for a store. + FindLatestAuthorizationModel(context.Context, *FindLatestAuthorizationModelRequest) (*FindLatestAuthorizationModelResponse, error) + // WriteAuthorizationModel creates a new authorization model version. + WriteAuthorizationModel(context.Context, *WriteAuthorizationModelRequest) (*WriteAuthorizationModelResponse, error) + // CreateStore creates a new OpenFGA store. + CreateStore(context.Context, *CreateStoreRequest) (*CreateStoreResponse, error) + // DeleteStore deletes a store (soft delete). + DeleteStore(context.Context, *DeleteStoreRequest) (*DeleteStoreResponse, error) + // GetStore retrieves a store by ID. + GetStore(context.Context, *GetStoreRequest) (*GetStoreResponse, error) + // ListStores returns a paginated list of stores. + ListStores(context.Context, *ListStoresRequest) (*ListStoresResponse, error) + // WriteAssertions writes test assertions for an authorization model. + WriteAssertions(context.Context, *WriteAssertionsRequest) (*WriteAssertionsResponse, error) + // ReadAssertions retrieves assertions for a specific authorization model. + ReadAssertions(context.Context, *ReadAssertionsRequest) (*ReadAssertionsResponse, error) + // ReadChanges returns tuple changes (writes and deletes) in chronological order. + ReadChanges(context.Context, *ReadChangesRequest) (*ReadChangesResponse, error) + // IsReady checks if the storage backend is ready to accept requests. + IsReady(context.Context, *IsReadyRequest) (*IsReadyResponse, error) + mustEmbedUnimplementedStorageServiceServer() +} + +// UnimplementedStorageServiceServer must be embedded to have forward compatible implementations. +type UnimplementedStorageServiceServer struct { +} + +func (UnimplementedStorageServiceServer) Read(*ReadRequest, StorageService_ReadServer) error { + return status.Errorf(codes.Unimplemented, "method Read not implemented") +} +func (UnimplementedStorageServiceServer) ReadPage(context.Context, *ReadPageRequest) (*ReadPageResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReadPage not implemented") +} +func (UnimplementedStorageServiceServer) ReadUserTuple(context.Context, *ReadUserTupleRequest) (*ReadResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReadUserTuple not implemented") +} +func (UnimplementedStorageServiceServer) ReadUsersetTuples(*ReadUsersetTuplesRequest, StorageService_ReadUsersetTuplesServer) error { + return status.Errorf(codes.Unimplemented, "method ReadUsersetTuples not implemented") +} +func (UnimplementedStorageServiceServer) ReadStartingWithUser(*ReadStartingWithUserRequest, StorageService_ReadStartingWithUserServer) error { + return status.Errorf(codes.Unimplemented, "method ReadStartingWithUser not implemented") +} +func (UnimplementedStorageServiceServer) Write(context.Context, *WriteRequest) (*WriteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Write not implemented") +} +func (UnimplementedStorageServiceServer) ReadAuthorizationModel(context.Context, *ReadAuthorizationModelRequest) (*ReadAuthorizationModelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReadAuthorizationModel not implemented") +} +func (UnimplementedStorageServiceServer) ReadAuthorizationModels(context.Context, *ReadAuthorizationModelsRequest) (*ReadAuthorizationModelsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReadAuthorizationModels not implemented") +} +func (UnimplementedStorageServiceServer) FindLatestAuthorizationModel(context.Context, *FindLatestAuthorizationModelRequest) (*FindLatestAuthorizationModelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FindLatestAuthorizationModel not implemented") +} +func (UnimplementedStorageServiceServer) WriteAuthorizationModel(context.Context, *WriteAuthorizationModelRequest) (*WriteAuthorizationModelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WriteAuthorizationModel not implemented") +} +func (UnimplementedStorageServiceServer) CreateStore(context.Context, *CreateStoreRequest) (*CreateStoreResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateStore not implemented") +} +func (UnimplementedStorageServiceServer) DeleteStore(context.Context, *DeleteStoreRequest) (*DeleteStoreResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteStore not implemented") +} +func (UnimplementedStorageServiceServer) GetStore(context.Context, *GetStoreRequest) (*GetStoreResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStore not implemented") +} +func (UnimplementedStorageServiceServer) ListStores(context.Context, *ListStoresRequest) (*ListStoresResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListStores not implemented") +} +func (UnimplementedStorageServiceServer) WriteAssertions(context.Context, *WriteAssertionsRequest) (*WriteAssertionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WriteAssertions not implemented") +} +func (UnimplementedStorageServiceServer) ReadAssertions(context.Context, *ReadAssertionsRequest) (*ReadAssertionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReadAssertions not implemented") +} +func (UnimplementedStorageServiceServer) ReadChanges(context.Context, *ReadChangesRequest) (*ReadChangesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReadChanges not implemented") +} +func (UnimplementedStorageServiceServer) IsReady(context.Context, *IsReadyRequest) (*IsReadyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsReady not implemented") +} +func (UnimplementedStorageServiceServer) mustEmbedUnimplementedStorageServiceServer() {} + +// UnsafeStorageServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to StorageServiceServer will +// result in compilation errors. +type UnsafeStorageServiceServer interface { + mustEmbedUnimplementedStorageServiceServer() +} + +func RegisterStorageServiceServer(s grpc.ServiceRegistrar, srv StorageServiceServer) { + s.RegisterService(&StorageService_ServiceDesc, srv) +} + +func _StorageService_Read_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ReadRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(StorageServiceServer).Read(m, &storageServiceReadServer{stream}) +} + +type StorageService_ReadServer interface { + Send(*ReadResponse) error + grpc.ServerStream +} + +type storageServiceReadServer struct { + grpc.ServerStream +} + +func (x *storageServiceReadServer) Send(m *ReadResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _StorageService_ReadPage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadPageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServiceServer).ReadPage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StorageService_ReadPage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServiceServer).ReadPage(ctx, req.(*ReadPageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StorageService_ReadUserTuple_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadUserTupleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServiceServer).ReadUserTuple(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StorageService_ReadUserTuple_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServiceServer).ReadUserTuple(ctx, req.(*ReadUserTupleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StorageService_ReadUsersetTuples_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ReadUsersetTuplesRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(StorageServiceServer).ReadUsersetTuples(m, &storageServiceReadUsersetTuplesServer{stream}) +} + +type StorageService_ReadUsersetTuplesServer interface { + Send(*ReadResponse) error + grpc.ServerStream +} + +type storageServiceReadUsersetTuplesServer struct { + grpc.ServerStream +} + +func (x *storageServiceReadUsersetTuplesServer) Send(m *ReadResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _StorageService_ReadStartingWithUser_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ReadStartingWithUserRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(StorageServiceServer).ReadStartingWithUser(m, &storageServiceReadStartingWithUserServer{stream}) +} + +type StorageService_ReadStartingWithUserServer interface { + Send(*ReadResponse) error + grpc.ServerStream +} + +type storageServiceReadStartingWithUserServer struct { + grpc.ServerStream +} + +func (x *storageServiceReadStartingWithUserServer) Send(m *ReadResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _StorageService_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WriteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServiceServer).Write(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StorageService_Write_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServiceServer).Write(ctx, req.(*WriteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StorageService_ReadAuthorizationModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadAuthorizationModelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServiceServer).ReadAuthorizationModel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StorageService_ReadAuthorizationModel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServiceServer).ReadAuthorizationModel(ctx, req.(*ReadAuthorizationModelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StorageService_ReadAuthorizationModels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadAuthorizationModelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServiceServer).ReadAuthorizationModels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StorageService_ReadAuthorizationModels_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServiceServer).ReadAuthorizationModels(ctx, req.(*ReadAuthorizationModelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StorageService_FindLatestAuthorizationModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindLatestAuthorizationModelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServiceServer).FindLatestAuthorizationModel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StorageService_FindLatestAuthorizationModel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServiceServer).FindLatestAuthorizationModel(ctx, req.(*FindLatestAuthorizationModelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StorageService_WriteAuthorizationModel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WriteAuthorizationModelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServiceServer).WriteAuthorizationModel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StorageService_WriteAuthorizationModel_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServiceServer).WriteAuthorizationModel(ctx, req.(*WriteAuthorizationModelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StorageService_CreateStore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateStoreRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServiceServer).CreateStore(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StorageService_CreateStore_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServiceServer).CreateStore(ctx, req.(*CreateStoreRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StorageService_DeleteStore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteStoreRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServiceServer).DeleteStore(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StorageService_DeleteStore_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServiceServer).DeleteStore(ctx, req.(*DeleteStoreRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StorageService_GetStore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetStoreRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServiceServer).GetStore(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StorageService_GetStore_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServiceServer).GetStore(ctx, req.(*GetStoreRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StorageService_ListStores_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListStoresRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServiceServer).ListStores(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StorageService_ListStores_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServiceServer).ListStores(ctx, req.(*ListStoresRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StorageService_WriteAssertions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WriteAssertionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServiceServer).WriteAssertions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StorageService_WriteAssertions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServiceServer).WriteAssertions(ctx, req.(*WriteAssertionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StorageService_ReadAssertions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadAssertionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServiceServer).ReadAssertions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StorageService_ReadAssertions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServiceServer).ReadAssertions(ctx, req.(*ReadAssertionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StorageService_ReadChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadChangesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServiceServer).ReadChanges(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StorageService_ReadChanges_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServiceServer).ReadChanges(ctx, req.(*ReadChangesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StorageService_IsReady_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsReadyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StorageServiceServer).IsReady(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StorageService_IsReady_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StorageServiceServer).IsReady(ctx, req.(*IsReadyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// StorageService_ServiceDesc is the grpc.ServiceDesc for StorageService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var StorageService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "storage.v1beta1.StorageService", + HandlerType: (*StorageServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ReadPage", + Handler: _StorageService_ReadPage_Handler, + }, + { + MethodName: "ReadUserTuple", + Handler: _StorageService_ReadUserTuple_Handler, + }, + { + MethodName: "Write", + Handler: _StorageService_Write_Handler, + }, + { + MethodName: "ReadAuthorizationModel", + Handler: _StorageService_ReadAuthorizationModel_Handler, + }, + { + MethodName: "ReadAuthorizationModels", + Handler: _StorageService_ReadAuthorizationModels_Handler, + }, + { + MethodName: "FindLatestAuthorizationModel", + Handler: _StorageService_FindLatestAuthorizationModel_Handler, + }, + { + MethodName: "WriteAuthorizationModel", + Handler: _StorageService_WriteAuthorizationModel_Handler, + }, + { + MethodName: "CreateStore", + Handler: _StorageService_CreateStore_Handler, + }, + { + MethodName: "DeleteStore", + Handler: _StorageService_DeleteStore_Handler, + }, + { + MethodName: "GetStore", + Handler: _StorageService_GetStore_Handler, + }, + { + MethodName: "ListStores", + Handler: _StorageService_ListStores_Handler, + }, + { + MethodName: "WriteAssertions", + Handler: _StorageService_WriteAssertions_Handler, + }, + { + MethodName: "ReadAssertions", + Handler: _StorageService_ReadAssertions_Handler, + }, + { + MethodName: "ReadChanges", + Handler: _StorageService_ReadChanges_Handler, + }, + { + MethodName: "IsReady", + Handler: _StorageService_IsReady_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Read", + Handler: _StorageService_Read_Handler, + ServerStreams: true, + }, + { + StreamName: "ReadUsersetTuples", + Handler: _StorageService_ReadUsersetTuples_Handler, + ServerStreams: true, + }, + { + StreamName: "ReadStartingWithUser", + Handler: _StorageService_ReadStartingWithUser_Handler, + ServerStreams: true, + }, + }, + Metadata: "storage/v1beta1/storage.proto", +} diff --git a/storage/v1beta1/storage.proto b/storage/v1beta1/storage.proto new file mode 100644 index 0000000..cc90563 --- /dev/null +++ b/storage/v1beta1/storage.proto @@ -0,0 +1,382 @@ +syntax = "proto3"; + +package storage.v1beta1; + +import "google/api/visibility.proto"; +import "openfga/v1/authzmodel.proto"; +import "openfga/v1/openfga.proto"; +import "openfga/v1/openfga_service.proto"; +import "openfga/v1/openfga_service_consistency.proto"; + +// StorageService provides a gRPC interface for OpenFGA's storage backend. +// +// The service is organized into several groups: +// - Tuple operations: Read, ReadPage, ReadUserTuple, ReadUsersetTuples, ReadStartingWithUser, Write +// - Authorization model operations: ReadAuthorizationModel, ReadAuthorizationModels, FindLatestAuthorizationModel, WriteAuthorizationModel +// - Store operations: CreateStore, DeleteStore, GetStore, ListStores +// - Assertion operations: WriteAssertions, ReadAssertions +// - Changelog operations: ReadChanges +// - Service operations: IsReady +service StorageService { + // Read streams tuples matching the provided filter. + // Returns an iterator over all matching tuples with no guaranteed order. + rpc Read(ReadRequest) returns (stream ReadResponse); + + // ReadPage returns a paginated list of tuples matching the filter. + // Use this when you need bounded result sets with continuation tokens. + rpc ReadPage(ReadPageRequest) returns (ReadPageResponse); + + // ReadUserTuple returns exactly one tuple matching the provided key. + // Returns NOT_FOUND error if no matching tuple exists. + rpc ReadUserTuple(ReadUserTupleRequest) returns (ReadResponse); + + // ReadUsersetTuples streams userset tuples for a specified object and relation. + // Can be filtered by allowed user type restrictions. + rpc ReadUsersetTuples(ReadUsersetTuplesRequest) returns (stream ReadResponse); + + // ReadStartingWithUser performs a reverse read starting from user(s)/userset(s). + // Useful for finding all objects a user has access to. + rpc ReadStartingWithUser(ReadStartingWithUserRequest) returns (stream ReadResponse); + + // Write performs tuple write and delete operations atomically. + // All deletes are performed before writes. + rpc Write(WriteRequest) returns (WriteResponse); + + // ReadAuthorizationModel retrieves a specific authorization model by ID. + rpc ReadAuthorizationModel(ReadAuthorizationModelRequest) returns (ReadAuthorizationModelResponse); + + // ReadAuthorizationModels returns all authorization models for a store. + // Models are returned in descending order (newest first). + rpc ReadAuthorizationModels(ReadAuthorizationModelsRequest) returns (ReadAuthorizationModelsResponse); + + // FindLatestAuthorizationModel returns the most recent authorization model for a store. + rpc FindLatestAuthorizationModel(FindLatestAuthorizationModelRequest) returns (FindLatestAuthorizationModelResponse); + + // WriteAuthorizationModel creates a new authorization model version. + rpc WriteAuthorizationModel(WriteAuthorizationModelRequest) returns (WriteAuthorizationModelResponse); + + // CreateStore creates a new OpenFGA store. + rpc CreateStore(CreateStoreRequest) returns (CreateStoreResponse); + + // DeleteStore deletes a store (soft delete). + rpc DeleteStore(DeleteStoreRequest) returns (DeleteStoreResponse); + + // GetStore retrieves a store by ID. + rpc GetStore(GetStoreRequest) returns (GetStoreResponse); + + // ListStores returns a paginated list of stores. + rpc ListStores(ListStoresRequest) returns (ListStoresResponse); + + // WriteAssertions writes test assertions for an authorization model. + rpc WriteAssertions(WriteAssertionsRequest) returns (WriteAssertionsResponse); + + // ReadAssertions retrieves assertions for a specific authorization model. + rpc ReadAssertions(ReadAssertionsRequest) returns (ReadAssertionsResponse); + + // ReadChanges returns tuple changes (writes and deletes) in chronological order. + rpc ReadChanges(ReadChangesRequest) returns (ReadChangesResponse); + + // IsReady checks if the storage backend is ready to accept requests. + rpc IsReady(IsReadyRequest) returns (IsReadyResponse); +} + +message ReadRequest { + string store = 1; + ReadFilter filter = 2; + ConsistencyOptions consistency = 3; +} + +message ReadResponse { + openfga.v1.Tuple tuple = 1; +} + +message ReadPageRequest { + string store = 1; + ReadFilter filter = 2; + PaginationOptions pagination = 3; + ConsistencyOptions consistency = 4; +} + +message ReadPageResponse { + repeated openfga.v1.Tuple tuples = 1; + string continuation_token = 2; +} + +message ReadUserTupleRequest { + string store = 1; + ReadFilter filter = 2; + ConsistencyOptions consistency = 3; +} + +message ReadUsersetTuplesRequest { + string store = 1; + ReadUsersetTuplesFilter filter = 2; + ConsistencyOptions consistency = 3; +} + +message ReadStartingWithUserRequest { + string store = 1; + ReadStartingWithUserFilter filter = 2; + ConsistencyOptions consistency = 3; + bool with_results_sorted_ascending = 4; +} + +message WriteRequest { + string store = 1; + // deletes contains tuples to delete. The condition field is ignored for deletes; + // deletion matches on user, relation, and object only. + repeated openfga.v1.TupleKey deletes = 2; + repeated openfga.v1.TupleKey writes = 3; + TupleWriteOptions options = 4; +} + +message WriteResponse {} + +message ReadAuthorizationModelRequest { + string store = 1; + string id = 2; +} + +message ReadAuthorizationModelResponse { + openfga.v1.AuthorizationModel model = 1; +} + +message ReadAuthorizationModelsRequest { + string store = 1; + PaginationOptions pagination = 2; +} + +message ReadAuthorizationModelsResponse { + repeated openfga.v1.AuthorizationModel models = 1; + string continuation_token = 2; +} + +message FindLatestAuthorizationModelRequest { + string store = 1; +} + +message FindLatestAuthorizationModelResponse { + openfga.v1.AuthorizationModel model = 1; +} + +message WriteAuthorizationModelRequest { + string store = 1; + openfga.v1.AuthorizationModel model = 2; +} + +message WriteAuthorizationModelResponse {} + +message CreateStoreRequest { + openfga.v1.Store store = 1; +} + +message CreateStoreResponse { + openfga.v1.Store store = 1; +} + +message DeleteStoreRequest { + string id = 1; +} + +message DeleteStoreResponse {} + +message GetStoreRequest { + string id = 1; +} + +message GetStoreResponse { + openfga.v1.Store store = 1; +} + +message ListStoresRequest { + repeated string ids = 1; + string name = 2; + PaginationOptions pagination = 3; +} + +message ListStoresResponse { + repeated openfga.v1.Store stores = 1; + string continuation_token = 2; +} + +message WriteAssertionsRequest { + string store = 1; + string model_id = 2; + repeated openfga.v1.Assertion assertions = 3; +} + +message WriteAssertionsResponse {} + +message ReadAssertionsRequest { + string store = 1; + string model_id = 2; +} + +message ReadAssertionsResponse { + repeated openfga.v1.Assertion assertions = 1; +} + +message ReadChangesRequest { + string store = 1; + ReadChangesFilter filter = 2; + PaginationOptions pagination = 3; + bool sort_desc = 4; +} + +message ReadChangesResponse { + repeated openfga.v1.TupleChange changes = 1; + string continuation_token = 2; +} + +message IsReadyRequest {} + +message IsReadyResponse { + string message = 1; + bool is_ready = 2; +} + +// ReadFilter specifies filter criteria for reading tuples. +// Empty strings act as wildcards (match any value). +message ReadFilter { + // object filters by object ID. Empty string matches any object. + string object = 1; + // relation filters by relation name. Empty string matches any relation. + string relation = 2; + // user filters by user or userset. Empty string matches any user. + string user = 3; + // conditions filters by condition names. Empty list matches any condition. + // Can include empty string to match tuples without conditions. + repeated string conditions = 4; +} + +// ReadUsersetTuplesFilter specifies filter criteria for reading userset tuples. +message ReadUsersetTuplesFilter { + // object is the object to query (required). + string object = 1; + // relation is the relation to query (required). + string relation = 2; + // allowed_user_type_restrictions filters results to only these user types. + // Empty list returns all userset tuples. + repeated openfga.v1.RelationReference allowed_user_type_restrictions = 3; + // conditions filters by condition names. + repeated string conditions = 4; +} + +// ReadStartingWithUserFilter specifies criteria for reverse reads starting from users. +message ReadStartingWithUserFilter { + // object_type is the type of objects to return (required). + string object_type = 1; + // relation is the relation to check (required). + string relation = 2; + // user_filter specifies the users/usersets to start from (required). + repeated openfga.v1.ObjectRelation user_filter = 3; + // object_ids restricts results to specific object IDs. + // Empty list returns results for all objects. + // When provided, must be sorted in ascending order. + repeated string object_ids = 4; + // conditions filters by condition names. + repeated string conditions = 5; +} + +// ReadChangesFilter specifies filter criteria for reading changelog entries. +message ReadChangesFilter { + // object_type filters changes to a specific object type. + // Empty string returns changes for all object types. + string object_type = 1; + // horizon_offset_ms specifies how far back to read changes (in milliseconds). + // Changes older than this offset are excluded. + int64 horizon_offset_ms = 2; +} + +// PaginationOptions controls pagination behavior. +message PaginationOptions { + // page_size is the maximum number of items to return per page. + // Must be greater than 0. Default is determined by the storage backend. + int32 page_size = 1; + // from is a continuation token from a previous response. + // Empty string starts from the beginning. + string from = 2; +} + +// ConsistencyOptions specifies the desired consistency level. +message ConsistencyOptions { + // preference allows trading off between latency and consistency. + openfga.v1.ConsistencyPreference preference = 1; +} + +// TupleWriteOptions configures behavior for write operations. +message TupleWriteOptions { + // on_missing_delete specifies behavior when deleting a non-existent tuple. + OnMissingDelete on_missing_delete = 1; + // on_duplicate_insert specifies behavior when inserting an existing tuple. + OnDuplicateInsert on_duplicate_insert = 2; +} + +// OnMissingDelete specifies behavior when attempting to delete a non-existent tuple. +enum OnMissingDelete { + ON_MISSING_DELETE_ERROR = 0; // Return an error + ON_MISSING_DELETE_IGNORE = 1; // Silently ignore (no-op) +} + +// OnDuplicateInsert specifies behavior when attempting to insert an existing tuple. +enum OnDuplicateInsert { + ON_DUPLICATE_INSERT_ERROR = 0; // Return an error + ON_DUPLICATE_INSERT_IGNORE = 1; // Silently ignore (no-op) +} + +// StorageErrorReason provides standardized error reasons for gRPC error details. +// Server implementations MUST use these reason codes when returning errors via +// google.rpc.ErrorInfo.reason to enable proper error handling on the client side. +// +// These reasons are embedded in gRPC status error details (google.rpc.ErrorInfo) +// with domain "openfga.storage" to distinguish specific storage errors that map +// to the same gRPC status code. +// +// Example server usage: +// st := status.New(codes.NotFound, "tuple not found") +// st, _ = st.WithDetails(&errdetails.ErrorInfo{ +// Reason: storagev1.StorageErrorReason_NOT_FOUND.String(), +// Domain: "openfga.storage", +// }) +// return st.Err() +enum StorageErrorReason { + // STORAGE_ERROR_REASON_UNSPECIFIED is the default value and should not be used. + STORAGE_ERROR_REASON_UNSPECIFIED = 0; + + // NOT_FOUND is returned when the object does not exist. + // Maps to gRPC status code: NOT_FOUND + NOT_FOUND = 1; + + // COLLISION is returned when an item already exists within the store. + // Maps to gRPC status code: ALREADY_EXISTS + COLLISION = 2; + + // INVALID_CONTINUATION_TOKEN is returned when the continuation token is invalid. + // Maps to gRPC status code: INVALID_ARGUMENT + INVALID_CONTINUATION_TOKEN = 3; + + // INVALID_START_TIME is returned when start time param for ReadChanges API is invalid. + // Maps to gRPC status code: INVALID_ARGUMENT + INVALID_START_TIME = 4; + + // INVALID_WRITE_INPUT is returned when the tuple to be written already existed + // or the tuple to be deleted did not exist. + // Maps to gRPC status code: INVALID_ARGUMENT + INVALID_WRITE_INPUT = 5; + + // WRITE_CONFLICT_ON_INSERT is returned when two writes attempt to insert the same tuple at the same time. + // Maps to gRPC status code: ABORTED + WRITE_CONFLICT_ON_INSERT = 6; + + // WRITE_CONFLICT_ON_DELETE is returned when two writes attempt to delete the same tuple at the same time. + // Maps to gRPC status code: ABORTED + WRITE_CONFLICT_ON_DELETE = 7; + + // TRANSACTIONAL_WRITE_FAILED is returned when two writes attempt to write the same tuple at the same time. + // Maps to gRPC status code: ABORTED + TRANSACTIONAL_WRITE_FAILED = 8; + + // TRANSACTION_THROTTLED is returned when throttling is applied at the datastore level. + // Maps to gRPC status code: RESOURCE_EXHAUSTED + TRANSACTION_THROTTLED = 9; +}