From 0a21b433abcae7c5d78ec8f55734c6d79d17a7d7 Mon Sep 17 00:00:00 2001 From: Tolga Ozen Date: Tue, 12 Sep 2023 17:59:42 +0300 Subject: [PATCH] feat: v0.5.0 updates --- generated/apidocs.swagger.json | 1623 ++++- generated/base/v1/base.pb.go | 3718 +++++++--- generated/base/v1/base.pb.validate.go | 3096 ++++++-- generated/base/v1/base_vtproto.pb.go | 8362 +++++++++++++++++----- generated/base/v1/errors.pb.go | 90 +- generated/base/v1/openapi.pb.go | 2 +- generated/base/v1/service.pb.go | 2524 ++++--- generated/base/v1/service.pb.gw.go | 459 +- generated/base/v1/service.pb.validate.go | 1164 ++- generated/base/v1/service_grpc.pb.go | 276 +- generated/base/v1/service_vtproto.pb.go | 2035 +++++- proto/base/v1/base.proto | 566 +- proto/base/v1/errors.proto | 6 + proto/base/v1/openapi.proto | 2 +- proto/base/v1/service.proto | 552 +- v1/client.go | 20 +- v1/client_test.go | 4 +- 17 files changed, 19224 insertions(+), 5275 deletions(-) diff --git a/generated/apidocs.swagger.json b/generated/apidocs.swagger.json index 73b176f..eefccdf 100644 --- a/generated/apidocs.swagger.json +++ b/generated/apidocs.swagger.json @@ -3,7 +3,7 @@ "info": { "title": "Permify API", "description": "Permify is an open-source authorization service for creating and maintaining fine-grained authorizations across your individual applications and services. Permify converts authorization data as relational tuples into a database you point at. We called that database a Write Database (WriteDB) and it behaves as a centralized data source for your authorization system. You can model of your authorization with Permify's DSL - Permify Schema - and perform access checks with a single API call anywhere on your stack. Access decisions made according to stored relational tuples.", - "version": "v0.4.7", + "version": "v0.5.0", "contact": { "name": "API Support", "url": "https://github.com/Permify/permify/issues", @@ -25,7 +25,7 @@ "name": "Schema" }, { - "name": "Relationship" + "name": "Data" }, { "name": "Tenancy" @@ -128,6 +128,7 @@ "parameters": [ { "name": "id", + "description": "id is the unique identifier of the tenant to be deleted.", "in": "path", "required": true, "type": "string" @@ -138,9 +139,241 @@ ] } }, + "/v1/tenants/{tenant_id}/data/attributes/read": { + "post": { + "summary": "read attribute(s)", + "operationId": "data.attributes.read", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1AttributeReadResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant_id", + "description": "tenant_id represents the unique identifier of the tenant from which the attributes are being read.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1AttributeReadRequestMetadata", + "description": "metadata holds additional information related to the request." + }, + "filter": { + "$ref": "#/definitions/v1AttributeFilter", + "description": "filter specifies the criteria used to select the attributes that should be returned." + }, + "page_size": { + "type": "integer", + "format": "int64", + "description": "page_size specifies the number of results to return in a single page.\nIf more results are available, a continuous_token is included in the response." + }, + "continuous_token": { + "type": "string", + "description": "continuous_token is used in case of paginated reads to get the next page of results." + } + }, + "description": "AttributeReadRequest defines the structure of a request for reading attributes.\nIt includes the tenant_id, metadata, attribute filter, page size for pagination, and a continuous token for multi-page results." + } + } + ], + "tags": [ + "Data" + ] + } + }, + "/v1/tenants/{tenant_id}/data/delete": { + "post": { + "summary": "delete data", + "operationId": "data.delete", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DataDeleteResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant_id", + "description": "tenant_id represents the unique identifier of the tenant from which the data will be deleted.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "tuple_filter": { + "$ref": "#/definitions/v1TupleFilter", + "description": "tuple_filter specifies the criteria used to select the tuples that should be deleted." + }, + "attribute_filter": { + "$ref": "#/definitions/v1AttributeFilter", + "description": "attribute_filter specifies the criteria used to select the attributes that should be deleted." + } + }, + "description": "DataDeleteRequest defines the structure of a request to delete data.\nIt includes the tenant_id and filters for selecting tuples and attributes to be deleted." + } + } + ], + "tags": [ + "Data" + ] + } + }, + "/v1/tenants/{tenant_id}/data/relationships/read": { + "post": { + "summary": "read relation tuple(s)", + "operationId": "data.relationships.read", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RelationshipReadResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant_id", + "description": "tenant_id represents the unique identifier of the tenant for which relationships are read.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1RelationshipReadRequestMetadata", + "description": "metadata holds additional data related to the request." + }, + "filter": { + "$ref": "#/definitions/v1TupleFilter", + "description": "filter is used to specify criteria for the data that needs to be read." + }, + "page_size": { + "type": "integer", + "format": "int64", + "description": "page_size specifies the number of results to return in a single page.\nIf more results are available, a continuous_token is included in the response." + }, + "continuous_token": { + "type": "string", + "description": "continuous_token is used in case of paginated reads to get the next page of results." + } + }, + "description": "RelationshipReadRequest defines the structure of a request for reading relationships.\nIt contains the necessary information such as tenant_id, metadata, and filter for the read operation." + } + } + ], + "tags": [ + "Data" + ] + } + }, + "/v1/tenants/{tenant_id}/data/write": { + "post": { + "summary": "create data", + "operationId": "data.write", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DataWriteResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant_id", + "description": "tenant_id represents the unique identifier of the tenant for which data is written.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1DataWriteRequestMetadata", + "description": "metadata holds additional data related to the request." + }, + "tuples": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Tuple" + }, + "description": "tuples contains the list of tuples (entity-relation-entity triples) that need to be written." + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Attribute" + }, + "description": "attributes contains the list of attributes (entity-attribute-value triples) that need to be written." + } + }, + "description": "DataWriteRequest defines the structure of a request for writing data.\nIt contains the necessary information such as tenant_id, metadata,\ntuples and attributes for the write operation." + } + } + ], + "tags": [ + "Data" + ] + } + }, "/v1/tenants/{tenant_id}/permissions/check": { "post": { - "summary": "This method returns a decision about whether user can perform an permission on a certain resource. For example, Can the user 1 push to repository 1?", + "summary": "This method returns a decision about whether user can perform an permission on a certain resource.", "operationId": "permissions.check", "responses": { "200": { @@ -159,6 +392,7 @@ "parameters": [ { "name": "tenant_id", + "description": "Identifier of the tenant, required, and must match the pattern \"[a-zA-Z0-9-,]+\", max 64 bytes.", "in": "path", "required": true, "type": "string" @@ -171,26 +405,34 @@ "type": "object", "properties": { "metadata": { - "$ref": "#/definitions/v1PermissionCheckRequestMetadata" + "$ref": "#/definitions/v1PermissionCheckRequestMetadata", + "description": "Metadata associated with this request, required." }, "entity": { - "$ref": "#/definitions/v1Entity" + "$ref": "#/definitions/v1Entity", + "description": "Entity on which the permission needs to be checked, required." }, "permission": { "type": "string", - "title": "its can be permission or relation" + "description": "Name of the permission or relation, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes." }, "subject": { - "$ref": "#/definitions/v1Subject" + "$ref": "#/definitions/v1Subject", + "description": "Subject for which the permission needs to be checked, required." }, - "contextual_tuples": { + "context": { + "$ref": "#/definitions/v1Context", + "description": "Context associated with this request." + }, + "arguments": { "type": "array", "items": { - "$ref": "#/definitions/v1Tuple" - } + "$ref": "#/definitions/v1Argument" + }, + "description": "Additional arguments associated with this request." } }, - "title": "PermissionCheckRequest" + "description": "PermissionCheckRequest is the request message for the Check method in the Permission service." } } ], @@ -220,6 +462,7 @@ "parameters": [ { "name": "tenant_id", + "description": "Identifier of the tenant, required, and must match the pattern \"[a-zA-Z0-9-,]+\", max 64 bytes.", "in": "path", "required": true, "type": "string" @@ -232,22 +475,30 @@ "type": "object", "properties": { "metadata": { - "$ref": "#/definitions/v1PermissionExpandRequestMetadata" + "$ref": "#/definitions/v1PermissionExpandRequestMetadata", + "description": "Metadata associated with this request, required." }, "entity": { - "$ref": "#/definitions/v1Entity" + "$ref": "#/definitions/v1Entity", + "description": "Entity on which the permission needs to be expanded, required." }, "permission": { - "type": "string" + "type": "string", + "description": "Name of the permission to be expanded, not required, must start with a letter and can include alphanumeric and underscore, max 64 bytes." + }, + "context": { + "$ref": "#/definitions/v1Context", + "description": "Context associated with this request." }, - "contextual_tuples": { + "arguments": { "type": "array", "items": { - "$ref": "#/definitions/v1Tuple" - } + "$ref": "#/definitions/v1Argument" + }, + "description": "Additional arguments associated with this request." } }, - "title": "PermissionExpandRequest" + "description": "PermissionExpandRequest is the request message for the Expand method in the Permission service." } } ], @@ -258,6 +509,7 @@ }, "/v1/tenants/{tenant_id}/permissions/lookup-entity": { "post": { + "summary": "Retrieve an entity by its identifier.", "operationId": "permissions.lookupEntity", "responses": { "200": { @@ -276,6 +528,7 @@ "parameters": [ { "name": "tenant_id", + "description": "Identifier of the tenant, required, and must match the pattern \"[a-zA-Z0-9-,]+\", max 64 bytes.", "in": "path", "required": true, "type": "string" @@ -288,25 +541,27 @@ "type": "object", "properties": { "metadata": { - "$ref": "#/definitions/v1PermissionLookupEntityRequestMetadata" + "$ref": "#/definitions/v1PermissionLookupEntityRequestMetadata", + "description": "Metadata associated with this request, required." }, "entity_type": { - "type": "string" + "type": "string", + "description": "Type of the entity to lookup, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes." }, "permission": { - "type": "string" + "type": "string", + "description": "Name of the permission to check, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes." }, "subject": { - "$ref": "#/definitions/v1Subject" + "$ref": "#/definitions/v1Subject", + "description": "Subject for which to check the permission, required." }, - "contextual_tuples": { - "type": "array", - "items": { - "$ref": "#/definitions/v1Tuple" - } + "context": { + "$ref": "#/definitions/v1Context", + "description": "Context associated with this request." } }, - "title": "PermissionLookupEntityRequest" + "description": "PermissionLookupEntityRequest is the request message for the LookupEntity method in the Permission service." } } ], @@ -317,6 +572,7 @@ }, "/v1/tenants/{tenant_id}/permissions/lookup-entity-stream": { "post": { + "summary": "Stream entities by their identifiers.", "operationId": "permissions.lookupEntityStream", "responses": { "200": { @@ -344,6 +600,7 @@ "parameters": [ { "name": "tenant_id", + "description": "Identifier of the tenant, required, and must match the pattern \"[a-zA-Z0-9-,]+\", max 64 bytes.", "in": "path", "required": true, "type": "string" @@ -356,25 +613,27 @@ "type": "object", "properties": { "metadata": { - "$ref": "#/definitions/v1PermissionLookupEntityRequestMetadata" + "$ref": "#/definitions/v1PermissionLookupEntityRequestMetadata", + "description": "Metadata associated with this request, required." }, "entity_type": { - "type": "string" + "type": "string", + "description": "Type of the entity to lookup, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes." }, "permission": { - "type": "string" + "type": "string", + "description": "Name of the permission to check, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes." }, "subject": { - "$ref": "#/definitions/v1Subject" + "$ref": "#/definitions/v1Subject", + "description": "Subject for which to check the permission, required." }, - "contextual_tuples": { - "type": "array", - "items": { - "$ref": "#/definitions/v1Tuple" - } + "context": { + "$ref": "#/definitions/v1Context", + "description": "Context associated with this request." } }, - "title": "PermissionLookupEntityRequest" + "description": "PermissionLookupEntityRequest is the request message for the LookupEntity method in the Permission service." } } ], @@ -385,6 +644,7 @@ }, "/v1/tenants/{tenant_id}/permissions/lookup-subject": { "post": { + "summary": "Retrieve a subject by its identifier.", "operationId": "permissions.lookupSubject", "responses": { "200": { @@ -403,6 +663,7 @@ "parameters": [ { "name": "tenant_id", + "description": "Identifier of the tenant, required, and must match the pattern \"[a-zA-Z0-9-,]+\", max 64 bytes.", "in": "path", "required": true, "type": "string" @@ -415,26 +676,27 @@ "type": "object", "properties": { "metadata": { - "$ref": "#/definitions/v1PermissionLookupSubjectRequestMetadata" + "$ref": "#/definitions/v1PermissionLookupSubjectRequestMetadata", + "description": "Metadata associated with this request, required." }, "entity": { - "$ref": "#/definitions/v1Entity" + "$ref": "#/definitions/v1Entity", + "description": "Entity for which to check the permission, required." }, "permission": { "type": "string", - "title": "its can be permission or relation" + "description": "Permission to be checked, can be a permission or relation. Required, and must match the pattern \"^([a-zA-Z][a-zA-Z0-9_]{1,62}[a-zA-Z0-9])$\", max 64 bytes." }, "subject_reference": { - "$ref": "#/definitions/v1RelationReference" + "$ref": "#/definitions/v1RelationReference", + "description": "Reference to the subject to lookup." }, - "contextual_tuples": { - "type": "array", - "items": { - "$ref": "#/definitions/v1Tuple" - } + "context": { + "$ref": "#/definitions/v1Context", + "description": "Context associated with this request." } }, - "title": "PermissionLookupSubjectRequest" + "description": "PermissionLookupSubjectRequest is the request message for the LookupSubject method in the Permission service." } } ], @@ -445,6 +707,7 @@ }, "/v1/tenants/{tenant_id}/permissions/subject-permission": { "post": { + "summary": "Retrieve permissions related to a specific subject.", "operationId": "permissions.subjectPermission", "responses": { "200": { @@ -463,6 +726,7 @@ "parameters": [ { "name": "tenant_id", + "description": "Identifier of the tenant, required, and must match the pattern \"[a-zA-Z0-9-,]+\", max 64 bytes.", "in": "path", "required": true, "type": "string" @@ -475,21 +739,23 @@ "type": "object", "properties": { "metadata": { - "$ref": "#/definitions/v1PermissionSubjectPermissionRequestMetadata" + "$ref": "#/definitions/v1PermissionSubjectPermissionRequestMetadata", + "description": "Metadata associated with this request, required." }, "entity": { - "$ref": "#/definitions/v1Entity" + "$ref": "#/definitions/v1Entity", + "description": "Entity for which to check the permission, required." }, "subject": { - "$ref": "#/definitions/v1Subject" + "$ref": "#/definitions/v1Subject", + "description": "Subject for which to check the permission, required." }, - "contextual_tuples": { - "type": "array", - "items": { - "$ref": "#/definitions/v1Tuple" - } + "context": { + "$ref": "#/definitions/v1Context", + "description": "Context associated with this request." } - } + }, + "description": "PermissionSubjectPermissionRequest is the request message for the SubjectPermission method in the Permission service." } } ], @@ -500,7 +766,7 @@ }, "/v1/tenants/{tenant_id}/relationships/delete": { "post": { - "summary": "delete relation tuple", + "summary": "delete relationships", "operationId": "relationships.delete", "responses": { "200": { @@ -539,68 +805,13 @@ } ], "tags": [ - "Relationship" - ] - } - }, - "/v1/tenants/{tenant_id}/relationships/read": { - "post": { - "summary": "read relation tuple(s)", - "operationId": "relationships.read", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1RelationshipReadResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "tenant_id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "metadata": { - "$ref": "#/definitions/v1RelationshipReadRequestMetadata" - }, - "filter": { - "$ref": "#/definitions/v1TupleFilter" - }, - "page_size": { - "type": "integer", - "format": "int64" - }, - "continuous_token": { - "type": "string" - } - }, - "title": "RelationshipReadRequest" - } - } - ], - "tags": [ - "Relationship" + "Data" ] } }, "/v1/tenants/{tenant_id}/relationships/write": { "post": { - "summary": "create new relation tuple", + "summary": "create new relationships", "operationId": "relationships.write", "responses": { "200": { @@ -619,6 +830,7 @@ "parameters": [ { "name": "tenant_id", + "description": "Unique identifier for the tenant with specific constraints.", "in": "path", "required": true, "type": "string" @@ -631,21 +843,23 @@ "type": "object", "properties": { "metadata": { - "$ref": "#/definitions/v1RelationshipWriteRequestMetadata" + "$ref": "#/definitions/v1RelationshipWriteRequestMetadata", + "description": "Metadata for the request. It's required." }, "tuples": { "type": "array", "items": { "$ref": "#/definitions/v1Tuple" - } + }, + "description": "List of tuples for the request. Must have between 1 and 100 items." } }, - "title": "RelationshipWriteRequest" + "description": "Represents a request to write relationship data." } } ], "tags": [ - "Relationship" + "Data" ] } }, @@ -670,6 +884,7 @@ "parameters": [ { "name": "tenant_id", + "description": "tenant_id is a string that identifies the tenant. It must match the pattern \"[a-zA-Z0-9-,]+\",\nbe a maximum of 64 bytes, and must not be empty.", "in": "path", "required": true, "type": "string" @@ -682,10 +897,11 @@ "type": "object", "properties": { "metadata": { - "$ref": "#/definitions/v1SchemaReadRequestMetadata" + "$ref": "#/definitions/v1SchemaReadRequestMetadata", + "description": "metadata is the additional information needed for the Read request." } }, - "title": "SchemaReadRequest" + "description": "SchemaReadRequest is the request message for the Read method in the Schema service.\nIt contains tenant_id and metadata about the schema to be read." } } ], @@ -715,6 +931,7 @@ "parameters": [ { "name": "tenant_id", + "description": "tenant_id is a string that identifies the tenant. It must match the pattern \"[a-zA-Z0-9-,]+\",\nbe a maximum of 64 bytes, and must not be empty.", "in": "path", "required": true, "type": "string" @@ -727,10 +944,11 @@ "type": "object", "properties": { "schema": { - "type": "string" + "type": "string", + "description": "schema is the string representation of the schema to be written." } }, - "title": "SchemaWriteRequest" + "description": "SchemaWriteRequest is the request message for the Write method in the Schema service.\nIt contains tenant_id and the schema to be written." } } ], @@ -768,6 +986,7 @@ "parameters": [ { "name": "tenant_id", + "description": "Identifier of the tenant, required, and must match the pattern \"[a-zA-Z0-9-,]+\", max 64 bytes.", "in": "path", "required": true, "type": "string" @@ -780,10 +999,11 @@ "type": "object", "properties": { "snap_token": { - "type": "string" + "type": "string", + "description": "Snap token to be used for watching." } }, - "title": "WatchRequest" + "description": "WatchRequest is the request message for the Watch RPC. It contains the\ndetails needed to establish a watch stream." } } ], @@ -794,24 +1014,328 @@ } }, "definitions": { - "EntityDefinitionRelationalReference": { - "type": "string", - "enum": [ - "RELATIONAL_REFERENCE_UNSPECIFIED", - "RELATIONAL_REFERENCE_RELATION", - "RELATIONAL_REFERENCE_PERMISSION" - ], - "default": "RELATIONAL_REFERENCE_UNSPECIFIED", - "title": "RelationalReference" - }, - "protobufAny": { + "CreateStructEntry": { "type": "object", "properties": { - "@type": { + "id": { + "type": "string", + "format": "int64", + "description": "Required. An id assigned to this node by the parser which is unique\nin a given expression tree. This is used to associate type\ninformation and other attributes to the node." + }, + "fieldKey": { + "type": "string", + "description": "The field key for a message creator statement." + }, + "mapKey": { + "$ref": "#/definitions/v1alpha1Expr", + "description": "The key expression for a map creation statement." + }, + "value": { + "$ref": "#/definitions/v1alpha1Expr", + "description": "Required. The value assigned to the key.\n\nIf the optional_entry field is true, the expression must resolve to an\noptional-typed value. If the optional value is present, the key will be\nset; however, if the optional value is absent, the key will be unset." + }, + "optionalEntry": { + "type": "boolean", + "description": "Whether the key-value pair is optional." + } + }, + "description": "Represents an entry." + }, + "ExprComprehension": { + "type": "object", + "properties": { + "iterVar": { + "type": "string", + "description": "The name of the iteration variable." + }, + "iterRange": { + "$ref": "#/definitions/v1alpha1Expr", + "description": "The range over which var iterates." + }, + "accuVar": { + "type": "string", + "description": "The name of the variable used for accumulation of the result." + }, + "accuInit": { + "$ref": "#/definitions/v1alpha1Expr", + "description": "The initial value of the accumulator." + }, + "loopCondition": { + "$ref": "#/definitions/v1alpha1Expr", + "description": "An expression which can contain iter_var and accu_var.\n\nReturns false when the result has been computed and may be used as\na hint to short-circuit the remainder of the comprehension." + }, + "loopStep": { + "$ref": "#/definitions/v1alpha1Expr", + "description": "An expression which can contain iter_var and accu_var.\n\nComputes the next value of accu_var." + }, + "result": { + "$ref": "#/definitions/v1alpha1Expr", + "description": "An expression which can contain accu_var.\n\nComputes the result." + } + }, + "description": "A comprehension expression applied to a list or map.\n\nComprehensions are not part of the core syntax, but enabled with macros.\nA macro matches a specific call signature within a parsed AST and replaces\nthe call with an alternate AST block. Macro expansion happens at parse\ntime.\n\nThe following macros are supported within CEL:\n\nAggregate type macros may be applied to all elements in a list or all keys\nin a map:\n\n* `all`, `exists`, `exists_one` - test a predicate expression against\n the inputs and return `true` if the predicate is satisfied for all,\n any, or only one value `list.all(x, x \u003c 10)`.\n* `filter` - test a predicate expression against the inputs and return\n the subset of elements which satisfy the predicate:\n `payments.filter(p, p \u003e 1000)`.\n* `map` - apply an expression to all elements in the input and return the\n output aggregate type: `[1, 2, 3].map(i, i * i)`.\n\nThe `has(m.x)` macro tests whether the property `x` is present in struct\n`m`. The semantics of this macro depend on the type of `m`. For proto2\nmessages `has(m.x)` is defined as 'defined, but not set`. For proto3, the\nmacro tests whether the property is set to its default. For map and struct\ntypes, the macro tests whether the property `x` is defined on `m`." + }, + "ExprCreateList": { + "type": "object", + "properties": { + "elements": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1Expr" + }, + "description": "The elements part of the list." + }, + "optionalIndices": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "The indices within the elements list which are marked as optional\nelements.\n\nWhen an optional-typed value is present, the value it contains\nis included in the list. If the optional-typed value is absent, the list\nelement is omitted from the CreateList result." + } + }, + "description": "A list creation expression.\n\nLists may either be homogenous, e.g. `[1, 2, 3]`, or heterogeneous, e.g.\n`dyn([1, 'hello', 2.0])`" + }, + "ExprCreateStruct": { + "type": "object", + "properties": { + "messageName": { + "type": "string", + "description": "The type name of the message to be created, empty when creating map\nliterals." + }, + "entries": { + "type": "array", + "items": { + "$ref": "#/definitions/CreateStructEntry" + }, + "description": "The entries in the creation expression." + } + }, + "description": "A map or message creation expression.\n\nMaps are constructed as `{'key_name': 'value'}`. Message construction is\nsimilar, but prefixed with a type name and composed of field ids:\n`types.MyType{field_id: 'value'}`." + }, + "ExprIdent": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Required. Holds a single, unqualified identifier, possibly preceded by a\n'.'.\n\nQualified names are represented by the [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression." + } + }, + "description": "An identifier expression. e.g. `request`." + }, + "ExprSelect": { + "type": "object", + "properties": { + "operand": { + "$ref": "#/definitions/v1alpha1Expr", + "description": "Required. The target of the selection expression.\n\nFor example, in the select expression `request.auth`, the `request`\nportion of the expression is the `operand`." + }, + "field": { + "type": "string", + "description": "Required. The name of the field to select.\n\nFor example, in the select expression `request.auth`, the `auth` portion\nof the expression would be the `field`." + }, + "testOnly": { + "type": "boolean", + "description": "Whether the select is to be interpreted as a field presence test.\n\nThis results from the macro `has(request.auth)`." + } + }, + "description": "A field selection expression. e.g. `request.auth`." + }, + "TypeAbstractType": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The fully qualified name of this abstract type." + }, + "parameterTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/exprv1alpha1Type" + }, + "description": "Parameter types for this abstract type." + } + }, + "description": "Application defined abstract type." + }, + "TypeFunctionType": { + "type": "object", + "properties": { + "resultType": { + "$ref": "#/definitions/exprv1alpha1Type", + "description": "Result type of the function." + }, + "argTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/exprv1alpha1Type" + }, + "description": "Argument types of the function." + } + }, + "description": "Function type with result and arg types." + }, + "TypeListType": { + "type": "object", + "properties": { + "elemType": { + "$ref": "#/definitions/exprv1alpha1Type", + "description": "The element type." + } + }, + "description": "List type with typed elements, e.g. `list\u003cexample.proto.MyMessage\u003e`." + }, + "TypeMapType": { + "type": "object", + "properties": { + "keyType": { + "$ref": "#/definitions/exprv1alpha1Type", + "description": "The type of the key." + }, + "valueType": { + "$ref": "#/definitions/exprv1alpha1Type", + "description": "The type of the value." + } + }, + "description": "Map type with parameterized key and value types, e.g. `map\u003cstring, int\u003e`." + }, + "TypePrimitiveType": { + "type": "string", + "enum": [ + "PRIMITIVE_TYPE_UNSPECIFIED", + "BOOL", + "INT64", + "UINT64", + "DOUBLE", + "STRING", + "BYTES" + ], + "default": "PRIMITIVE_TYPE_UNSPECIFIED", + "description": "CEL primitive types.\n\n - PRIMITIVE_TYPE_UNSPECIFIED: Unspecified type.\n - BOOL: Boolean type.\n - INT64: Int64 type.\n\nProto-based integer values are widened to int64.\n - UINT64: Uint64 type.\n\nProto-based unsigned integer values are widened to uint64.\n - DOUBLE: Double type.\n\nProto-based float values are widened to double values.\n - STRING: String type.\n - BYTES: Bytes type." + }, + "TypeWellKnownType": { + "type": "string", + "enum": [ + "WELL_KNOWN_TYPE_UNSPECIFIED", + "ANY", + "TIMESTAMP", + "DURATION" + ], + "default": "WELL_KNOWN_TYPE_UNSPECIFIED", + "description": "Well-known protobuf types treated with first-class support in CEL.\n\n - WELL_KNOWN_TYPE_UNSPECIFIED: Unspecified type.\n - ANY: Well-known protobuf.Any type.\n\nAny types are a polymorphic message type. During type-checking they are\ntreated like `DYN` types, but at runtime they are resolved to a specific\nmessage type specified at evaluation time.\n - TIMESTAMP: Well-known protobuf.Timestamp type, internally referenced as `timestamp`.\n - DURATION: Well-known protobuf.Duration type, internally referenced as `duration`." + }, + "basev1Call": { + "type": "object", + "properties": { + "ruleName": { "type": "string" + }, + "arguments": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Argument" + } + } + }, + "description": "Call represents a call to a rule. It includes the name of the rule and the arguments passed to it." + }, + "exprv1alpha1Reference": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The fully qualified name of the declaration." + }, + "overloadId": { + "type": "array", + "items": { + "type": "string" + }, + "description": "For references to functions, this is a list of `Overload.overload_id`\nvalues which match according to typing rules.\n\nIf the list has more than one element, overload resolution among the\npresented candidates must happen at runtime because of dynamic types. The\ntype checker attempts to narrow down this list as much as possible.\n\nEmpty if this is not a reference to a\n[Decl.FunctionDecl][google.api.expr.v1alpha1.Decl.FunctionDecl]." + }, + "value": { + "$ref": "#/definitions/v1alpha1Constant", + "description": "For references to constants, this may contain the value of the\nconstant if known at compile time." + } + }, + "description": "Describes a resolved reference to a declaration." + }, + "exprv1alpha1Type": { + "type": "object", + "properties": { + "dyn": { + "properties": {}, + "description": "Dynamic type." + }, + "null": { + "type": "string", + "description": "Null value." + }, + "primitive": { + "$ref": "#/definitions/TypePrimitiveType", + "description": "Primitive types: `true`, `1u`, `-2.0`, `'string'`, `b'bytes'`." + }, + "wrapper": { + "$ref": "#/definitions/TypePrimitiveType", + "description": "Wrapper of a primitive type, e.g. `google.protobuf.Int64Value`." + }, + "wellKnown": { + "$ref": "#/definitions/TypeWellKnownType", + "description": "Well-known protobuf type such as `google.protobuf.Timestamp`." + }, + "listType": { + "$ref": "#/definitions/TypeListType", + "description": "Parameterized list with elements of `list_type`, e.g. `list\u003ctimestamp\u003e`." + }, + "mapType": { + "$ref": "#/definitions/TypeMapType", + "description": "Parameterized map with typed keys and values." + }, + "function": { + "$ref": "#/definitions/TypeFunctionType", + "description": "Function type." + }, + "messageType": { + "type": "string", + "description": "Protocol buffer message type.\n\nThe `message_type` string specifies the qualified message type name. For\nexample, `google.plus.Profile`." + }, + "typeParam": { + "type": "string", + "description": "Type param type.\n\nThe `type_param` string specifies the type parameter name, e.g. `list\u003cE\u003e`\nwould be a `list_type` whose element type was a `type_param` type\nnamed `E`." + }, + "type": { + "$ref": "#/definitions/exprv1alpha1Type", + "description": "Type type.\n\nThe `type` value specifies the target type. e.g. int is type with a\ntarget type of `Primitive.INT`." + }, + "error": { + "properties": {}, + "description": "Error type.\n\nDuring type-checking if an expression is an error, its type is propagated\nas the `ERROR` type. This permits the type-checker to discover other\nerrors present in the expression." + }, + "abstractType": { + "$ref": "#/definitions/TypeAbstractType", + "description": "Abstract, application defined type." } }, - "additionalProperties": {} + "description": "Represents a CEL type." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "protobufNullValue": { + "type": "string", + "enum": [ + "NULL_VALUE" + ], + "default": "NULL_VALUE", + "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." }, "rpcStatus": { "type": "object", @@ -831,27 +1355,137 @@ } } }, + "v1Argument": { + "type": "object", + "properties": { + "computedAttribute": { + "$ref": "#/definitions/v1ComputedAttribute" + }, + "contextAttribute": { + "$ref": "#/definitions/v1ContextAttribute" + } + }, + "description": "Argument defines the type of argument in a Call. It can be either a ComputedAttribute or a ContextAttribute." + }, + "v1Attribute": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/definitions/v1Entity" + }, + "attribute": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/protobufAny" + } + }, + "description": "Attribute represents an attribute of an entity with a specific type and value." + }, + "v1AttributeDefinition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the attribute, which follows a specific string pattern and has a maximum byte size." + }, + "type": { + "$ref": "#/definitions/v1AttributeType", + "description": "The type of the attribute." + } + }, + "description": "The AttributeDefinition message provides detailed information about a specific attribute." + }, + "v1AttributeFilter": { + "type": "object", + "properties": { + "entity": { + "$ref": "#/definitions/v1EntityFilter" + }, + "attributes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "AttributeFilter is used to filter attributes based on the entity and attribute names." + }, + "v1AttributeReadRequestMetadata": { + "type": "object", + "properties": { + "snap_token": { + "type": "string", + "description": "snap_token represents a specific state or \"snapshot\" of the database." + } + }, + "description": "AttributeReadRequestMetadata defines the structure for the metadata of an attribute read request.\nIt includes the snap_token associated with a particular state of the database." + }, + "v1AttributeReadResponse": { + "type": "object", + "properties": { + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Attribute" + }, + "description": "attributes is a list of the attributes retrieved in the read operation." + }, + "continuous_token": { + "type": "string", + "description": "continuous_token is used in the case of paginated reads to retrieve the next page of results." + } + }, + "description": "AttributeReadResponse defines the structure of the response to an attribute read request.\nIt includes the attributes retrieved and a continuous token for handling result pagination." + }, + "v1AttributeType": { + "type": "string", + "enum": [ + "ATTRIBUTE_TYPE_UNSPECIFIED", + "ATTRIBUTE_TYPE_BOOLEAN", + "ATTRIBUTE_TYPE_BOOLEAN_ARRAY", + "ATTRIBUTE_TYPE_STRING", + "ATTRIBUTE_TYPE_STRING_ARRAY", + "ATTRIBUTE_TYPE_INTEGER", + "ATTRIBUTE_TYPE_INTEGER_ARRAY", + "ATTRIBUTE_TYPE_DOUBLE", + "ATTRIBUTE_TYPE_DOUBLE_ARRAY" + ], + "default": "ATTRIBUTE_TYPE_UNSPECIFIED", + "description": "Enumerates the types of attribute.\n\n - ATTRIBUTE_TYPE_UNSPECIFIED: Not specified attribute type. This is the default value.\n - ATTRIBUTE_TYPE_BOOLEAN: A boolean attribute type.\n - ATTRIBUTE_TYPE_BOOLEAN_ARRAY: A boolean array attribute type.\n - ATTRIBUTE_TYPE_STRING: A string attribute type.\n - ATTRIBUTE_TYPE_STRING_ARRAY: A string array attribute type.\n - ATTRIBUTE_TYPE_INTEGER: An integer attribute type.\n - ATTRIBUTE_TYPE_INTEGER_ARRAY: An integer array attribute type.\n - ATTRIBUTE_TYPE_DOUBLE: A double attribute type.\n - ATTRIBUTE_TYPE_DOUBLE_ARRAY: A double array attribute type." + }, "v1CheckResult": { "type": "string", "enum": [ - "RESULT_UNKNOWN", - "RESULT_ALLOWED", - "RESULT_DENIED" + "CHECK_RESULT_UNSPECIFIED", + "CHECK_RESULT_ALLOWED", + "CHECK_RESULT_DENIED" ], - "default": "RESULT_UNKNOWN", - "title": "CheckResult" + "default": "CHECK_RESULT_UNSPECIFIED", + "description": "Enumerates results of a check operation.\n\n - CHECK_RESULT_UNSPECIFIED: Not specified check result. This is the default value.\n - CHECK_RESULT_ALLOWED: Represents a successful check (the check allowed the operation).\n - CHECK_RESULT_DENIED: Represents a failed check (the check denied the operation)." }, "v1Child": { "type": "object", "properties": { "leaf": { - "$ref": "#/definitions/v1Leaf" + "$ref": "#/definitions/v1Leaf", + "description": "Leaf node in the permission tree." }, "rewrite": { - "$ref": "#/definitions/v1Rewrite" + "$ref": "#/definitions/v1Rewrite", + "description": "Rewrite operation in the permission tree." } }, - "title": "Child" + "description": "Child represents a node in the permission tree." + }, + "v1ComputedAttribute": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "description": "ComputedAttribute defines a computed attribute which includes its name." }, "v1ComputedUserSet": { "type": "object", @@ -860,7 +1494,109 @@ "type": "string" } }, - "title": "ComputedUserSet" + "description": "ComputedUserSet defines a set of computed users which includes the relation name." + }, + "v1Context": { + "type": "object", + "properties": { + "tuples": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Tuple" + }, + "description": "A repeated field of tuples involved in the operation." + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Attribute" + }, + "description": "A repeated field of attributes associated with the operation." + }, + "data": { + "type": "object", + "description": "Additional data associated with the context." + } + }, + "description": "Context encapsulates the information related to a single operation,\nincluding the tuples involved and the associated attributes." + }, + "v1ContextAttribute": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "description": "ContextAttribute defines a context attribute which includes its name." + }, + "v1DataChange": { + "type": "object", + "properties": { + "operation": { + "$ref": "#/definitions/v1DataChangeOperation" + }, + "tuple": { + "$ref": "#/definitions/v1Tuple" + }, + "attribute": { + "$ref": "#/definitions/v1Attribute" + } + }, + "description": "DataChange represents a single change in data, with an operation type and the actual change which could be a tuple or an attribute." + }, + "v1DataChangeOperation": { + "type": "string", + "enum": [ + "OPERATION_UNSPECIFIED", + "OPERATION_CREATE", + "OPERATION_DELETE" + ], + "default": "OPERATION_UNSPECIFIED" + }, + "v1DataChanges": { + "type": "object", + "properties": { + "snap_token": { + "type": "string" + }, + "data_changes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1DataChange" + } + } + }, + "description": "DataChanges represent changes in data with a snap token and a list of data change objects." + }, + "v1DataDeleteResponse": { + "type": "object", + "properties": { + "snap_token": { + "type": "string", + "description": "snap_token represents the state of the database after the requested deletions." + } + }, + "description": "DataDeleteResponse defines the structure of the response to a data delete request.\nIt includes a snap_token representing the state of the database after the deletion." + }, + "v1DataWriteRequestMetadata": { + "type": "object", + "properties": { + "schema_version": { + "type": "string", + "description": "schema_version represents the version of the schema for the data being written." + } + }, + "description": "DataWriteRequestMetadata defines the structure of metadata for a write request.\nIt includes the schema version of the data to be written." + }, + "v1DataWriteResponse": { + "type": "object", + "properties": { + "snap_token": { + "type": "string", + "description": "snap_token is the token generated after the data write operation, representing a snapshot of the data." + } + }, + "description": "DataWriteResponse defines the structure of the response after writing data.\nIt contains the snap_token generated after the write operation." }, "v1Entity": { "type": "object", @@ -872,48 +1608,56 @@ "type": "string" } }, - "title": "Entity" - }, - "v1EntityAndRelation": { - "type": "object", - "properties": { - "entity": { - "$ref": "#/definitions/v1Entity" - }, - "relation": { - "type": "string" - } - } + "description": "Entity represents an entity with a type and an identifier." }, "v1EntityDefinition": { "type": "object", "properties": { "name": { - "type": "string" + "type": "string", + "description": "The name of the entity, which follows a specific string pattern and has a maximum byte size." }, "relations": { "type": "object", "additionalProperties": { "$ref": "#/definitions/v1RelationDefinition" }, - "title": "[\"relation_name\"] =\u003e RelationDefinition" + "description": "Map of relation definitions within this entity. The key is the relation name, and the value is the RelationDefinition." }, "permissions": { "type": "object", "additionalProperties": { "$ref": "#/definitions/v1PermissionDefinition" }, - "title": "[\"permission_name\"] =\u003e PermissionDefinition" + "description": "Map of permission definitions within this entity. The key is the permission name, and the value is the PermissionDefinition." + }, + "attributes": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1AttributeDefinition" + }, + "description": "Map of attribute definitions within this entity. The key is the attribute name, and the value is the AttributeDefinition." }, "references": { "type": "object", "additionalProperties": { - "$ref": "#/definitions/EntityDefinitionRelationalReference" + "$ref": "#/definitions/v1EntityDefinitionReference" }, - "title": "[\"relation_name or permission_name\"] =\u003e RelationalReference" + "description": "Map of references indicating whether a string pertains to a relation, permission, or attribute." } }, - "title": "EntityDefinition" + "description": "The EntityDefinition message provides detailed information about a specific entity." + }, + "v1EntityDefinitionReference": { + "type": "string", + "enum": [ + "REFERENCE_UNSPECIFIED", + "REFERENCE_RELATION", + "REFERENCE_PERMISSION", + "REFERENCE_ATTRIBUTE" + ], + "default": "REFERENCE_UNSPECIFIED", + "description": "The Reference enum specifies whether a name pertains to a relation, permission, or attribute." }, "v1EntityFilter": { "type": "object", @@ -928,22 +1672,54 @@ } } }, - "title": "EntityFilter is used to filter entities" + "description": "EntityFilter is used to filter entities based on the type and ids." }, "v1Expand": { "type": "object", "properties": { - "target": { - "$ref": "#/definitions/v1EntityAndRelation" + "entity": { + "$ref": "#/definitions/v1Entity", + "description": "entity is the entity for which the hierarchical structure is defined." + }, + "permission": { + "type": "string", + "description": "permission is the permission applied to the entity." + }, + "arguments": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Argument" + }, + "description": "arguments are the additional information or context used to evaluate permissions." }, "expand": { - "$ref": "#/definitions/v1ExpandTreeNode" + "$ref": "#/definitions/v1ExpandTreeNode", + "description": "expand contains another hierarchical structure." }, "leaf": { - "$ref": "#/definitions/v1Subjects" + "$ref": "#/definitions/v1ExpandLeaf", + "description": "leaf contains a set of subjects." + } + }, + "description": "Expand is used to define a hierarchical structure for permissions.\nIt has an entity, permission, and arguments. The node can be either another hierarchical structure or a set of subjects." + }, + "v1ExpandLeaf": { + "type": "object", + "properties": { + "subjects": { + "$ref": "#/definitions/v1Subjects", + "description": "subjects are used when the leaf is a set of subjects." + }, + "values": { + "$ref": "#/definitions/v1Values", + "description": "values are used when the leaf node is a set of values." + }, + "value": { + "$ref": "#/definitions/protobufAny", + "description": "value is used when the leaf node is a single value." } }, - "title": "Expand" + "description": "ExpandLeaf is the leaf node of an Expand tree and can be either a set of Subjects or a set of Values." }, "v1ExpandTreeNode": { "type": "object", @@ -958,7 +1734,7 @@ } } }, - "title": "ExpandTreeNode" + "description": "ExpandTreeNode represents a node in an expansion tree with a specific operation and its children." }, "v1ExpandTreeNodeOperation": { "type": "string", @@ -969,106 +1745,130 @@ "OPERATION_EXCLUSION" ], "default": "OPERATION_UNSPECIFIED", - "title": "Operation" + "description": "Operation is an enum representing the type of operation to be applied on the tree node." }, "v1Leaf": { "type": "object", "properties": { "computedUserSet": { - "$ref": "#/definitions/v1ComputedUserSet" + "$ref": "#/definitions/v1ComputedUserSet", + "description": "A computed set of users." }, "tupleToUserSet": { - "$ref": "#/definitions/v1TupleToUserSet" + "$ref": "#/definitions/v1TupleToUserSet", + "description": "A tuple to user set conversion." + }, + "computedAttribute": { + "$ref": "#/definitions/v1ComputedAttribute", + "description": "A computed attribute." + }, + "call": { + "$ref": "#/definitions/basev1Call", + "description": "A call to a function or method." } }, - "title": "Leaf" + "description": "Leaf represents a leaf node in the permission tree." }, "v1PermissionCheckRequestMetadata": { "type": "object", "properties": { "schema_version": { - "type": "string" + "type": "string", + "description": "Version of the schema." }, "snap_token": { - "type": "string" + "type": "string", + "description": "Token associated with the snap." }, "depth": { "type": "integer", - "format": "int32" + "format": "int32", + "description": "Depth of the check, must be greater than or equal to 3." } }, - "title": "PermissionCheckRequestMetadata" + "description": "PermissionCheckRequestMetadata is the metadata associated with a PermissionCheckRequest." }, "v1PermissionCheckResponse": { "type": "object", "properties": { "can": { - "$ref": "#/definitions/v1CheckResult" + "$ref": "#/definitions/v1CheckResult", + "description": "Result of the permission check." }, "metadata": { - "$ref": "#/definitions/v1PermissionCheckResponseMetadata" + "$ref": "#/definitions/v1PermissionCheckResponseMetadata", + "description": "Metadata associated with this response." } }, - "title": "PermissionCheckResponse" + "description": "PermissionCheckResponse is the response message for the Check method in the Permission service." }, "v1PermissionCheckResponseMetadata": { "type": "object", "properties": { "check_count": { "type": "integer", - "format": "int32" + "format": "int32", + "description": "The count of the checks performed." } }, - "title": "CheckResponseMetadata" + "description": "PermissionCheckResponseMetadata is the metadata associated with a PermissionCheckResponse." }, "v1PermissionDefinition": { "type": "object", "properties": { "name": { - "type": "string" + "type": "string", + "description": "The name of the permission, which follows a specific string pattern and has a maximum byte size." }, "child": { - "$ref": "#/definitions/v1Child" + "$ref": "#/definitions/v1Child", + "description": "The child related to this permission." } }, - "title": "PermissionDefinition" + "description": "The PermissionDefinition message provides detailed information about a specific permission." }, "v1PermissionExpandRequestMetadata": { "type": "object", "properties": { "schema_version": { - "type": "string" + "type": "string", + "description": "Version of the schema." }, "snap_token": { - "type": "string" + "type": "string", + "description": "Token associated with the snap." } }, - "title": "PermissionExpandRequestMetadata" + "description": "PermissionExpandRequestMetadata is the metadata associated with a PermissionExpandRequest." }, "v1PermissionExpandResponse": { "type": "object", "properties": { "tree": { - "$ref": "#/definitions/v1Expand" + "$ref": "#/definitions/v1Expand", + "description": "Expansion tree." } }, - "title": "PermissionExpandResponse" + "description": "PermissionExpandResponse is the response message for the Expand method in the Permission service." }, "v1PermissionLookupEntityRequestMetadata": { "type": "object", "properties": { "schema_version": { - "type": "string" + "type": "string", + "description": "Version of the schema." }, "snap_token": { - "type": "string" + "type": "string", + "description": "Token associated with the snap." }, "depth": { "type": "integer", - "format": "int32" + "format": "int32", + "description": "Depth of lookup, required, must be greater or equal to 3." } }, - "title": "PermissionLookupEntityRequestMetadata" + "description": "PermissionLookupEntityRequestMetadata is the metadata associated with a PermissionLookupEntityRequest." }, "v1PermissionLookupEntityResponse": { "type": "object", @@ -1077,31 +1877,40 @@ "type": "array", "items": { "type": "string" - } + }, + "description": "List of identifiers for entities that match the lookup." } }, - "title": "PermissionLookupEntityResponse" + "description": "PermissionLookupEntityResponse is the response message for the LookupEntity method in the Permission service." }, "v1PermissionLookupEntityStreamResponse": { "type": "object", "properties": { "entity_id": { - "type": "string" + "type": "string", + "description": "Identifier for an entity that matches the lookup." } }, - "title": "PermissionLookupEntityStreamResponse" + "description": "PermissionLookupEntityStreamResponse is the response message for the LookupEntityStream method in the Permission service." }, "v1PermissionLookupSubjectRequestMetadata": { "type": "object", "properties": { "schema_version": { - "type": "string" + "type": "string", + "description": "Version of the schema." }, "snap_token": { - "type": "string" + "type": "string", + "description": "Token associated with the snap." + }, + "depth": { + "type": "integer", + "format": "int32", + "description": "Depth of the check, must be greater than or equal to 3." } }, - "title": "PermissionLookupSubjectRequestMetadata" + "description": "PermissionLookupSubjectRequestMetadata is the metadata associated with a PermissionLookupSubjectRequest." }, "v1PermissionLookupSubjectResponse": { "type": "object", @@ -1110,29 +1919,34 @@ "type": "array", "items": { "type": "string" - } + }, + "description": "List of identifiers for subjects that match the lookup." } }, - "title": "PermissionLookupSubjectResponse" + "description": "PermissionLookupSubjectResponse is the response message for the LookupSubject method in the Permission service." }, "v1PermissionSubjectPermissionRequestMetadata": { "type": "object", "properties": { "schema_version": { - "type": "string" + "type": "string", + "description": "Version of the schema." }, "snap_token": { - "type": "string" + "type": "string", + "description": "Token associated with the snap." }, "only_permission": { - "type": "boolean" + "type": "boolean", + "description": "Whether to only check permissions." }, "depth": { "type": "integer", - "format": "int32" + "format": "int32", + "description": "Depth of the check, must be greater than or equal to 3." } }, - "title": "PermissionCheckRequestMetadata" + "description": "PermissionSubjectPermissionRequestMetadata is the metadata associated with a PermissionSubjectPermissionRequest." }, "v1PermissionSubjectPermissionResponse": { "type": "object", @@ -1141,37 +1955,42 @@ "type": "object", "additionalProperties": { "$ref": "#/definitions/v1CheckResult" - } + }, + "description": "Map of results for each permission check." } }, - "title": "SubjectPermissionResponse" + "description": "PermissionSubjectPermissionResponse is the response message for the SubjectPermission method in the Permission service." }, "v1RelationDefinition": { "type": "object", "properties": { "name": { - "type": "string" + "type": "string", + "description": "The name of the relation, which follows a specific string pattern and has a maximum byte size." }, "relationReferences": { "type": "array", "items": { "$ref": "#/definitions/v1RelationReference" - } + }, + "description": "A list of references to other relations." } }, - "title": "RelationDefinition" + "description": "The RelationDefinition message provides detailed information about a specific relation." }, "v1RelationReference": { "type": "object", "properties": { "type": { - "type": "string" + "type": "string", + "description": "The type of the referenced entity, which follows a specific string pattern and has a maximum byte size." }, "relation": { - "type": "string" + "type": "string", + "description": "The name of the referenced relation, which follows a specific string pattern and has a maximum byte size." } }, - "title": "RelationReference" + "description": "The RelationReference message provides a reference to a specific relation." }, "v1RelationshipDeleteResponse": { "type": "object", @@ -1186,10 +2005,11 @@ "type": "object", "properties": { "snap_token": { - "type": "string" + "type": "string", + "description": "snap_token represents a specific state or \"snapshot\" of the database." } }, - "title": "RelationshipWriteRequestMetadata" + "description": "RelationshipReadRequestMetadata defines the structure of the metadata for a read request focused on relationships.\nIt includes the snap_token associated with a particular state of the database." }, "v1RelationshipReadResponse": { "type": "object", @@ -1198,13 +2018,15 @@ "type": "array", "items": { "$ref": "#/definitions/v1Tuple" - } + }, + "description": "tuples is a list of the relationships retrieved in the read operation, represented as entity-relation-entity triples." }, "continuous_token": { - "type": "string" + "type": "string", + "description": "continuous_token is used in the case of paginated reads to retrieve the next page of results." } }, - "title": "RelationshipReadResponse" + "description": "RelationshipReadResponse defines the structure of the response after reading relationships.\nIt includes the tuples representing the relationships and a continuous token for handling result pagination." }, "v1RelationshipWriteRequestMetadata": { "type": "object", @@ -1228,16 +2050,18 @@ "type": "object", "properties": { "rewriteOperation": { - "$ref": "#/definitions/v1RewriteOperation" + "$ref": "#/definitions/v1RewriteOperation", + "description": "The type of rewrite operation to be performed." }, "children": { "type": "array", "items": { "$ref": "#/definitions/v1Child" - } + }, + "description": "A list of children that are operated upon by the rewrite operation." } }, - "title": "Rewrite" + "description": "The Rewrite message represents a specific rewrite operation.\nThis operation could be one of the following: union, intersection, or exclusion." }, "v1RewriteOperation": { "type": "string", @@ -1248,7 +2072,28 @@ "OPERATION_EXCLUSION" ], "default": "OPERATION_UNSPECIFIED", - "title": "Operation" + "description": "Operation enum includes potential rewrite operations.\nOPERATION_UNION: Represents a union operation.\nOPERATION_INTERSECTION: Represents an intersection operation.\nOPERATION_EXCLUSION: Represents an exclusion operation." + }, + "v1RuleDefinition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the rule, which follows a specific string pattern and has a maximum byte size." + }, + "arguments": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1AttributeType" + }, + "description": "Map of arguments for this rule. The key is the attribute name, and the value is the AttributeType." + }, + "expression": { + "$ref": "#/definitions/v1alpha1CheckedExpr", + "description": "The expression for this rule in the form of a google.api.expr.v1alpha1.CheckedExpr." + } + }, + "description": "The RuleDefinition message provides detailed information about a specific rule." }, "v1SchemaDefinition": { "type": "object", @@ -1257,37 +2102,65 @@ "type": "object", "additionalProperties": { "$ref": "#/definitions/v1EntityDefinition" - } + }, + "description": "Map of entity definitions. The key is the entity name, and the value is the corresponding EntityDefinition." + }, + "ruleDefinitions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1RuleDefinition" + }, + "description": "Map of rule definitions. The key is the rule name, and the value is the corresponding RuleDefinition." + }, + "references": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1SchemaDefinitionReference" + }, + "description": "Map of references to signify whether a string refers to an entity or a rule." } }, - "title": "Definition" + "description": "The SchemaDefinition message provides definitions for entities and rules,\nand includes references to clarify whether a name refers to an entity or a rule." + }, + "v1SchemaDefinitionReference": { + "type": "string", + "enum": [ + "REFERENCE_UNSPECIFIED", + "REFERENCE_ENTITY", + "REFERENCE_RULE" + ], + "default": "REFERENCE_UNSPECIFIED", + "description": "The Reference enum helps distinguish whether a name corresponds to an entity or a rule." }, "v1SchemaReadRequestMetadata": { "type": "object", "properties": { "schema_version": { - "type": "string" + "type": "string", + "description": "schema_version is the string that identifies the version of the schema to be read." } }, - "title": "SchemaReadRequestMetadata" + "description": "SchemaReadRequestMetadata provides additional information for the Schema Read request.\nIt contains schema_version to specify which version of the schema should be read." }, "v1SchemaReadResponse": { "type": "object", "properties": { "schema": { - "$ref": "#/definitions/v1SchemaDefinition" + "$ref": "#/definitions/v1SchemaDefinition", + "description": "schema is the SchemaDefinition that represents the read schema." } }, - "title": "SchemaReadRequest" + "description": "SchemaReadResponse is the response message for the Read method in the Schema service.\nIt returns the requested schema." }, "v1SchemaWriteResponse": { "type": "object", "properties": { "schema_version": { - "type": "string" + "type": "string", + "description": "schema_version is the string that identifies the version of the written schema." } }, - "title": "SchemaWriteResponse" + "description": "SchemaWriteResponse is the response message for the Write method in the Schema service.\nIt returns the version of the written schema." }, "v1Subject": { "type": "object", @@ -1302,7 +2175,7 @@ "type": "string" } }, - "title": "Subject" + "description": "Subject represents an entity subject with a type, an identifier, and a relation." }, "v1SubjectFilter": { "type": "object", @@ -1320,7 +2193,7 @@ "type": "string" } }, - "title": "SubjectFilter is used to filter subjects" + "description": "SubjectFilter is used to filter subjects based on the type, ids and relation." }, "v1Subjects": { "type": "object", @@ -1332,7 +2205,7 @@ } } }, - "title": "Result" + "description": "Subjects holds a repeated field of Subject type." }, "v1Tenant": { "type": "object", @@ -1348,50 +2221,56 @@ "format": "date-time" } }, - "title": "Tenant" + "description": "Tenant represents a tenant with an id, a name, and a timestamp indicating when it was created." }, "v1TenantCreateRequest": { "type": "object", "properties": { "id": { - "type": "string" + "type": "string", + "description": "id is a unique identifier for the tenant." }, "name": { - "type": "string" + "type": "string", + "description": "name is the name of the tenant." } }, - "title": "TenantCreateRequest" + "description": "TenantCreateRequest is the message used for the request to create a tenant." }, "v1TenantCreateResponse": { "type": "object", "properties": { "tenant": { - "$ref": "#/definitions/v1Tenant" + "$ref": "#/definitions/v1Tenant", + "description": "tenant is the created tenant information." } }, - "title": "TenantCreateResponse" + "description": "TenantCreateResponse is the message returned from the request to create a tenant." }, "v1TenantDeleteResponse": { "type": "object", "properties": { "tenant": { - "$ref": "#/definitions/v1Tenant" + "$ref": "#/definitions/v1Tenant", + "description": "tenant is the tenant information that was deleted." } }, - "title": "TenantDeleteResponse" + "description": "TenantDeleteResponse is the message returned from the request to delete a tenant." }, "v1TenantListRequest": { "type": "object", "properties": { "page_size": { "type": "integer", - "format": "int64" + "format": "int64", + "description": "page_size is the number of tenants to be returned in the response.\nThe value should be between 1 and 100." }, "continuous_token": { - "type": "string" + "type": "string", + "description": "continuous_token is an optional parameter used for pagination.\nIt should be the value received in the previous response." } }, - "title": "TenantListRequest" + "description": "TenantListRequest is the message used for the request to list all tenants." }, "v1TenantListResponse": { "type": "object", @@ -1400,13 +2279,15 @@ "type": "array", "items": { "$ref": "#/definitions/v1Tenant" - } + }, + "description": "tenants is a list of tenants." }, "continuous_token": { - "type": "string" + "type": "string", + "description": "continuous_token is a string that can be used to paginate and retrieve the next set of results." } }, - "title": "TenantListResponse" + "description": "TenantListResponse is the message returned from the request to list all tenants." }, "v1Tuple": { "type": "object", @@ -1421,43 +2302,7 @@ "$ref": "#/definitions/v1Subject" } }, - "title": "Tuple" - }, - "v1TupleChange": { - "type": "object", - "properties": { - "operation": { - "$ref": "#/definitions/v1TupleChangeOperation" - }, - "tuple": { - "$ref": "#/definitions/v1Tuple" - } - }, - "title": "TupleChange" - }, - "v1TupleChangeOperation": { - "type": "string", - "enum": [ - "OPERATION_UNSPECIFIED", - "OPERATION_CREATE", - "OPERATION_DELETE" - ], - "default": "OPERATION_UNSPECIFIED" - }, - "v1TupleChanges": { - "type": "object", - "properties": { - "snap_token": { - "type": "string" - }, - "tuple_changes": { - "type": "array", - "items": { - "$ref": "#/definitions/v1TupleChange" - } - } - }, - "title": "TupleChanges" + "description": "Tuple is a structure that includes an entity, a relation, and a subject." }, "v1TupleFilter": { "type": "object", @@ -1472,7 +2317,7 @@ "$ref": "#/definitions/v1SubjectFilter" } }, - "title": "TupleFilter is used to filter tuples" + "description": "TupleFilter is used to filter tuples based on the entity, relation and the subject." }, "v1TupleSet": { "type": "object", @@ -1481,7 +2326,7 @@ "type": "string" } }, - "title": "TupleSet" + "description": "TupleSet represents a set of tuples associated with a specific relation." }, "v1TupleToUserSet": { "type": "object", @@ -1493,16 +2338,204 @@ "$ref": "#/definitions/v1ComputedUserSet" } }, - "title": "TupleToUserSet" + "description": "TupleToUserSet defines a mapping from tuple sets to computed user sets." + }, + "v1Values": { + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/protobufAny" + } + } + } }, "v1WatchResponse": { "type": "object", "properties": { "changes": { - "$ref": "#/definitions/v1TupleChanges" + "$ref": "#/definitions/v1DataChanges", + "description": "Changes in the data." + } + }, + "description": "WatchResponse is the response message for the Watch RPC. It contains the\nchanges in the data that are being watched." + }, + "v1alpha1CheckedExpr": { + "type": "object", + "properties": { + "referenceMap": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/exprv1alpha1Reference" + }, + "description": "A map from expression ids to resolved references.\n\nThe following entries are in this table:\n\n- An Ident or Select expression is represented here if it resolves to a\n declaration. For instance, if `a.b.c` is represented by\n `select(select(id(a), b), c)`, and `a.b` resolves to a declaration,\n while `c` is a field selection, then the reference is attached to the\n nested select expression (but not to the id or or the outer select).\n In turn, if `a` resolves to a declaration and `b.c` are field selections,\n the reference is attached to the ident expression.\n- Every Call expression has an entry here, identifying the function being\n called.\n- Every CreateStruct expression for a message has an entry, identifying\n the message." + }, + "typeMap": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/exprv1alpha1Type" + }, + "description": "A map from expression ids to types.\n\nEvery expression node which has a type different than DYN has a mapping\nhere. If an expression has type DYN, it is omitted from this map to save\nspace." + }, + "sourceInfo": { + "$ref": "#/definitions/v1alpha1SourceInfo", + "description": "The source info derived from input that generated the parsed `expr` and\nany optimizations made during the type-checking pass." + }, + "exprVersion": { + "type": "string", + "description": "The expr version indicates the major / minor version number of the `expr`\nrepresentation.\n\nThe most common reason for a version change will be to indicate to the CEL\nruntimes that transformations have been performed on the expr during static\nanalysis. In some cases, this will save the runtime the work of applying\nthe same or similar transformations prior to evaluation." + }, + "expr": { + "$ref": "#/definitions/v1alpha1Expr", + "description": "The checked expression. Semantically equivalent to the parsed `expr`, but\nmay have structural differences." + } + }, + "description": "A CEL expression which has been successfully type checked." + }, + "v1alpha1Constant": { + "type": "object", + "properties": { + "nullValue": { + "type": "string", + "description": "null value." + }, + "boolValue": { + "type": "boolean", + "description": "boolean value." + }, + "int64Value": { + "type": "string", + "format": "int64", + "description": "int64 value." + }, + "uint64Value": { + "type": "string", + "format": "uint64", + "description": "uint64 value." + }, + "doubleValue": { + "type": "number", + "format": "double", + "description": "double value." + }, + "stringValue": { + "type": "string", + "description": "string value." + }, + "bytesValue": { + "type": "string", + "format": "byte", + "description": "bytes value." + }, + "durationValue": { + "type": "string", + "description": "protobuf.Duration value.\n\nDeprecated: duration is no longer considered a builtin cel type." + }, + "timestampValue": { + "type": "string", + "format": "date-time", + "description": "protobuf.Timestamp value.\n\nDeprecated: timestamp is no longer considered a builtin cel type." + } + }, + "description": "Represents a primitive literal.\n\nNamed 'Constant' here for backwards compatibility.\n\nThis is similar as the primitives supported in the well-known type\n`google.protobuf.Value`, but richer so it can represent CEL's full range of\nprimitives.\n\nLists and structs are not included as constants as these aggregate types may\ncontain [Expr][google.api.expr.v1alpha1.Expr] elements which require evaluation and are thus not constant.\n\nExamples of literals include: `\"hello\"`, `b'bytes'`, `1u`, `4.2`, `-2`,\n`true`, `null`." + }, + "v1alpha1Expr": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "int64", + "description": "Required. An id assigned to this node by the parser which is unique in a\ngiven expression tree. This is used to associate type information and other\nattributes to a node in the parse tree." + }, + "constExpr": { + "$ref": "#/definitions/v1alpha1Constant", + "description": "A literal expression." + }, + "identExpr": { + "$ref": "#/definitions/ExprIdent", + "description": "An identifier expression." + }, + "selectExpr": { + "$ref": "#/definitions/ExprSelect", + "description": "A field selection expression, e.g. `request.auth`." + }, + "callExpr": { + "$ref": "#/definitions/v1alpha1ExprCall", + "description": "A call expression, including calls to predefined functions and operators." + }, + "listExpr": { + "$ref": "#/definitions/ExprCreateList", + "description": "A list creation expression." + }, + "structExpr": { + "$ref": "#/definitions/ExprCreateStruct", + "description": "A map or message creation expression." + }, + "comprehensionExpr": { + "$ref": "#/definitions/ExprComprehension", + "description": "A comprehension expression." + } + }, + "description": "An abstract representation of a common expression.\n\nExpressions are abstractly represented as a collection of identifiers,\nselect statements, function calls, literals, and comprehensions. All\noperators with the exception of the '.' operator are modelled as function\ncalls. This makes it easy to represent new operators into the existing AST.\n\nAll references within expressions must resolve to a [Decl][google.api.expr.v1alpha1.Decl] provided at\ntype-check for an expression to be valid. A reference may either be a bare\nidentifier `name` or a qualified identifier `google.api.name`. References\nmay either refer to a value or a function declaration.\n\nFor example, the expression `google.api.name.startsWith('expr')` references\nthe declaration `google.api.name` within a [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and\nthe function declaration `startsWith`." + }, + "v1alpha1ExprCall": { + "type": "object", + "properties": { + "target": { + "$ref": "#/definitions/v1alpha1Expr", + "description": "The target of an method call-style expression. For example, `x` in\n`x.f()`." + }, + "function": { + "type": "string", + "description": "Required. The name of the function or method being called." + }, + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha1Expr" + }, + "description": "The arguments." + } + }, + "description": "A call expression, including calls to predefined functions and operators.\n\nFor example, `value == 10`, `size(map_value)`." + }, + "v1alpha1SourceInfo": { + "type": "object", + "properties": { + "syntaxVersion": { + "type": "string", + "description": "The syntax version of the source, e.g. `cel1`." + }, + "location": { + "type": "string", + "description": "The location name. All position information attached to an expression is\nrelative to this location.\n\nThe location could be a file, UI element, or similar. For example,\n`acme/app/AnvilPolicy.cel`." + }, + "lineOffsets": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "Monotonically increasing list of code point offsets where newlines\n`\\n` appear.\n\nThe line number of a given position is the index `i` where for a given\n`id` the `line_offsets[i] \u003c id_positions[id] \u003c line_offsets[i+1]`. The\ncolumn may be derivd from `id_positions[id] - line_offsets[i]`." + }, + "positions": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int32" + }, + "description": "A map from the parse node id (e.g. `Expr.id`) to the code point offset\nwithin the source." + }, + "macroCalls": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1alpha1Expr" + }, + "description": "A map from the parse node id where a macro replacement was made to the\ncall `Expr` that resulted in a macro expansion.\n\nFor example, `has(value.field)` is a function call that is replaced by a\n`test_only` field selection in the AST. Likewise, the call\n`list.exists(e, e \u003e 10)` translates to a comprehension expression. The key\nin the map corresponds to the expression id of the expanded macro, and the\nvalue is the call `Expr` that was replaced." } }, - "title": "WatchResponse" + "description": "Source information collected at parse time." } }, "securityDefinitions": { diff --git a/generated/base/v1/base.pb.go b/generated/base/v1/base.pb.go index 628dbef..89aae2d 100644 --- a/generated/base/v1/base.pb.go +++ b/generated/base/v1/base.pb.go @@ -8,8 +8,11 @@ package v1 import ( _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + structpb "google.golang.org/protobuf/types/known/structpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" @@ -22,26 +25,29 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// CheckResult +// Enumerates results of a check operation. type CheckResult int32 const ( - CheckResult_RESULT_UNKNOWN CheckResult = 0 - CheckResult_RESULT_ALLOWED CheckResult = 1 - CheckResult_RESULT_DENIED CheckResult = 2 + // Not specified check result. This is the default value. + CheckResult_CHECK_RESULT_UNSPECIFIED CheckResult = 0 + // Represents a successful check (the check allowed the operation). + CheckResult_CHECK_RESULT_ALLOWED CheckResult = 1 + // Represents a failed check (the check denied the operation). + CheckResult_CHECK_RESULT_DENIED CheckResult = 2 ) // Enum value maps for CheckResult. var ( CheckResult_name = map[int32]string{ - 0: "RESULT_UNKNOWN", - 1: "RESULT_ALLOWED", - 2: "RESULT_DENIED", + 0: "CHECK_RESULT_UNSPECIFIED", + 1: "CHECK_RESULT_ALLOWED", + 2: "CHECK_RESULT_DENIED", } CheckResult_value = map[string]int32{ - "RESULT_UNKNOWN": 0, - "RESULT_ALLOWED": 1, - "RESULT_DENIED": 2, + "CHECK_RESULT_UNSPECIFIED": 0, + "CHECK_RESULT_ALLOWED": 1, + "CHECK_RESULT_DENIED": 2, } ) @@ -72,14 +78,94 @@ func (CheckResult) EnumDescriptor() ([]byte, []int) { return file_base_v1_base_proto_rawDescGZIP(), []int{0} } -// Operation +// Enumerates the types of attribute. +type AttributeType int32 + +const ( + // Not specified attribute type. This is the default value. + AttributeType_ATTRIBUTE_TYPE_UNSPECIFIED AttributeType = 0 + // A boolean attribute type. + AttributeType_ATTRIBUTE_TYPE_BOOLEAN AttributeType = 1 + // A boolean array attribute type. + AttributeType_ATTRIBUTE_TYPE_BOOLEAN_ARRAY AttributeType = 2 + // A string attribute type. + AttributeType_ATTRIBUTE_TYPE_STRING AttributeType = 3 + // A string array attribute type. + AttributeType_ATTRIBUTE_TYPE_STRING_ARRAY AttributeType = 4 + // An integer attribute type. + AttributeType_ATTRIBUTE_TYPE_INTEGER AttributeType = 5 + // An integer array attribute type. + AttributeType_ATTRIBUTE_TYPE_INTEGER_ARRAY AttributeType = 6 + // A double attribute type. + AttributeType_ATTRIBUTE_TYPE_DOUBLE AttributeType = 7 + // A double array attribute type. + AttributeType_ATTRIBUTE_TYPE_DOUBLE_ARRAY AttributeType = 8 +) + +// Enum value maps for AttributeType. +var ( + AttributeType_name = map[int32]string{ + 0: "ATTRIBUTE_TYPE_UNSPECIFIED", + 1: "ATTRIBUTE_TYPE_BOOLEAN", + 2: "ATTRIBUTE_TYPE_BOOLEAN_ARRAY", + 3: "ATTRIBUTE_TYPE_STRING", + 4: "ATTRIBUTE_TYPE_STRING_ARRAY", + 5: "ATTRIBUTE_TYPE_INTEGER", + 6: "ATTRIBUTE_TYPE_INTEGER_ARRAY", + 7: "ATTRIBUTE_TYPE_DOUBLE", + 8: "ATTRIBUTE_TYPE_DOUBLE_ARRAY", + } + AttributeType_value = map[string]int32{ + "ATTRIBUTE_TYPE_UNSPECIFIED": 0, + "ATTRIBUTE_TYPE_BOOLEAN": 1, + "ATTRIBUTE_TYPE_BOOLEAN_ARRAY": 2, + "ATTRIBUTE_TYPE_STRING": 3, + "ATTRIBUTE_TYPE_STRING_ARRAY": 4, + "ATTRIBUTE_TYPE_INTEGER": 5, + "ATTRIBUTE_TYPE_INTEGER_ARRAY": 6, + "ATTRIBUTE_TYPE_DOUBLE": 7, + "ATTRIBUTE_TYPE_DOUBLE_ARRAY": 8, + } +) + +func (x AttributeType) Enum() *AttributeType { + p := new(AttributeType) + *p = x + return p +} + +func (x AttributeType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AttributeType) Descriptor() protoreflect.EnumDescriptor { + return file_base_v1_base_proto_enumTypes[1].Descriptor() +} + +func (AttributeType) Type() protoreflect.EnumType { + return &file_base_v1_base_proto_enumTypes[1] +} + +func (x AttributeType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AttributeType.Descriptor instead. +func (AttributeType) EnumDescriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{1} +} + +// Operation enum includes potential rewrite operations. +// OPERATION_UNION: Represents a union operation. +// OPERATION_INTERSECTION: Represents an intersection operation. +// OPERATION_EXCLUSION: Represents an exclusion operation. type Rewrite_Operation int32 const ( - Rewrite_OPERATION_UNSPECIFIED Rewrite_Operation = 0 - Rewrite_OPERATION_UNION Rewrite_Operation = 1 - Rewrite_OPERATION_INTERSECTION Rewrite_Operation = 2 - Rewrite_OPERATION_EXCLUSION Rewrite_Operation = 3 + Rewrite_OPERATION_UNSPECIFIED Rewrite_Operation = 0 // Default, unspecified operation. + Rewrite_OPERATION_UNION Rewrite_Operation = 1 // Represents a union operation. + Rewrite_OPERATION_INTERSECTION Rewrite_Operation = 2 // Represents an intersection operation. + Rewrite_OPERATION_EXCLUSION Rewrite_Operation = 3 // Represents an exclusion operation. ) // Enum value maps for Rewrite_Operation. @@ -109,11 +195,11 @@ func (x Rewrite_Operation) String() string { } func (Rewrite_Operation) Descriptor() protoreflect.EnumDescriptor { - return file_base_v1_base_proto_enumTypes[1].Descriptor() + return file_base_v1_base_proto_enumTypes[2].Descriptor() } func (Rewrite_Operation) Type() protoreflect.EnumType { - return &file_base_v1_base_proto_enumTypes[1] + return &file_base_v1_base_proto_enumTypes[2] } func (x Rewrite_Operation) Number() protoreflect.EnumNumber { @@ -122,60 +208,113 @@ func (x Rewrite_Operation) Number() protoreflect.EnumNumber { // Deprecated: Use Rewrite_Operation.Descriptor instead. func (Rewrite_Operation) EnumDescriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{2, 0} + return file_base_v1_base_proto_rawDescGZIP(), []int{3, 0} } -// RelationalReference -type EntityDefinition_RelationalReference int32 +// The Reference enum helps distinguish whether a name corresponds to an entity or a rule. +type SchemaDefinition_Reference int32 const ( - EntityDefinition_RELATIONAL_REFERENCE_UNSPECIFIED EntityDefinition_RelationalReference = 0 - EntityDefinition_RELATIONAL_REFERENCE_RELATION EntityDefinition_RelationalReference = 1 - EntityDefinition_RELATIONAL_REFERENCE_PERMISSION EntityDefinition_RelationalReference = 2 + SchemaDefinition_REFERENCE_UNSPECIFIED SchemaDefinition_Reference = 0 // Default, unspecified reference. + SchemaDefinition_REFERENCE_ENTITY SchemaDefinition_Reference = 1 // Indicates that the name refers to an entity. + SchemaDefinition_REFERENCE_RULE SchemaDefinition_Reference = 2 // Indicates that the name refers to a rule. ) -// Enum value maps for EntityDefinition_RelationalReference. +// Enum value maps for SchemaDefinition_Reference. var ( - EntityDefinition_RelationalReference_name = map[int32]string{ - 0: "RELATIONAL_REFERENCE_UNSPECIFIED", - 1: "RELATIONAL_REFERENCE_RELATION", - 2: "RELATIONAL_REFERENCE_PERMISSION", + SchemaDefinition_Reference_name = map[int32]string{ + 0: "REFERENCE_UNSPECIFIED", + 1: "REFERENCE_ENTITY", + 2: "REFERENCE_RULE", } - EntityDefinition_RelationalReference_value = map[string]int32{ - "RELATIONAL_REFERENCE_UNSPECIFIED": 0, - "RELATIONAL_REFERENCE_RELATION": 1, - "RELATIONAL_REFERENCE_PERMISSION": 2, + SchemaDefinition_Reference_value = map[string]int32{ + "REFERENCE_UNSPECIFIED": 0, + "REFERENCE_ENTITY": 1, + "REFERENCE_RULE": 2, } ) -func (x EntityDefinition_RelationalReference) Enum() *EntityDefinition_RelationalReference { - p := new(EntityDefinition_RelationalReference) +func (x SchemaDefinition_Reference) Enum() *SchemaDefinition_Reference { + p := new(SchemaDefinition_Reference) *p = x return p } -func (x EntityDefinition_RelationalReference) String() string { +func (x SchemaDefinition_Reference) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (EntityDefinition_RelationalReference) Descriptor() protoreflect.EnumDescriptor { - return file_base_v1_base_proto_enumTypes[2].Descriptor() +func (SchemaDefinition_Reference) Descriptor() protoreflect.EnumDescriptor { + return file_base_v1_base_proto_enumTypes[3].Descriptor() } -func (EntityDefinition_RelationalReference) Type() protoreflect.EnumType { - return &file_base_v1_base_proto_enumTypes[2] +func (SchemaDefinition_Reference) Type() protoreflect.EnumType { + return &file_base_v1_base_proto_enumTypes[3] } -func (x EntityDefinition_RelationalReference) Number() protoreflect.EnumNumber { +func (x SchemaDefinition_Reference) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use EntityDefinition_RelationalReference.Descriptor instead. -func (EntityDefinition_RelationalReference) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use SchemaDefinition_Reference.Descriptor instead. +func (SchemaDefinition_Reference) EnumDescriptor() ([]byte, []int) { return file_base_v1_base_proto_rawDescGZIP(), []int{4, 0} } -// Operation +// The Reference enum specifies whether a name pertains to a relation, permission, or attribute. +type EntityDefinition_Reference int32 + +const ( + EntityDefinition_REFERENCE_UNSPECIFIED EntityDefinition_Reference = 0 // Default, unspecified reference. + EntityDefinition_REFERENCE_RELATION EntityDefinition_Reference = 1 // Indicates that the name refers to a relation. + EntityDefinition_REFERENCE_PERMISSION EntityDefinition_Reference = 2 // Indicates that the name refers to a permission. + EntityDefinition_REFERENCE_ATTRIBUTE EntityDefinition_Reference = 3 // Indicates that the name refers to an attribute. +) + +// Enum value maps for EntityDefinition_Reference. +var ( + EntityDefinition_Reference_name = map[int32]string{ + 0: "REFERENCE_UNSPECIFIED", + 1: "REFERENCE_RELATION", + 2: "REFERENCE_PERMISSION", + 3: "REFERENCE_ATTRIBUTE", + } + EntityDefinition_Reference_value = map[string]int32{ + "REFERENCE_UNSPECIFIED": 0, + "REFERENCE_RELATION": 1, + "REFERENCE_PERMISSION": 2, + "REFERENCE_ATTRIBUTE": 3, + } +) + +func (x EntityDefinition_Reference) Enum() *EntityDefinition_Reference { + p := new(EntityDefinition_Reference) + *p = x + return p +} + +func (x EntityDefinition_Reference) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EntityDefinition_Reference) Descriptor() protoreflect.EnumDescriptor { + return file_base_v1_base_proto_enumTypes[4].Descriptor() +} + +func (EntityDefinition_Reference) Type() protoreflect.EnumType { + return &file_base_v1_base_proto_enumTypes[4] +} + +func (x EntityDefinition_Reference) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EntityDefinition_Reference.Descriptor instead. +func (EntityDefinition_Reference) EnumDescriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{5, 0} +} + +// Operation is an enum representing the type of operation to be applied on the tree node. type ExpandTreeNode_Operation int32 const ( @@ -212,11 +351,11 @@ func (x ExpandTreeNode_Operation) String() string { } func (ExpandTreeNode_Operation) Descriptor() protoreflect.EnumDescriptor { - return file_base_v1_base_proto_enumTypes[3].Descriptor() + return file_base_v1_base_proto_enumTypes[5].Descriptor() } func (ExpandTreeNode_Operation) Type() protoreflect.EnumType { - return &file_base_v1_base_proto_enumTypes[3] + return &file_base_v1_base_proto_enumTypes[5] } func (x ExpandTreeNode_Operation) Number() protoreflect.EnumNumber { @@ -225,64 +364,134 @@ func (x ExpandTreeNode_Operation) Number() protoreflect.EnumNumber { // Deprecated: Use ExpandTreeNode_Operation.Descriptor instead. func (ExpandTreeNode_Operation) EnumDescriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{19, 0} + return file_base_v1_base_proto_rawDescGZIP(), []int{29, 0} } -type TupleChange_Operation int32 +type DataChange_Operation int32 const ( - TupleChange_OPERATION_UNSPECIFIED TupleChange_Operation = 0 - TupleChange_OPERATION_CREATE TupleChange_Operation = 1 - TupleChange_OPERATION_DELETE TupleChange_Operation = 2 + DataChange_OPERATION_UNSPECIFIED DataChange_Operation = 0 // Default operation, not specified. + DataChange_OPERATION_CREATE DataChange_Operation = 1 // Creation operation. + DataChange_OPERATION_DELETE DataChange_Operation = 2 // Deletion operation. ) -// Enum value maps for TupleChange_Operation. +// Enum value maps for DataChange_Operation. var ( - TupleChange_Operation_name = map[int32]string{ + DataChange_Operation_name = map[int32]string{ 0: "OPERATION_UNSPECIFIED", 1: "OPERATION_CREATE", 2: "OPERATION_DELETE", } - TupleChange_Operation_value = map[string]int32{ + DataChange_Operation_value = map[string]int32{ "OPERATION_UNSPECIFIED": 0, "OPERATION_CREATE": 1, "OPERATION_DELETE": 2, } ) -func (x TupleChange_Operation) Enum() *TupleChange_Operation { - p := new(TupleChange_Operation) +func (x DataChange_Operation) Enum() *DataChange_Operation { + p := new(DataChange_Operation) *p = x return p } -func (x TupleChange_Operation) String() string { +func (x DataChange_Operation) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (TupleChange_Operation) Descriptor() protoreflect.EnumDescriptor { - return file_base_v1_base_proto_enumTypes[4].Descriptor() +func (DataChange_Operation) Descriptor() protoreflect.EnumDescriptor { + return file_base_v1_base_proto_enumTypes[6].Descriptor() } -func (TupleChange_Operation) Type() protoreflect.EnumType { - return &file_base_v1_base_proto_enumTypes[4] +func (DataChange_Operation) Type() protoreflect.EnumType { + return &file_base_v1_base_proto_enumTypes[6] } -func (x TupleChange_Operation) Number() protoreflect.EnumNumber { +func (x DataChange_Operation) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use TupleChange_Operation.Descriptor instead. -func (TupleChange_Operation) EnumDescriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{24, 0} +// Deprecated: Use DataChange_Operation.Descriptor instead. +func (DataChange_Operation) EnumDescriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{36, 0} +} + +// Context encapsulates the information related to a single operation, +// including the tuples involved and the associated attributes. +type Context struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A repeated field of tuples involved in the operation. + Tuples []*Tuple `protobuf:"bytes,1,rep,name=tuples,proto3" json:"tuples,omitempty"` + // A repeated field of attributes associated with the operation. + Attributes []*Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` + // Additional data associated with the context. + Data *structpb.Struct `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *Context) Reset() { + *x = Context{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Context) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Context) ProtoMessage() {} + +func (x *Context) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 Context.ProtoReflect.Descriptor instead. +func (*Context) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{0} +} + +func (x *Context) GetTuples() []*Tuple { + if x != nil { + return x.Tuples + } + return nil +} + +func (x *Context) GetAttributes() []*Attribute { + if x != nil { + return x.Attributes + } + return nil +} + +func (x *Context) GetData() *structpb.Struct { + if x != nil { + return x.Data + } + return nil } -// Child +// Child represents a node in the permission tree. type Child struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Child node can be either a leaf or a rewrite operation. + // // Types that are assignable to Type: // *Child_Leaf // *Child_Rewrite @@ -292,7 +501,7 @@ type Child struct { func (x *Child) Reset() { *x = Child{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[0] + mi := &file_base_v1_base_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -305,7 +514,7 @@ func (x *Child) String() string { func (*Child) ProtoMessage() {} func (x *Child) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[0] + mi := &file_base_v1_base_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -318,7 +527,7 @@ func (x *Child) ProtoReflect() protoreflect.Message { // Deprecated: Use Child.ProtoReflect.Descriptor instead. func (*Child) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{0} + return file_base_v1_base_proto_rawDescGZIP(), []int{1} } func (m *Child) GetType() isChild_Type { @@ -347,10 +556,12 @@ type isChild_Type interface { } type Child_Leaf struct { + // Leaf node in the permission tree. Leaf *Leaf `protobuf:"bytes,1,opt,name=leaf,proto3,oneof"` } type Child_Rewrite struct { + // Rewrite operation in the permission tree. Rewrite *Rewrite `protobuf:"bytes,2,opt,name=rewrite,proto3,oneof"` } @@ -358,22 +569,26 @@ func (*Child_Leaf) isChild_Type() {} func (*Child_Rewrite) isChild_Type() {} -// Leaf +// Leaf represents a leaf node in the permission tree. type Leaf struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Leaf node can be one of several types. + // // Types that are assignable to Type: // *Leaf_ComputedUserSet // *Leaf_TupleToUserSet + // *Leaf_ComputedAttribute + // *Leaf_Call Type isLeaf_Type `protobuf_oneof:"type"` } func (x *Leaf) Reset() { *x = Leaf{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[1] + mi := &file_base_v1_base_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -386,7 +601,7 @@ func (x *Leaf) String() string { func (*Leaf) ProtoMessage() {} func (x *Leaf) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[1] + mi := &file_base_v1_base_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -399,7 +614,7 @@ func (x *Leaf) ProtoReflect() protoreflect.Message { // Deprecated: Use Leaf.ProtoReflect.Descriptor instead. func (*Leaf) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{1} + return file_base_v1_base_proto_rawDescGZIP(), []int{2} } func (m *Leaf) GetType() isLeaf_Type { @@ -423,36 +638,69 @@ func (x *Leaf) GetTupleToUserSet() *TupleToUserSet { return nil } +func (x *Leaf) GetComputedAttribute() *ComputedAttribute { + if x, ok := x.GetType().(*Leaf_ComputedAttribute); ok { + return x.ComputedAttribute + } + return nil +} + +func (x *Leaf) GetCall() *Call { + if x, ok := x.GetType().(*Leaf_Call); ok { + return x.Call + } + return nil +} + type isLeaf_Type interface { isLeaf_Type() } type Leaf_ComputedUserSet struct { + // A computed set of users. ComputedUserSet *ComputedUserSet `protobuf:"bytes,1,opt,name=computed_user_set,json=computedUserSet,proto3,oneof"` } type Leaf_TupleToUserSet struct { + // A tuple to user set conversion. TupleToUserSet *TupleToUserSet `protobuf:"bytes,2,opt,name=tuple_to_user_set,json=tupleToUserSet,proto3,oneof"` } +type Leaf_ComputedAttribute struct { + // A computed attribute. + ComputedAttribute *ComputedAttribute `protobuf:"bytes,3,opt,name=computed_attribute,json=computedAttribute,proto3,oneof"` +} + +type Leaf_Call struct { + // A call to a function or method. + Call *Call `protobuf:"bytes,4,opt,name=call,proto3,oneof"` +} + func (*Leaf_ComputedUserSet) isLeaf_Type() {} func (*Leaf_TupleToUserSet) isLeaf_Type() {} -// Rewrite +func (*Leaf_ComputedAttribute) isLeaf_Type() {} + +func (*Leaf_Call) isLeaf_Type() {} + +// The Rewrite message represents a specific rewrite operation. +// This operation could be one of the following: union, intersection, or exclusion. type Rewrite struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The type of rewrite operation to be performed. RewriteOperation Rewrite_Operation `protobuf:"varint,1,opt,name=rewrite_operation,json=rewriteOperation,proto3,enum=base.v1.Rewrite_Operation" json:"rewrite_operation,omitempty"` - Children []*Child `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty"` + // A list of children that are operated upon by the rewrite operation. + Children []*Child `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty"` } func (x *Rewrite) Reset() { *x = Rewrite{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[2] + mi := &file_base_v1_base_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -465,7 +713,7 @@ func (x *Rewrite) String() string { func (*Rewrite) ProtoMessage() {} func (x *Rewrite) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[2] + mi := &file_base_v1_base_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -478,7 +726,7 @@ func (x *Rewrite) ProtoReflect() protoreflect.Message { // Deprecated: Use Rewrite.ProtoReflect.Descriptor instead. func (*Rewrite) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{2} + return file_base_v1_base_proto_rawDescGZIP(), []int{3} } func (x *Rewrite) GetRewriteOperation() Rewrite_Operation { @@ -495,19 +743,25 @@ func (x *Rewrite) GetChildren() []*Child { return nil } -// Definition +// The SchemaDefinition message provides definitions for entities and rules, +// and includes references to clarify whether a name refers to an entity or a rule. type SchemaDefinition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Map of entity definitions. The key is the entity name, and the value is the corresponding EntityDefinition. EntityDefinitions map[string]*EntityDefinition `protobuf:"bytes,1,rep,name=entity_definitions,json=entityDefinitions,proto3" json:"entity_definitions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Map of rule definitions. The key is the rule name, and the value is the corresponding RuleDefinition. + RuleDefinitions map[string]*RuleDefinition `protobuf:"bytes,2,rep,name=rule_definitions,json=ruleDefinitions,proto3" json:"rule_definitions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Map of references to signify whether a string refers to an entity or a rule. + References map[string]SchemaDefinition_Reference `protobuf:"bytes,3,rep,name=references,proto3" json:"references,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=base.v1.SchemaDefinition_Reference"` } func (x *SchemaDefinition) Reset() { *x = SchemaDefinition{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[3] + mi := &file_base_v1_base_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -520,7 +774,7 @@ func (x *SchemaDefinition) String() string { func (*SchemaDefinition) ProtoMessage() {} func (x *SchemaDefinition) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[3] + mi := &file_base_v1_base_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -533,7 +787,7 @@ func (x *SchemaDefinition) ProtoReflect() protoreflect.Message { // Deprecated: Use SchemaDefinition.ProtoReflect.Descriptor instead. func (*SchemaDefinition) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{3} + return file_base_v1_base_proto_rawDescGZIP(), []int{4} } func (x *SchemaDefinition) GetEntityDefinitions() map[string]*EntityDefinition { @@ -543,25 +797,42 @@ func (x *SchemaDefinition) GetEntityDefinitions() map[string]*EntityDefinition { return nil } -// EntityDefinition +func (x *SchemaDefinition) GetRuleDefinitions() map[string]*RuleDefinition { + if x != nil { + return x.RuleDefinitions + } + return nil +} + +func (x *SchemaDefinition) GetReferences() map[string]SchemaDefinition_Reference { + if x != nil { + return x.References + } + return nil +} + +// The EntityDefinition message provides detailed information about a specific entity. type EntityDefinition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The name of the entity, which follows a specific string pattern and has a maximum byte size. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // ["relation_name"] => RelationDefinition + // Map of relation definitions within this entity. The key is the relation name, and the value is the RelationDefinition. Relations map[string]*RelationDefinition `protobuf:"bytes,2,rep,name=relations,proto3" json:"relations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // ["permission_name"] => PermissionDefinition + // Map of permission definitions within this entity. The key is the permission name, and the value is the PermissionDefinition. Permissions map[string]*PermissionDefinition `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // ["relation_name or permission_name"] => RelationalReference - References map[string]EntityDefinition_RelationalReference `protobuf:"bytes,4,rep,name=references,proto3" json:"references,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=base.v1.EntityDefinition_RelationalReference"` + // Map of attribute definitions within this entity. The key is the attribute name, and the value is the AttributeDefinition. + Attributes map[string]*AttributeDefinition `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Map of references indicating whether a string pertains to a relation, permission, or attribute. + References map[string]EntityDefinition_Reference `protobuf:"bytes,5,rep,name=references,proto3" json:"references,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=base.v1.EntityDefinition_Reference"` } func (x *EntityDefinition) Reset() { *x = EntityDefinition{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[4] + mi := &file_base_v1_base_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -574,7 +845,7 @@ func (x *EntityDefinition) String() string { func (*EntityDefinition) ProtoMessage() {} func (x *EntityDefinition) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[4] + mi := &file_base_v1_base_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -587,7 +858,7 @@ func (x *EntityDefinition) ProtoReflect() protoreflect.Message { // Deprecated: Use EntityDefinition.ProtoReflect.Descriptor instead. func (*EntityDefinition) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{4} + return file_base_v1_base_proto_rawDescGZIP(), []int{5} } func (x *EntityDefinition) GetName() string { @@ -611,40 +882,51 @@ func (x *EntityDefinition) GetPermissions() map[string]*PermissionDefinition { return nil } -func (x *EntityDefinition) GetReferences() map[string]EntityDefinition_RelationalReference { +func (x *EntityDefinition) GetAttributes() map[string]*AttributeDefinition { + if x != nil { + return x.Attributes + } + return nil +} + +func (x *EntityDefinition) GetReferences() map[string]EntityDefinition_Reference { if x != nil { return x.References } return nil } -// RelationDefinition -type RelationDefinition struct { +// The RuleDefinition message provides detailed information about a specific rule. +type RuleDefinition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - RelationReferences []*RelationReference `protobuf:"bytes,2,rep,name=relation_references,json=relationReferences,proto3" json:"relation_references,omitempty"` + // The name of the rule, which follows a specific string pattern and has a maximum byte size. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Map of arguments for this rule. The key is the attribute name, and the value is the AttributeType. + Arguments map[string]AttributeType `protobuf:"bytes,2,rep,name=arguments,proto3" json:"arguments,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=base.v1.AttributeType"` + // The expression for this rule in the form of a google.api.expr.v1alpha1.CheckedExpr. + Expression *v1alpha1.CheckedExpr `protobuf:"bytes,3,opt,name=expression,proto3" json:"expression,omitempty"` } -func (x *RelationDefinition) Reset() { - *x = RelationDefinition{} +func (x *RuleDefinition) Reset() { + *x = RuleDefinition{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[5] + mi := &file_base_v1_base_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RelationDefinition) String() string { +func (x *RuleDefinition) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RelationDefinition) ProtoMessage() {} +func (*RuleDefinition) ProtoMessage() {} -func (x *RelationDefinition) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[5] +func (x *RuleDefinition) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -655,52 +937,61 @@ func (x *RelationDefinition) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RelationDefinition.ProtoReflect.Descriptor instead. -func (*RelationDefinition) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{5} +// Deprecated: Use RuleDefinition.ProtoReflect.Descriptor instead. +func (*RuleDefinition) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{6} } -func (x *RelationDefinition) GetName() string { +func (x *RuleDefinition) GetName() string { if x != nil { return x.Name } return "" } -func (x *RelationDefinition) GetRelationReferences() []*RelationReference { +func (x *RuleDefinition) GetArguments() map[string]AttributeType { if x != nil { - return x.RelationReferences + return x.Arguments } return nil } -// PermissionDefinition -type PermissionDefinition struct { +func (x *RuleDefinition) GetExpression() *v1alpha1.CheckedExpr { + if x != nil { + return x.Expression + } + return nil +} + +// The AttributeDefinition message provides detailed information about a specific attribute. +type AttributeDefinition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Child *Child `protobuf:"bytes,2,opt,name=child,proto3" json:"child,omitempty"` + // The name of the attribute, which follows a specific string pattern and has a maximum byte size. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The type of the attribute. + Type AttributeType `protobuf:"varint,2,opt,name=type,proto3,enum=base.v1.AttributeType" json:"type,omitempty"` } -func (x *PermissionDefinition) Reset() { - *x = PermissionDefinition{} +func (x *AttributeDefinition) Reset() { + *x = AttributeDefinition{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[6] + mi := &file_base_v1_base_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *PermissionDefinition) String() string { +func (x *AttributeDefinition) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PermissionDefinition) ProtoMessage() {} +func (*AttributeDefinition) ProtoMessage() {} -func (x *PermissionDefinition) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[6] +func (x *AttributeDefinition) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -711,52 +1002,54 @@ func (x *PermissionDefinition) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PermissionDefinition.ProtoReflect.Descriptor instead. -func (*PermissionDefinition) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{6} +// Deprecated: Use AttributeDefinition.ProtoReflect.Descriptor instead. +func (*AttributeDefinition) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{7} } -func (x *PermissionDefinition) GetName() string { +func (x *AttributeDefinition) GetName() string { if x != nil { return x.Name } return "" } -func (x *PermissionDefinition) GetChild() *Child { +func (x *AttributeDefinition) GetType() AttributeType { if x != nil { - return x.Child + return x.Type } - return nil + return AttributeType_ATTRIBUTE_TYPE_UNSPECIFIED } -// RelationReference -type RelationReference struct { +// The RelationDefinition message provides detailed information about a specific relation. +type RelationDefinition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` + // The name of the relation, which follows a specific string pattern and has a maximum byte size. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A list of references to other relations. + RelationReferences []*RelationReference `protobuf:"bytes,2,rep,name=relation_references,json=relationReferences,proto3" json:"relation_references,omitempty"` } -func (x *RelationReference) Reset() { - *x = RelationReference{} +func (x *RelationDefinition) Reset() { + *x = RelationDefinition{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[7] + mi := &file_base_v1_base_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RelationReference) String() string { +func (x *RelationDefinition) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RelationReference) ProtoMessage() {} +func (*RelationDefinition) ProtoMessage() {} -func (x *RelationReference) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[7] +func (x *RelationDefinition) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -767,51 +1060,54 @@ func (x *RelationReference) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RelationReference.ProtoReflect.Descriptor instead. -func (*RelationReference) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{7} +// Deprecated: Use RelationDefinition.ProtoReflect.Descriptor instead. +func (*RelationDefinition) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{8} } -func (x *RelationReference) GetType() string { +func (x *RelationDefinition) GetName() string { if x != nil { - return x.Type + return x.Name } return "" } -func (x *RelationReference) GetRelation() string { +func (x *RelationDefinition) GetRelationReferences() []*RelationReference { if x != nil { - return x.Relation + return x.RelationReferences } - return "" + return nil } -// ComputedUserSet -type ComputedUserSet struct { +// The PermissionDefinition message provides detailed information about a specific permission. +type PermissionDefinition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Relation string `protobuf:"bytes,1,opt,name=relation,proto3" json:"relation,omitempty"` + // The name of the permission, which follows a specific string pattern and has a maximum byte size. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The child related to this permission. + Child *Child `protobuf:"bytes,2,opt,name=child,proto3" json:"child,omitempty"` } -func (x *ComputedUserSet) Reset() { - *x = ComputedUserSet{} +func (x *PermissionDefinition) Reset() { + *x = PermissionDefinition{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[8] + mi := &file_base_v1_base_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ComputedUserSet) String() string { +func (x *PermissionDefinition) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ComputedUserSet) ProtoMessage() {} +func (*PermissionDefinition) ProtoMessage() {} -func (x *ComputedUserSet) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[8] +func (x *PermissionDefinition) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -822,44 +1118,54 @@ func (x *ComputedUserSet) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ComputedUserSet.ProtoReflect.Descriptor instead. -func (*ComputedUserSet) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{8} +// Deprecated: Use PermissionDefinition.ProtoReflect.Descriptor instead. +func (*PermissionDefinition) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{9} } -func (x *ComputedUserSet) GetRelation() string { +func (x *PermissionDefinition) GetName() string { if x != nil { - return x.Relation + return x.Name } return "" } -// TupleSet -type TupleSet struct { +func (x *PermissionDefinition) GetChild() *Child { + if x != nil { + return x.Child + } + return nil +} + +// The RelationReference message provides a reference to a specific relation. +type RelationReference struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Relation string `protobuf:"bytes,1,opt,name=relation,proto3" json:"relation,omitempty"` + // The type of the referenced entity, which follows a specific string pattern and has a maximum byte size. + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + // The name of the referenced relation, which follows a specific string pattern and has a maximum byte size. + Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` } -func (x *TupleSet) Reset() { - *x = TupleSet{} +func (x *RelationReference) Reset() { + *x = RelationReference{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[9] + mi := &file_base_v1_base_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TupleSet) String() string { +func (x *RelationReference) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TupleSet) ProtoMessage() {} +func (*RelationReference) ProtoMessage() {} -func (x *TupleSet) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[9] +func (x *RelationReference) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -870,45 +1176,54 @@ func (x *TupleSet) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TupleSet.ProtoReflect.Descriptor instead. -func (*TupleSet) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{9} +// Deprecated: Use RelationReference.ProtoReflect.Descriptor instead. +func (*RelationReference) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{10} } -func (x *TupleSet) GetRelation() string { +func (x *RelationReference) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *RelationReference) GetRelation() string { if x != nil { return x.Relation } return "" } -// TupleToUserSet -type TupleToUserSet struct { +// Argument defines the type of argument in a Call. It can be either a ComputedAttribute or a ContextAttribute. +type Argument struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TupleSet *TupleSet `protobuf:"bytes,1,opt,name=tupleSet,proto3" json:"tupleSet,omitempty"` - Computed *ComputedUserSet `protobuf:"bytes,2,opt,name=computed,proto3" json:"computed,omitempty"` + // Types that are assignable to Type: + // *Argument_ComputedAttribute + // *Argument_ContextAttribute + Type isArgument_Type `protobuf_oneof:"type"` } -func (x *TupleToUserSet) Reset() { - *x = TupleToUserSet{} +func (x *Argument) Reset() { + *x = Argument{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[10] + mi := &file_base_v1_base_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TupleToUserSet) String() string { +func (x *Argument) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TupleToUserSet) ProtoMessage() {} +func (*Argument) ProtoMessage() {} -func (x *TupleToUserSet) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[10] +func (x *Argument) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -919,53 +1234,75 @@ func (x *TupleToUserSet) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TupleToUserSet.ProtoReflect.Descriptor instead. -func (*TupleToUserSet) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{10} +// Deprecated: Use Argument.ProtoReflect.Descriptor instead. +func (*Argument) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{11} } -func (x *TupleToUserSet) GetTupleSet() *TupleSet { - if x != nil { - return x.TupleSet +func (m *Argument) GetType() isArgument_Type { + if m != nil { + return m.Type } return nil } -func (x *TupleToUserSet) GetComputed() *ComputedUserSet { - if x != nil { - return x.Computed +func (x *Argument) GetComputedAttribute() *ComputedAttribute { + if x, ok := x.GetType().(*Argument_ComputedAttribute); ok { + return x.ComputedAttribute } return nil } -// Tuple -type Tuple struct { +func (x *Argument) GetContextAttribute() *ContextAttribute { + if x, ok := x.GetType().(*Argument_ContextAttribute); ok { + return x.ContextAttribute + } + return nil +} + +type isArgument_Type interface { + isArgument_Type() +} + +type Argument_ComputedAttribute struct { + ComputedAttribute *ComputedAttribute `protobuf:"bytes,1,opt,name=computed_attribute,json=computedAttribute,proto3,oneof"` +} + +type Argument_ContextAttribute struct { + ContextAttribute *ContextAttribute `protobuf:"bytes,2,opt,name=context_attribute,json=contextAttribute,proto3,oneof"` +} + +func (*Argument_ComputedAttribute) isArgument_Type() {} + +func (*Argument_ContextAttribute) isArgument_Type() {} + +// Call represents a call to a rule. It includes the name of the rule and the arguments passed to it. +type Call struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` - Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` - Subject *Subject `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` + RuleName string `protobuf:"bytes,1,opt,name=rule_name,json=ruleName,proto3" json:"rule_name,omitempty"` // Name of the rule + Arguments []*Argument `protobuf:"bytes,2,rep,name=arguments,proto3" json:"arguments,omitempty"` // Arguments passed to the rule } -func (x *Tuple) Reset() { - *x = Tuple{} +func (x *Call) Reset() { + *x = Call{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[11] + mi := &file_base_v1_base_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Tuple) String() string { +func (x *Call) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Tuple) ProtoMessage() {} +func (*Call) ProtoMessage() {} -func (x *Tuple) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[11] +func (x *Call) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -976,58 +1313,51 @@ func (x *Tuple) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Tuple.ProtoReflect.Descriptor instead. -func (*Tuple) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{11} -} - -func (x *Tuple) GetEntity() *Entity { - if x != nil { - return x.Entity - } - return nil +// Deprecated: Use Call.ProtoReflect.Descriptor instead. +func (*Call) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{12} } -func (x *Tuple) GetRelation() string { +func (x *Call) GetRuleName() string { if x != nil { - return x.Relation + return x.RuleName } return "" } -func (x *Tuple) GetSubject() *Subject { +func (x *Call) GetArguments() []*Argument { if x != nil { - return x.Subject + return x.Arguments } return nil } -// Tuples -type Tuples struct { +// ComputedAttribute defines a computed attribute which includes its name. +type ComputedAttribute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Tuples []*Tuple `protobuf:"bytes,1,rep,name=tuples,proto3" json:"tuples,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Name of the computed attribute } -func (x *Tuples) Reset() { - *x = Tuples{} +func (x *ComputedAttribute) Reset() { + *x = ComputedAttribute{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[12] + mi := &file_base_v1_base_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Tuples) String() string { +func (x *ComputedAttribute) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Tuples) ProtoMessage() {} +func (*ComputedAttribute) ProtoMessage() {} -func (x *Tuples) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[12] +func (x *ComputedAttribute) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1038,45 +1368,44 @@ func (x *Tuples) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Tuples.ProtoReflect.Descriptor instead. -func (*Tuples) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{12} +// Deprecated: Use ComputedAttribute.ProtoReflect.Descriptor instead. +func (*ComputedAttribute) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{13} } -func (x *Tuples) GetTuples() []*Tuple { +func (x *ComputedAttribute) GetName() string { if x != nil { - return x.Tuples + return x.Name } - return nil + return "" } -// Entity -type Entity struct { +// ContextAttribute defines a context attribute which includes its name. +type ContextAttribute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Name of the context attribute } -func (x *Entity) Reset() { - *x = Entity{} +func (x *ContextAttribute) Reset() { + *x = ContextAttribute{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[13] + mi := &file_base_v1_base_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Entity) String() string { +func (x *ContextAttribute) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Entity) ProtoMessage() {} +func (*ContextAttribute) ProtoMessage() {} -func (x *Entity) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[13] +func (x *ContextAttribute) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1087,51 +1416,44 @@ func (x *Entity) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Entity.ProtoReflect.Descriptor instead. -func (*Entity) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{13} -} - -func (x *Entity) GetType() string { - if x != nil { - return x.Type - } - return "" +// Deprecated: Use ContextAttribute.ProtoReflect.Descriptor instead. +func (*ContextAttribute) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{14} } -func (x *Entity) GetId() string { +func (x *ContextAttribute) GetName() string { if x != nil { - return x.Id + return x.Name } return "" } -type EntityAndRelation struct { +// ComputedUserSet defines a set of computed users which includes the relation name. +type ComputedUserSet struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` - Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` + Relation string `protobuf:"bytes,1,opt,name=relation,proto3" json:"relation,omitempty"` // Relation name } -func (x *EntityAndRelation) Reset() { - *x = EntityAndRelation{} +func (x *ComputedUserSet) Reset() { + *x = ComputedUserSet{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[14] + mi := &file_base_v1_base_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *EntityAndRelation) String() string { +func (x *ComputedUserSet) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EntityAndRelation) ProtoMessage() {} +func (*ComputedUserSet) ProtoMessage() {} -func (x *EntityAndRelation) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[14] +func (x *ComputedUserSet) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1142,53 +1464,45 @@ func (x *EntityAndRelation) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EntityAndRelation.ProtoReflect.Descriptor instead. -func (*EntityAndRelation) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{14} -} - -func (x *EntityAndRelation) GetEntity() *Entity { - if x != nil { - return x.Entity - } - return nil +// Deprecated: Use ComputedUserSet.ProtoReflect.Descriptor instead. +func (*ComputedUserSet) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{15} } -func (x *EntityAndRelation) GetRelation() string { +func (x *ComputedUserSet) GetRelation() string { if x != nil { return x.Relation } return "" } -// Subject -type Subject struct { +// TupleToUserSet defines a mapping from tuple sets to computed user sets. +type TupleToUserSet struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` + TupleSet *TupleSet `protobuf:"bytes,1,opt,name=tupleSet,proto3" json:"tupleSet,omitempty"` // The tuple set + Computed *ComputedUserSet `protobuf:"bytes,2,opt,name=computed,proto3" json:"computed,omitempty"` // The computed user set } -func (x *Subject) Reset() { - *x = Subject{} +func (x *TupleToUserSet) Reset() { + *x = TupleToUserSet{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[15] + mi := &file_base_v1_base_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Subject) String() string { +func (x *TupleToUserSet) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Subject) ProtoMessage() {} +func (*TupleToUserSet) ProtoMessage() {} -func (x *Subject) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[15] +func (x *TupleToUserSet) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1199,60 +1513,1166 @@ func (x *Subject) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Subject.ProtoReflect.Descriptor instead. -func (*Subject) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{15} -} - -func (x *Subject) GetType() string { - if x != nil { - return x.Type - } - return "" +// Deprecated: Use TupleToUserSet.ProtoReflect.Descriptor instead. +func (*TupleToUserSet) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{16} } -func (x *Subject) GetId() string { +func (x *TupleToUserSet) GetTupleSet() *TupleSet { if x != nil { - return x.Id + return x.TupleSet } - return "" + return nil } -func (x *Subject) GetRelation() string { +func (x *TupleToUserSet) GetComputed() *ComputedUserSet { if x != nil { - return x.Relation + return x.Computed } - return "" + return nil } -// TupleFilter is used to filter tuples +// TupleSet represents a set of tuples associated with a specific relation. +type TupleSet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Relation string `protobuf:"bytes,1,opt,name=relation,proto3" json:"relation,omitempty"` +} + +func (x *TupleSet) Reset() { + *x = TupleSet{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TupleSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TupleSet) ProtoMessage() {} + +func (x *TupleSet) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 TupleSet.ProtoReflect.Descriptor instead. +func (*TupleSet) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{17} +} + +func (x *TupleSet) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + +// Tuple is a structure that includes an entity, a relation, and a subject. +type Tuple struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` + Subject *Subject `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` +} + +func (x *Tuple) Reset() { + *x = Tuple{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tuple) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tuple) ProtoMessage() {} + +func (x *Tuple) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 Tuple.ProtoReflect.Descriptor instead. +func (*Tuple) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{18} +} + +func (x *Tuple) GetEntity() *Entity { + if x != nil { + return x.Entity + } + return nil +} + +func (x *Tuple) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + +func (x *Tuple) GetSubject() *Subject { + if x != nil { + return x.Subject + } + return nil +} + +// Attribute represents an attribute of an entity with a specific type and value. +type Attribute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + Attribute string `protobuf:"bytes,2,opt,name=attribute,proto3" json:"attribute,omitempty"` // Name of the attribute + Value *anypb.Any `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Attribute) Reset() { + *x = Attribute{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Attribute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Attribute) ProtoMessage() {} + +func (x *Attribute) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 Attribute.ProtoReflect.Descriptor instead. +func (*Attribute) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{19} +} + +func (x *Attribute) GetEntity() *Entity { + if x != nil { + return x.Entity + } + return nil +} + +func (x *Attribute) GetAttribute() string { + if x != nil { + return x.Attribute + } + return "" +} + +func (x *Attribute) GetValue() *anypb.Any { + if x != nil { + return x.Value + } + return nil +} + +// Tuples is a collection of tuples. +type Tuples struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tuples []*Tuple `protobuf:"bytes,1,rep,name=tuples,proto3" json:"tuples,omitempty"` +} + +func (x *Tuples) Reset() { + *x = Tuples{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tuples) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tuples) ProtoMessage() {} + +func (x *Tuples) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 Tuples.ProtoReflect.Descriptor instead. +func (*Tuples) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{20} +} + +func (x *Tuples) GetTuples() []*Tuple { + if x != nil { + return x.Tuples + } + return nil +} + +// Attributes is a collection of attributes. +type Attributes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Attributes []*Attribute `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *Attributes) Reset() { + *x = Attributes{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Attributes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Attributes) ProtoMessage() {} + +func (x *Attributes) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 Attributes.ProtoReflect.Descriptor instead. +func (*Attributes) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{21} +} + +func (x *Attributes) GetAttributes() []*Attribute { + if x != nil { + return x.Attributes + } + return nil +} + +// Entity represents an entity with a type and an identifier. +type Entity struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Entity) Reset() { + *x = Entity{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Entity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Entity) ProtoMessage() {} + +func (x *Entity) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 Entity.ProtoReflect.Descriptor instead. +func (*Entity) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{22} +} + +func (x *Entity) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Entity) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// EntityAndRelation represents an entity along with a relation. +type EntityAndRelation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` +} + +func (x *EntityAndRelation) Reset() { + *x = EntityAndRelation{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EntityAndRelation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EntityAndRelation) ProtoMessage() {} + +func (x *EntityAndRelation) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 EntityAndRelation.ProtoReflect.Descriptor instead. +func (*EntityAndRelation) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{23} +} + +func (x *EntityAndRelation) GetEntity() *Entity { + if x != nil { + return x.Entity + } + return nil +} + +func (x *EntityAndRelation) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + +// Subject represents an entity subject with a type, an identifier, and a relation. +type Subject struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` +} + +func (x *Subject) Reset() { + *x = Subject{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Subject) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Subject) ProtoMessage() {} + +func (x *Subject) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 Subject.ProtoReflect.Descriptor instead. +func (*Subject) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{24} +} + +func (x *Subject) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Subject) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Subject) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + +// AttributeFilter is used to filter attributes based on the entity and attribute names. +type AttributeFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Entity *EntityFilter `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + Attributes []string `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` // Names of the attributes to be filtered +} + +func (x *AttributeFilter) Reset() { + *x = AttributeFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttributeFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttributeFilter) ProtoMessage() {} + +func (x *AttributeFilter) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 AttributeFilter.ProtoReflect.Descriptor instead. +func (*AttributeFilter) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{25} +} + +func (x *AttributeFilter) GetEntity() *EntityFilter { + if x != nil { + return x.Entity + } + return nil +} + +func (x *AttributeFilter) GetAttributes() []string { + if x != nil { + return x.Attributes + } + return nil +} + +// TupleFilter is used to filter tuples based on the entity, relation and the subject. type TupleFilter struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Entity *EntityFilter `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` - Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` - Subject *SubjectFilter `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` + Entity *EntityFilter `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + Relation string `protobuf:"bytes,2,opt,name=relation,proto3" json:"relation,omitempty"` + Subject *SubjectFilter `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` // The subject filter +} + +func (x *TupleFilter) Reset() { + *x = TupleFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TupleFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TupleFilter) ProtoMessage() {} + +func (x *TupleFilter) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 TupleFilter.ProtoReflect.Descriptor instead. +func (*TupleFilter) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{26} +} + +func (x *TupleFilter) GetEntity() *EntityFilter { + if x != nil { + return x.Entity + } + return nil +} + +func (x *TupleFilter) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + +func (x *TupleFilter) GetSubject() *SubjectFilter { + if x != nil { + return x.Subject + } + return nil +} + +// EntityFilter is used to filter entities based on the type and ids. +type EntityFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Type of the entity + Ids []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids,omitempty"` // List of entity IDs +} + +func (x *EntityFilter) Reset() { + *x = EntityFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EntityFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EntityFilter) ProtoMessage() {} + +func (x *EntityFilter) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 EntityFilter.ProtoReflect.Descriptor instead. +func (*EntityFilter) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{27} +} + +func (x *EntityFilter) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *EntityFilter) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + +// SubjectFilter is used to filter subjects based on the type, ids and relation. +type SubjectFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Type of the subject + Ids []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids,omitempty"` // List of subject IDs + Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` +} + +func (x *SubjectFilter) Reset() { + *x = SubjectFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubjectFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubjectFilter) ProtoMessage() {} + +func (x *SubjectFilter) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 SubjectFilter.ProtoReflect.Descriptor instead. +func (*SubjectFilter) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{28} +} + +func (x *SubjectFilter) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *SubjectFilter) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + +func (x *SubjectFilter) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + +// ExpandTreeNode represents a node in an expansion tree with a specific operation and its children. +type ExpandTreeNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Operation ExpandTreeNode_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=base.v1.ExpandTreeNode_Operation" json:"operation,omitempty"` // Operation to be applied on this tree node + Children []*Expand `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty"` // The children of this tree node +} + +func (x *ExpandTreeNode) Reset() { + *x = ExpandTreeNode{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExpandTreeNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExpandTreeNode) ProtoMessage() {} + +func (x *ExpandTreeNode) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 ExpandTreeNode.ProtoReflect.Descriptor instead. +func (*ExpandTreeNode) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{29} +} + +func (x *ExpandTreeNode) GetOperation() ExpandTreeNode_Operation { + if x != nil { + return x.Operation + } + return ExpandTreeNode_OPERATION_UNSPECIFIED +} + +func (x *ExpandTreeNode) GetChildren() []*Expand { + if x != nil { + return x.Children + } + return nil +} + +// Expand is used to define a hierarchical structure for permissions. +// It has an entity, permission, and arguments. The node can be either another hierarchical structure or a set of subjects. +type Expand struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // entity is the entity for which the hierarchical structure is defined. + Entity *Entity `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + // permission is the permission applied to the entity. + Permission string `protobuf:"bytes,2,opt,name=permission,proto3" json:"permission,omitempty"` + // arguments are the additional information or context used to evaluate permissions. + Arguments []*Argument `protobuf:"bytes,3,rep,name=arguments,proto3" json:"arguments,omitempty"` + // The node can either be an ExpandTreeNode or a set of Subjects. + // + // Types that are assignable to Node: + // *Expand_Expand + // *Expand_Leaf + Node isExpand_Node `protobuf_oneof:"node"` +} + +func (x *Expand) Reset() { + *x = Expand{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Expand) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Expand) ProtoMessage() {} + +func (x *Expand) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 Expand.ProtoReflect.Descriptor instead. +func (*Expand) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{30} +} + +func (x *Expand) GetEntity() *Entity { + if x != nil { + return x.Entity + } + return nil +} + +func (x *Expand) GetPermission() string { + if x != nil { + return x.Permission + } + return "" +} + +func (x *Expand) GetArguments() []*Argument { + if x != nil { + return x.Arguments + } + return nil +} + +func (m *Expand) GetNode() isExpand_Node { + if m != nil { + return m.Node + } + return nil +} + +func (x *Expand) GetExpand() *ExpandTreeNode { + if x, ok := x.GetNode().(*Expand_Expand); ok { + return x.Expand + } + return nil +} + +func (x *Expand) GetLeaf() *ExpandLeaf { + if x, ok := x.GetNode().(*Expand_Leaf); ok { + return x.Leaf + } + return nil +} + +type isExpand_Node interface { + isExpand_Node() +} + +type Expand_Expand struct { + // expand contains another hierarchical structure. + Expand *ExpandTreeNode `protobuf:"bytes,4,opt,name=expand,proto3,oneof"` +} + +type Expand_Leaf struct { + // leaf contains a set of subjects. + Leaf *ExpandLeaf `protobuf:"bytes,5,opt,name=leaf,proto3,oneof"` +} + +func (*Expand_Expand) isExpand_Node() {} + +func (*Expand_Leaf) isExpand_Node() {} + +// ExpandLeaf is the leaf node of an Expand tree and can be either a set of Subjects or a set of Values. +type ExpandLeaf struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Type: + // *ExpandLeaf_Subjects + // *ExpandLeaf_Values + // *ExpandLeaf_Value + Type isExpandLeaf_Type `protobuf_oneof:"type"` } -func (x *TupleFilter) Reset() { - *x = TupleFilter{} +func (x *ExpandLeaf) Reset() { + *x = ExpandLeaf{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[16] + mi := &file_base_v1_base_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExpandLeaf) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExpandLeaf) ProtoMessage() {} + +func (x *ExpandLeaf) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 ExpandLeaf.ProtoReflect.Descriptor instead. +func (*ExpandLeaf) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{31} +} + +func (m *ExpandLeaf) GetType() isExpandLeaf_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *ExpandLeaf) GetSubjects() *Subjects { + if x, ok := x.GetType().(*ExpandLeaf_Subjects); ok { + return x.Subjects + } + return nil +} + +func (x *ExpandLeaf) GetValues() *Values { + if x, ok := x.GetType().(*ExpandLeaf_Values); ok { + return x.Values + } + return nil +} + +func (x *ExpandLeaf) GetValue() *anypb.Any { + if x, ok := x.GetType().(*ExpandLeaf_Value); ok { + return x.Value + } + return nil +} + +type isExpandLeaf_Type interface { + isExpandLeaf_Type() +} + +type ExpandLeaf_Subjects struct { + // subjects are used when the leaf is a set of subjects. + Subjects *Subjects `protobuf:"bytes,1,opt,name=subjects,proto3,oneof"` +} + +type ExpandLeaf_Values struct { + // values are used when the leaf node is a set of values. + Values *Values `protobuf:"bytes,2,opt,name=values,proto3,oneof"` +} + +type ExpandLeaf_Value struct { + // value is used when the leaf node is a single value. + Value *anypb.Any `protobuf:"bytes,3,opt,name=value,proto3,oneof"` +} + +func (*ExpandLeaf_Subjects) isExpandLeaf_Type() {} + +func (*ExpandLeaf_Values) isExpandLeaf_Type() {} + +func (*ExpandLeaf_Value) isExpandLeaf_Type() {} + +type Values struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Values map[string]*anypb.Any `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Values) Reset() { + *x = Values{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Values) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Values) ProtoMessage() {} + +func (x *Values) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 Values.ProtoReflect.Descriptor instead. +func (*Values) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{32} +} + +func (x *Values) GetValues() map[string]*anypb.Any { + if x != nil { + return x.Values + } + return nil +} + +// Subjects holds a repeated field of Subject type. +type Subjects struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Subjects []*Subject `protobuf:"bytes,1,rep,name=subjects,proto3" json:"subjects,omitempty"` // A list of subjects. +} + +func (x *Subjects) Reset() { + *x = Subjects{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Subjects) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Subjects) ProtoMessage() {} + +func (x *Subjects) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 Subjects.ProtoReflect.Descriptor instead. +func (*Subjects) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{33} +} + +func (x *Subjects) GetSubjects() []*Subject { + if x != nil { + return x.Subjects + } + return nil +} + +// Tenant represents a tenant with an id, a name, and a timestamp indicating when it was created. +type Tenant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The ID of the tenant. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // The name of the tenant. + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,proto3" json:"created_at,omitempty"` // The time at which the tenant was created. +} + +func (x *Tenant) Reset() { + *x = Tenant{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tenant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tenant) ProtoMessage() {} + +func (x *Tenant) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_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 Tenant.ProtoReflect.Descriptor instead. +func (*Tenant) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{34} +} + +func (x *Tenant) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Tenant) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Tenant) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +// DataChanges represent changes in data with a snap token and a list of data change objects. +type DataChanges struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SnapToken string `protobuf:"bytes,1,opt,name=snap_token,proto3" json:"snap_token,omitempty"` // The snapshot token. + DataChanges []*DataChange `protobuf:"bytes,2,rep,name=data_changes,proto3" json:"data_changes,omitempty"` // The list of data changes. +} + +func (x *DataChanges) Reset() { + *x = DataChanges{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TupleFilter) String() string { +func (x *DataChanges) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TupleFilter) ProtoMessage() {} +func (*DataChanges) ProtoMessage() {} -func (x *TupleFilter) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[16] +func (x *DataChanges) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1263,59 +2683,55 @@ func (x *TupleFilter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TupleFilter.ProtoReflect.Descriptor instead. -func (*TupleFilter) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{16} -} - -func (x *TupleFilter) GetEntity() *EntityFilter { - if x != nil { - return x.Entity - } - return nil +// Deprecated: Use DataChanges.ProtoReflect.Descriptor instead. +func (*DataChanges) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{35} } -func (x *TupleFilter) GetRelation() string { +func (x *DataChanges) GetSnapToken() string { if x != nil { - return x.Relation + return x.SnapToken } return "" } -func (x *TupleFilter) GetSubject() *SubjectFilter { +func (x *DataChanges) GetDataChanges() []*DataChange { if x != nil { - return x.Subject + return x.DataChanges } return nil } -// EntityFilter is used to filter entities -type EntityFilter struct { +// DataChange represents a single change in data, with an operation type and the actual change which could be a tuple or an attribute. +type DataChange struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Ids []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids,omitempty"` + Operation DataChange_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=base.v1.DataChange_Operation" json:"operation,omitempty"` // The operation type. + // Types that are assignable to Type: + // *DataChange_Tuple + // *DataChange_Attribute + Type isDataChange_Type `protobuf_oneof:"type"` } -func (x *EntityFilter) Reset() { - *x = EntityFilter{} +func (x *DataChange) Reset() { + *x = DataChange{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[17] + mi := &file_base_v1_base_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *EntityFilter) String() string { +func (x *DataChange) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EntityFilter) ProtoMessage() {} +func (*DataChange) ProtoMessage() {} -func (x *EntityFilter) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[17] +func (x *DataChange) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1326,53 +2742,80 @@ func (x *EntityFilter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EntityFilter.ProtoReflect.Descriptor instead. -func (*EntityFilter) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{17} +// Deprecated: Use DataChange.ProtoReflect.Descriptor instead. +func (*DataChange) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{36} } -func (x *EntityFilter) GetType() string { +func (x *DataChange) GetOperation() DataChange_Operation { if x != nil { - return x.Type + return x.Operation } - return "" + return DataChange_OPERATION_UNSPECIFIED } -func (x *EntityFilter) GetIds() []string { - if x != nil { - return x.Ids +func (m *DataChange) GetType() isDataChange_Type { + if m != nil { + return m.Type } return nil } -// SubjectFilter is used to filter subjects -type SubjectFilter struct { +func (x *DataChange) GetTuple() *Tuple { + if x, ok := x.GetType().(*DataChange_Tuple); ok { + return x.Tuple + } + return nil +} + +func (x *DataChange) GetAttribute() *Attribute { + if x, ok := x.GetType().(*DataChange_Attribute); ok { + return x.Attribute + } + return nil +} + +type isDataChange_Type interface { + isDataChange_Type() +} + +type DataChange_Tuple struct { + Tuple *Tuple `protobuf:"bytes,2,opt,name=tuple,proto3,oneof"` // If the change is a tuple. +} + +type DataChange_Attribute struct { + Attribute *Attribute `protobuf:"bytes,3,opt,name=attribute,proto3,oneof"` // If the change is an attribute. +} + +func (*DataChange_Tuple) isDataChange_Type() {} + +func (*DataChange_Attribute) isDataChange_Type() {} + +type String struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Ids []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids,omitempty"` - Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` } -func (x *SubjectFilter) Reset() { - *x = SubjectFilter{} +func (x *String) Reset() { + *x = String{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[18] + mi := &file_base_v1_base_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SubjectFilter) String() string { +func (x *String) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SubjectFilter) ProtoMessage() {} +func (*String) ProtoMessage() {} -func (x *SubjectFilter) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[18] +func (x *String) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1383,59 +2826,43 @@ func (x *SubjectFilter) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SubjectFilter.ProtoReflect.Descriptor instead. -func (*SubjectFilter) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{18} -} - -func (x *SubjectFilter) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *SubjectFilter) GetIds() []string { - if x != nil { - return x.Ids - } - return nil +// Deprecated: Use String.ProtoReflect.Descriptor instead. +func (*String) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{37} } -func (x *SubjectFilter) GetRelation() string { +func (x *String) GetValue() string { if x != nil { - return x.Relation + return x.Value } return "" } -// ExpandTreeNode -type ExpandTreeNode struct { +type Integer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Operation ExpandTreeNode_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=base.v1.ExpandTreeNode_Operation" json:"operation,omitempty"` - Children []*Expand `protobuf:"bytes,2,rep,name=children,proto3" json:"children,omitempty"` + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` } -func (x *ExpandTreeNode) Reset() { - *x = ExpandTreeNode{} +func (x *Integer) Reset() { + *x = Integer{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[19] + mi := &file_base_v1_base_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ExpandTreeNode) String() string { +func (x *Integer) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ExpandTreeNode) ProtoMessage() {} +func (*Integer) ProtoMessage() {} -func (x *ExpandTreeNode) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[19] +func (x *Integer) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1446,55 +2873,43 @@ func (x *ExpandTreeNode) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ExpandTreeNode.ProtoReflect.Descriptor instead. -func (*ExpandTreeNode) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{19} -} - -func (x *ExpandTreeNode) GetOperation() ExpandTreeNode_Operation { - if x != nil { - return x.Operation - } - return ExpandTreeNode_OPERATION_UNSPECIFIED +// Deprecated: Use Integer.ProtoReflect.Descriptor instead. +func (*Integer) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{38} } -func (x *ExpandTreeNode) GetChildren() []*Expand { +func (x *Integer) GetValue() int32 { if x != nil { - return x.Children + return x.Value } - return nil + return 0 } -// Expand -type Expand struct { +type Double struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Target *EntityAndRelation `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` - // Types that are assignable to Node: - // *Expand_Expand - // *Expand_Leaf - Node isExpand_Node `protobuf_oneof:"node"` + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` } -func (x *Expand) Reset() { - *x = Expand{} +func (x *Double) Reset() { + *x = Double{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[20] + mi := &file_base_v1_base_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Expand) String() string { +func (x *Double) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Expand) ProtoMessage() {} +func (*Double) ProtoMessage() {} -func (x *Expand) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[20] +func (x *Double) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1505,81 +2920,90 @@ func (x *Expand) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Expand.ProtoReflect.Descriptor instead. -func (*Expand) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{20} +// Deprecated: Use Double.ProtoReflect.Descriptor instead. +func (*Double) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{39} } -func (x *Expand) GetTarget() *EntityAndRelation { +func (x *Double) GetValue() float64 { if x != nil { - return x.Target + return x.Value } - return nil + return 0 } -func (m *Expand) GetNode() isExpand_Node { - if m != nil { - return m.Node - } - return nil -} +type Boolean struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *Expand) GetExpand() *ExpandTreeNode { - if x, ok := x.GetNode().(*Expand_Expand); ok { - return x.Expand - } - return nil + Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` } -func (x *Expand) GetLeaf() *Subjects { - if x, ok := x.GetNode().(*Expand_Leaf); ok { - return x.Leaf +func (x *Boolean) Reset() { + *x = Boolean{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_base_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type isExpand_Node interface { - isExpand_Node() +func (x *Boolean) String() string { + return protoimpl.X.MessageStringOf(x) } -type Expand_Expand struct { - Expand *ExpandTreeNode `protobuf:"bytes,2,opt,name=expand,proto3,oneof"` -} +func (*Boolean) ProtoMessage() {} -type Expand_Leaf struct { - Leaf *Subjects `protobuf:"bytes,3,opt,name=leaf,proto3,oneof"` +func (x *Boolean) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[40] + 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) } -func (*Expand_Expand) isExpand_Node() {} +// Deprecated: Use Boolean.ProtoReflect.Descriptor instead. +func (*Boolean) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{40} +} -func (*Expand_Leaf) isExpand_Node() {} +func (x *Boolean) GetValue() bool { + if x != nil { + return x.Value + } + return false +} -// Result -type Subjects struct { +type StringArray struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Subjects []*Subject `protobuf:"bytes,1,rep,name=subjects,proto3" json:"subjects,omitempty"` + Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` } -func (x *Subjects) Reset() { - *x = Subjects{} +func (x *StringArray) Reset() { + *x = StringArray{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[21] + mi := &file_base_v1_base_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Subjects) String() string { +func (x *StringArray) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Subjects) ProtoMessage() {} +func (*StringArray) ProtoMessage() {} -func (x *Subjects) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[21] +func (x *StringArray) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1590,46 +3014,43 @@ func (x *Subjects) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Subjects.ProtoReflect.Descriptor instead. -func (*Subjects) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{21} +// Deprecated: Use StringArray.ProtoReflect.Descriptor instead. +func (*StringArray) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{41} } -func (x *Subjects) GetSubjects() []*Subject { +func (x *StringArray) GetValues() []string { if x != nil { - return x.Subjects + return x.Values } return nil } -// Tenant -type Tenant struct { +type IntegerArray struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,proto3" json:"created_at,omitempty"` + Values []int32 `protobuf:"varint,1,rep,packed,name=values,proto3" json:"values,omitempty"` } -func (x *Tenant) Reset() { - *x = Tenant{} +func (x *IntegerArray) Reset() { + *x = IntegerArray{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[22] + mi := &file_base_v1_base_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Tenant) String() string { +func (x *IntegerArray) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Tenant) ProtoMessage() {} +func (*IntegerArray) ProtoMessage() {} -func (x *Tenant) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[22] +func (x *IntegerArray) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1640,59 +3061,43 @@ func (x *Tenant) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Tenant.ProtoReflect.Descriptor instead. -func (*Tenant) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{22} -} - -func (x *Tenant) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Tenant) GetName() string { - if x != nil { - return x.Name - } - return "" +// Deprecated: Use IntegerArray.ProtoReflect.Descriptor instead. +func (*IntegerArray) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{42} } -func (x *Tenant) GetCreatedAt() *timestamppb.Timestamp { +func (x *IntegerArray) GetValues() []int32 { if x != nil { - return x.CreatedAt + return x.Values } return nil } -// TupleChanges -type TupleChanges struct { +type DoubleArray struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SnapToken string `protobuf:"bytes,1,opt,name=snap_token,proto3" json:"snap_token,omitempty"` - TupleChanges []*TupleChange `protobuf:"bytes,2,rep,name=tuple_changes,proto3" json:"tuple_changes,omitempty"` + Values []float64 `protobuf:"fixed64,1,rep,packed,name=values,proto3" json:"values,omitempty"` } -func (x *TupleChanges) Reset() { - *x = TupleChanges{} +func (x *DoubleArray) Reset() { + *x = DoubleArray{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[23] + mi := &file_base_v1_base_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TupleChanges) String() string { +func (x *DoubleArray) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TupleChanges) ProtoMessage() {} +func (*DoubleArray) ProtoMessage() {} -func (x *TupleChanges) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[23] +func (x *DoubleArray) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1703,52 +3108,43 @@ func (x *TupleChanges) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TupleChanges.ProtoReflect.Descriptor instead. -func (*TupleChanges) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{23} -} - -func (x *TupleChanges) GetSnapToken() string { - if x != nil { - return x.SnapToken - } - return "" +// Deprecated: Use DoubleArray.ProtoReflect.Descriptor instead. +func (*DoubleArray) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{43} } -func (x *TupleChanges) GetTupleChanges() []*TupleChange { +func (x *DoubleArray) GetValues() []float64 { if x != nil { - return x.TupleChanges + return x.Values } return nil } -// TupleChange -type TupleChange struct { +type BooleanArray struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Operation TupleChange_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=base.v1.TupleChange_Operation" json:"operation,omitempty"` - Tuple *Tuple `protobuf:"bytes,2,opt,name=tuple,proto3" json:"tuple,omitempty"` + Values []bool `protobuf:"varint,1,rep,packed,name=values,proto3" json:"values,omitempty"` } -func (x *TupleChange) Reset() { - *x = TupleChange{} +func (x *BooleanArray) Reset() { + *x = BooleanArray{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_base_proto_msgTypes[24] + mi := &file_base_v1_base_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TupleChange) String() string { +func (x *BooleanArray) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TupleChange) ProtoMessage() {} +func (*BooleanArray) ProtoMessage() {} -func (x *TupleChange) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_base_proto_msgTypes[24] +func (x *BooleanArray) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_base_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1759,21 +3155,14 @@ func (x *TupleChange) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TupleChange.ProtoReflect.Descriptor instead. -func (*TupleChange) Descriptor() ([]byte, []int) { - return file_base_v1_base_proto_rawDescGZIP(), []int{24} -} - -func (x *TupleChange) GetOperation() TupleChange_Operation { - if x != nil { - return x.Operation - } - return TupleChange_OPERATION_UNSPECIFIED +// Deprecated: Use BooleanArray.ProtoReflect.Descriptor instead. +func (*BooleanArray) Descriptor() ([]byte, []int) { + return file_base_v1_base_proto_rawDescGZIP(), []int{44} } -func (x *TupleChange) GetTuple() *Tuple { +func (x *BooleanArray) GetValues() []bool { if x != nil { - return x.Tuple + return x.Values } return nil } @@ -1782,74 +3171,130 @@ var File_base_v1_base_proto protoreflect.FileDescriptor var file_base_v1_base_proto_rawDesc = []byte{ 0x0a, 0x12, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7b, 0x0a, 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x12, 0x2d, 0x0a, 0x04, 0x6c, 0x65, 0x61, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x65, 0x61, 0x66, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, 0x6c, 0x65, 0x61, 0x66, 0x12, - 0x36, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x07, - 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0x0b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x03, 0xf8, 0x42, 0x01, 0x22, 0xb5, 0x01, 0x0a, 0x04, 0x4c, 0x65, 0x61, 0x66, 0x12, 0x50, 0x0a, - 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, - 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x53, - 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0f, - 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x12, - 0x4e, 0x0a, 0x11, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, - 0x53, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, - 0x0e, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x42, - 0x0b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xf0, 0x01, 0x0a, - 0x07, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x11, 0x72, 0x65, 0x77, 0x72, - 0x69, 0x74, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x10, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x2a, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, - 0x69, 0x6c, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x70, 0x0a, - 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, - 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x50, - 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x45, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x22, - 0xd4, 0x01, 0x0a, 0x10, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x12, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x64, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x30, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x11, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x5f, 0x0a, 0x16, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x2f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe0, 0x05, 0x0a, 0x10, 0x45, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, 0x42, 0x26, 0x72, 0x24, - 0x28, 0x40, 0x32, 0x20, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, - 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, - 0x39, 0x5d, 0x29, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x09, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x44, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x4c, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x49, 0x0a, 0x0a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x04, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x26, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x92, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x12, 0x26, 0x0a, 0x06, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x52, 0x06, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x0a, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x7b, 0x0a, + 0x05, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x12, 0x2d, 0x0a, 0x04, 0x6c, 0x65, 0x61, 0x66, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x65, 0x61, 0x66, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, + 0x04, 0x6c, 0x65, 0x61, 0x66, 0x12, 0x36, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, + 0x10, 0x01, 0x48, 0x00, 0x52, 0x07, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x42, 0x0b, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xbb, 0x02, 0x0a, 0x04, 0x4c, + 0x65, 0x61, 0x66, 0x12, 0x50, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x64, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, + 0x10, 0x01, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, + 0x65, 0x72, 0x53, 0x65, 0x74, 0x12, 0x4e, 0x0a, 0x11, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x74, + 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, + 0x65, 0x72, 0x53, 0x65, 0x74, 0x12, 0x55, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x04, + 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, 0x63, 0x61, 0x6c, 0x6c, 0x42, 0x0b, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xf0, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x11, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x1a, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, + 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x72, 0x65, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, + 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x70, 0x0a, 0x09, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, + 0x4e, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x22, 0x8d, 0x05, 0x0a, 0x10, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x5f, 0x0a, 0x12, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x44, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x59, 0x0a, 0x10, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x72, 0x75, 0x6c, + 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x0a, + 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x5f, 0x0a, 0x16, 0x45, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5b, 0x0a, 0x14, 0x52, 0x75, 0x6c, 0x65, + 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, + 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x62, 0x0a, 0x0f, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x50, 0x0a, 0x09, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, + 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x45, + 0x4e, 0x54, 0x49, 0x54, 0x59, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x46, 0x45, 0x52, + 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x52, 0x55, 0x4c, 0x45, 0x10, 0x02, 0x22, 0xeb, 0x06, 0x0a, 0x10, + 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, + 0xfa, 0x42, 0x26, 0x72, 0x24, 0x28, 0x40, 0x32, 0x20, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, + 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, + 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x46, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4c, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x12, 0x49, 0x0a, 0x0a, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, @@ -1865,202 +3310,345 @@ var file_base_v1_base_proto_rawDesc = []byte{ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x6c, 0x0a, 0x0f, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x43, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x83, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x20, 0x52, - 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, - 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x5f, - 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, - 0x41, 0x4c, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x50, 0x45, 0x52, - 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x22, 0xa0, 0x01, 0x0a, 0x12, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, - 0xfa, 0x42, 0x26, 0x72, 0x24, 0x28, 0x40, 0x32, 0x20, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, - 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, - 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x4b, 0x0a, 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x12, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x7b, 0x0a, 0x14, - 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x29, 0xfa, 0x42, 0x26, 0x72, 0x24, 0x28, 0x40, 0x32, 0x20, 0x5e, 0x28, 0x5b, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x5b, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x1a, 0x62, 0x0a, 0x0f, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x71, 0x0a, 0x09, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, + 0x0a, 0x12, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x52, 0x45, 0x4c, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, + 0x4e, 0x43, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, + 0x12, 0x17, 0x0a, 0x13, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x41, 0x54, + 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x10, 0x03, 0x22, 0xb2, 0x02, 0x0a, 0x0e, 0x52, 0x75, + 0x6c, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, 0x42, 0x26, 0x72, + 0x24, 0x28, 0x40, 0x32, 0x20, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, + 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, + 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x09, 0x61, + 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x45, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x52, 0x0a, 0x65, 0x78, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x54, 0x0a, 0x0e, 0x41, 0x72, 0x67, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x80, + 0x01, 0x0a, 0x13, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, 0x42, 0x26, 0x72, 0x24, 0x28, 0x40, 0x32, 0x20, 0x5e, + 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, + 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, 0x42, 0x26, 0x72, 0x24, 0x28, 0x40, 0x32, + 0x20, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, + 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, + 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x52, 0x12, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x73, 0x22, 0x7b, 0x0a, 0x14, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, 0x42, 0x26, 0x72, + 0x24, 0x28, 0x40, 0x32, 0x20, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, + 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, + 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x05, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, + 0x64, 0x22, 0x9a, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, 0x42, 0x26, 0x72, 0x24, 0x28, 0x40, 0x32, 0x20, + 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, + 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x46, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0xfa, 0x42, 0x27, 0x72, 0x25, 0x28, + 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, + 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, + 0x24, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa9, + 0x01, 0x0a, 0x08, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x12, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x48, 0x00, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x48, 0x00, + 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x54, 0x0a, 0x04, 0x43, 0x61, + 0x6c, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x2f, 0x0a, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x67, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x22, 0x50, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x41, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, - 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x69, - 0x6c, 0x64, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x22, 0x9a, 0x01, 0x0a, 0x11, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, - 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, - 0x42, 0x26, 0x72, 0x24, 0x28, 0x40, 0x32, 0x20, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, - 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, - 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x46, - 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x2a, 0xfa, 0x42, 0x27, 0x72, 0x25, 0x28, 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, + 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0x4f, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, 0x5e, + 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, + 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x56, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, + 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x28, + 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, + 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, + 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x75, 0x0a, 0x0e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x12, 0x2d, 0x0a, + 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x53, + 0x65, 0x74, 0x52, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x12, 0x34, 0x0a, 0x08, + 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x64, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x64, 0x22, 0x4f, 0x0a, 0x08, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x12, 0x43, + 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x27, 0xfa, 0x42, 0x24, 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, - 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x56, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, - 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, 0x24, - 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, - 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, - 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4f, - 0x0a, 0x08, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x12, 0x43, 0x0a, 0x08, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xfa, 0x42, - 0x24, 0x72, 0x22, 0x28, 0x40, 0x32, 0x1e, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, - 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, - 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x75, 0x0a, 0x0e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, - 0x74, 0x12, 0x2d, 0x0a, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x53, 0x65, 0x74, - 0x12, 0x34, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, - 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x52, 0x08, 0x63, 0x6f, - 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x22, 0xb7, 0x01, 0x0a, 0x05, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x12, 0x31, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x12, 0x45, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, 0x42, 0x26, 0x72, 0x24, 0x28, 0x40, 0x32, 0x20, + 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0xb7, 0x01, 0x0a, 0x05, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x31, 0x0a, + 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x12, 0x45, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x29, 0xfa, 0x42, 0x26, 0x72, 0x24, 0x28, 0x40, 0x32, 0x20, 0x5e, 0x28, 0x5b, + 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, + 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, 0x08, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x88, 0x01, + 0x0a, 0x09, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1c, + 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x30, 0x0a, 0x06, 0x54, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x12, 0x26, 0x0a, 0x06, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x52, 0x06, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x22, 0x40, 0x0a, 0x0a, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0x8d, 0x01, 0x0a, + 0x06, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, 0x42, 0x26, 0x72, 0x24, 0x28, 0x40, 0x32, 0x20, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, - 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x22, 0x30, 0x0a, 0x06, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x06, 0x74, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x06, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x3d, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, 0x42, 0x26, - 0x72, 0x24, 0x28, 0x40, 0x32, 0x20, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, - 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, - 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x44, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0xfa, 0x42, 0x31, 0x72, 0x2f, 0x28, - 0x80, 0x01, 0x32, 0x2a, 0x5e, 0x28, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, - 0x39, 0x5f, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x7c, 0x2d, - 0x5d, 0x7b, 0x30, 0x2c, 0x31, 0x32, 0x37, 0x7d, 0x29, 0x7c, 0x5c, 0x2a, 0x29, 0x24, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x8d, 0x01, 0x0a, 0x11, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x6e, 0x64, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x45, 0x0a, 0x08, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, - 0x42, 0x26, 0x72, 0x24, 0x28, 0x40, 0x32, 0x20, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, - 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x34, 0x7d, 0x5b, 0x61, - 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0xde, 0x01, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3d, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, 0x42, - 0x26, 0x72, 0x24, 0x28, 0x40, 0x32, 0x20, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, - 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, - 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x44, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0xfa, 0x42, 0x31, 0x72, 0x2f, - 0x28, 0x80, 0x01, 0x32, 0x2a, 0x5e, 0x28, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, - 0x2d, 0x39, 0x5f, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x7c, - 0x2d, 0x5d, 0x7b, 0x30, 0x2c, 0x31, 0x32, 0x37, 0x7d, 0x29, 0x7c, 0x5c, 0x2a, 0x29, 0x24, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x4e, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0xfa, 0x42, 0x2f, 0x72, 0x2d, 0x28, 0x40, 0x32, 0x26, - 0x5e, 0x28, 0x5b, 0x2e, 0x26, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x2e, 0x26, 0x61, 0x2d, 0x7a, 0x30, - 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x2e, 0x26, 0x61, 0x2d, 0x7a, - 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0xc2, 0x01, 0x0a, 0x0b, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x48, 0x0a, 0x08, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, - 0xfa, 0x42, 0x29, 0x72, 0x27, 0x28, 0x40, 0x32, 0x20, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, - 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, - 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, - 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x34, 0x0a, 0x0c, 0x45, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x85, - 0x01, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x4e, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, 0xfa, 0x42, 0x2f, 0x72, 0x2d, 0x28, - 0x40, 0x32, 0x26, 0x5e, 0x28, 0x5b, 0x2e, 0x26, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x2e, 0x26, 0x61, - 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x2e, 0x26, - 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x08, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xf0, 0x01, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x61, 0x6e, - 0x64, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x54, 0x72, 0x65, - 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x08, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x08, 0x63, - 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x70, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x13, 0x0a, 0x0f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x49, - 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, - 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x58, - 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x22, 0xa0, 0x01, 0x0a, 0x06, 0x45, 0x78, - 0x70, 0x61, 0x6e, 0x64, 0x12, 0x32, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x61, - 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, - 0x65, 0x48, 0x00, 0x52, 0x06, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x27, 0x0a, 0x04, 0x6c, - 0x65, 0x61, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x48, 0x00, 0x52, 0x04, - 0x6c, 0x65, 0x61, 0x66, 0x42, 0x06, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0x38, 0x0a, 0x08, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x08, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x68, 0x0a, 0x06, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x22, 0x6a, 0x0a, 0x0c, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x12, 0x3a, 0x0a, 0x0d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0xc5, 0x01, 0x0a, - 0x0b, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x09, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x44, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x34, 0xfa, 0x42, 0x31, 0x72, 0x2f, 0x28, 0x80, 0x01, 0x32, 0x2a, 0x5e, 0x28, + 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x5b, 0x61, 0x2d, + 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x7c, 0x2d, 0x5d, 0x7b, 0x30, 0x2c, 0x31, 0x32, + 0x37, 0x7d, 0x29, 0x7c, 0x5c, 0x2a, 0x29, 0x24, 0x52, 0x02, 0x69, 0x64, 0x22, 0x8d, 0x01, 0x0a, + 0x11, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x6e, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x45, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, 0x42, 0x26, 0x72, 0x24, 0x28, 0x40, + 0x32, 0x20, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, + 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x34, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, + 0x29, 0x24, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xde, 0x01, 0x0a, + 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xfa, 0x42, 0x26, 0x72, 0x24, 0x28, 0x40, 0x32, + 0x20, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, + 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, + 0x24, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x44, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x34, 0xfa, 0x42, 0x31, 0x72, 0x2f, 0x28, 0x80, 0x01, 0x32, 0x2a, 0x5e, + 0x28, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x5b, 0x61, + 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x7c, 0x2d, 0x5d, 0x7b, 0x30, 0x2c, 0x31, + 0x32, 0x37, 0x7d, 0x29, 0x7c, 0x5c, 0x2a, 0x29, 0x24, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4e, 0x0a, + 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x32, 0xfa, 0x42, 0x2f, 0x72, 0x2d, 0x28, 0x40, 0x32, 0x26, 0x5e, 0x28, 0x5b, 0x2e, 0x26, 0x61, + 0x2d, 0x7a, 0x5d, 0x5b, 0x2e, 0x26, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, + 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x2e, 0x26, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, + 0xd0, 0x01, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6a, 0x0a, + 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x12, 0x37, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0xc2, 0x01, 0x0a, 0x0b, 0x54, 0x75, + 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x06, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x12, 0x48, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xfa, 0x42, 0x29, 0x72, 0x27, 0x28, 0x40, 0x32, 0x20, 0x5e, + 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, + 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0xd0, + 0x01, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x07, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x34, + 0x0a, 0x0c, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x03, 0x69, 0x64, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x4e, 0x0a, 0x08, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x32, + 0xfa, 0x42, 0x2f, 0x72, 0x2d, 0x28, 0x40, 0x32, 0x26, 0x5e, 0x28, 0x5b, 0x2e, 0x26, 0x61, 0x2d, + 0x7a, 0x5d, 0x5b, 0x2e, 0x26, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, + 0x36, 0x32, 0x7d, 0x5b, 0x2e, 0x26, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0xd0, + 0x01, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xf0, 0x01, 0x0a, + 0x0e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x3f, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, + 0x61, 0x6e, 0x64, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x2b, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, + 0x61, 0x6e, 0x64, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0x70, 0x0a, + 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, + 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x4f, 0x50, + 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x45, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x22, + 0xe8, 0x01, 0x0a, 0x06, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x27, 0x0a, 0x06, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x78, 0x70, 0x61, 0x6e, 0x64, 0x54, 0x72, 0x65, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, + 0x06, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x29, 0x0a, 0x04, 0x6c, 0x65, 0x61, 0x66, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c, 0x65, 0x61, 0x66, 0x48, 0x00, 0x52, 0x04, 0x6c, 0x65, + 0x61, 0x66, 0x42, 0x06, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0xa3, 0x01, 0x0a, 0x0a, 0x45, + 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4c, 0x65, 0x61, 0x66, 0x12, 0x2f, 0x0a, 0x08, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x48, 0x00, + 0x52, 0x08, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x06, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, + 0x22, 0x8e, 0x01, 0x0a, 0x06, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x1a, 0x4f, 0x0a, 0x0b, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x38, 0x0a, 0x08, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x2c, 0x0a, + 0x08, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x08, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x68, 0x0a, 0x06, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x22, 0x66, 0x0a, 0x0b, 0x44, 0x61, 0x74, 0x61, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x37, 0x0a, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, + 0x0c, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x86, 0x02, + 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x3b, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x05, 0x74, 0x75, - 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x22, 0x52, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, - 0x15, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x45, 0x52, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x14, - 0x0a, 0x10, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, - 0x54, 0x45, 0x10, 0x02, 0x2a, 0x48, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x53, 0x55, 0x4c, - 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x52, - 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x44, 0x45, 0x4e, 0x49, 0x45, 0x44, 0x10, 0x02, 0x42, 0x2b, - 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x65, 0x72, - 0x6d, 0x69, 0x66, 0x79, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x66, 0x79, 0x2f, 0x70, 0x6b, 0x67, - 0x2f, 0x70, 0x62, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x1d, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x05, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x05, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x12, 0x32, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x48, 0x00, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, 0x52, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, + 0x10, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, + 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, 0x42, 0x0b, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x1e, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1f, 0x0a, 0x07, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1e, 0x0a, 0x06, 0x44, 0x6f, 0x75, 0x62, 0x6c, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1f, 0x0a, 0x07, 0x42, 0x6f, 0x6f, 0x6c, 0x65, + 0x61, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x25, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, + 0x26, 0x0a, 0x0c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, + 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x25, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, + 0x65, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x01, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x26, + 0x0a, 0x0c, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x16, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x08, 0x52, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2a, 0x5e, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x52, + 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x52, 0x45, 0x53, + 0x55, 0x4c, 0x54, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x44, 0x10, 0x01, 0x12, 0x17, 0x0a, + 0x13, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x44, 0x45, + 0x4e, 0x49, 0x45, 0x44, 0x10, 0x02, 0x2a, 0xa3, 0x02, 0x0a, 0x0d, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x54, 0x54, 0x52, + 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x54, 0x54, 0x52, + 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x45, + 0x41, 0x4e, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, + 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x5f, 0x41, + 0x52, 0x52, 0x41, 0x59, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, + 0x55, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, + 0x03, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x52, 0x52, 0x41, 0x59, + 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x05, 0x12, 0x20, + 0x0a, 0x1c, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x5f, 0x41, 0x52, 0x52, 0x41, 0x59, 0x10, 0x06, + 0x12, 0x19, 0x0a, 0x15, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, + 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, + 0x55, 0x42, 0x4c, 0x45, 0x5f, 0x41, 0x52, 0x52, 0x41, 0x59, 0x10, 0x08, 0x42, 0x2b, 0x5a, 0x29, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x66, 0x79, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x66, 0x79, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, + 0x62, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -2075,85 +3663,144 @@ func file_base_v1_base_proto_rawDescGZIP() []byte { return file_base_v1_base_proto_rawDescData } -var file_base_v1_base_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_base_v1_base_proto_msgTypes = make([]protoimpl.MessageInfo, 29) +var file_base_v1_base_proto_enumTypes = make([]protoimpl.EnumInfo, 7) +var file_base_v1_base_proto_msgTypes = make([]protoimpl.MessageInfo, 54) var file_base_v1_base_proto_goTypes = []interface{}{ - (CheckResult)(0), // 0: base.v1.CheckResult - (Rewrite_Operation)(0), // 1: base.v1.Rewrite.Operation - (EntityDefinition_RelationalReference)(0), // 2: base.v1.EntityDefinition.RelationalReference - (ExpandTreeNode_Operation)(0), // 3: base.v1.ExpandTreeNode.Operation - (TupleChange_Operation)(0), // 4: base.v1.TupleChange.Operation - (*Child)(nil), // 5: base.v1.Child - (*Leaf)(nil), // 6: base.v1.Leaf - (*Rewrite)(nil), // 7: base.v1.Rewrite - (*SchemaDefinition)(nil), // 8: base.v1.SchemaDefinition - (*EntityDefinition)(nil), // 9: base.v1.EntityDefinition - (*RelationDefinition)(nil), // 10: base.v1.RelationDefinition - (*PermissionDefinition)(nil), // 11: base.v1.PermissionDefinition - (*RelationReference)(nil), // 12: base.v1.RelationReference - (*ComputedUserSet)(nil), // 13: base.v1.ComputedUserSet - (*TupleSet)(nil), // 14: base.v1.TupleSet - (*TupleToUserSet)(nil), // 15: base.v1.TupleToUserSet - (*Tuple)(nil), // 16: base.v1.Tuple - (*Tuples)(nil), // 17: base.v1.Tuples - (*Entity)(nil), // 18: base.v1.Entity - (*EntityAndRelation)(nil), // 19: base.v1.EntityAndRelation - (*Subject)(nil), // 20: base.v1.Subject - (*TupleFilter)(nil), // 21: base.v1.TupleFilter - (*EntityFilter)(nil), // 22: base.v1.EntityFilter - (*SubjectFilter)(nil), // 23: base.v1.SubjectFilter - (*ExpandTreeNode)(nil), // 24: base.v1.ExpandTreeNode - (*Expand)(nil), // 25: base.v1.Expand - (*Subjects)(nil), // 26: base.v1.Subjects - (*Tenant)(nil), // 27: base.v1.Tenant - (*TupleChanges)(nil), // 28: base.v1.TupleChanges - (*TupleChange)(nil), // 29: base.v1.TupleChange - nil, // 30: base.v1.SchemaDefinition.EntityDefinitionsEntry - nil, // 31: base.v1.EntityDefinition.RelationsEntry - nil, // 32: base.v1.EntityDefinition.PermissionsEntry - nil, // 33: base.v1.EntityDefinition.ReferencesEntry - (*timestamppb.Timestamp)(nil), // 34: google.protobuf.Timestamp + (CheckResult)(0), // 0: base.v1.CheckResult + (AttributeType)(0), // 1: base.v1.AttributeType + (Rewrite_Operation)(0), // 2: base.v1.Rewrite.Operation + (SchemaDefinition_Reference)(0), // 3: base.v1.SchemaDefinition.Reference + (EntityDefinition_Reference)(0), // 4: base.v1.EntityDefinition.Reference + (ExpandTreeNode_Operation)(0), // 5: base.v1.ExpandTreeNode.Operation + (DataChange_Operation)(0), // 6: base.v1.DataChange.Operation + (*Context)(nil), // 7: base.v1.Context + (*Child)(nil), // 8: base.v1.Child + (*Leaf)(nil), // 9: base.v1.Leaf + (*Rewrite)(nil), // 10: base.v1.Rewrite + (*SchemaDefinition)(nil), // 11: base.v1.SchemaDefinition + (*EntityDefinition)(nil), // 12: base.v1.EntityDefinition + (*RuleDefinition)(nil), // 13: base.v1.RuleDefinition + (*AttributeDefinition)(nil), // 14: base.v1.AttributeDefinition + (*RelationDefinition)(nil), // 15: base.v1.RelationDefinition + (*PermissionDefinition)(nil), // 16: base.v1.PermissionDefinition + (*RelationReference)(nil), // 17: base.v1.RelationReference + (*Argument)(nil), // 18: base.v1.Argument + (*Call)(nil), // 19: base.v1.Call + (*ComputedAttribute)(nil), // 20: base.v1.ComputedAttribute + (*ContextAttribute)(nil), // 21: base.v1.ContextAttribute + (*ComputedUserSet)(nil), // 22: base.v1.ComputedUserSet + (*TupleToUserSet)(nil), // 23: base.v1.TupleToUserSet + (*TupleSet)(nil), // 24: base.v1.TupleSet + (*Tuple)(nil), // 25: base.v1.Tuple + (*Attribute)(nil), // 26: base.v1.Attribute + (*Tuples)(nil), // 27: base.v1.Tuples + (*Attributes)(nil), // 28: base.v1.Attributes + (*Entity)(nil), // 29: base.v1.Entity + (*EntityAndRelation)(nil), // 30: base.v1.EntityAndRelation + (*Subject)(nil), // 31: base.v1.Subject + (*AttributeFilter)(nil), // 32: base.v1.AttributeFilter + (*TupleFilter)(nil), // 33: base.v1.TupleFilter + (*EntityFilter)(nil), // 34: base.v1.EntityFilter + (*SubjectFilter)(nil), // 35: base.v1.SubjectFilter + (*ExpandTreeNode)(nil), // 36: base.v1.ExpandTreeNode + (*Expand)(nil), // 37: base.v1.Expand + (*ExpandLeaf)(nil), // 38: base.v1.ExpandLeaf + (*Values)(nil), // 39: base.v1.Values + (*Subjects)(nil), // 40: base.v1.Subjects + (*Tenant)(nil), // 41: base.v1.Tenant + (*DataChanges)(nil), // 42: base.v1.DataChanges + (*DataChange)(nil), // 43: base.v1.DataChange + (*String)(nil), // 44: base.v1.String + (*Integer)(nil), // 45: base.v1.Integer + (*Double)(nil), // 46: base.v1.Double + (*Boolean)(nil), // 47: base.v1.Boolean + (*StringArray)(nil), // 48: base.v1.StringArray + (*IntegerArray)(nil), // 49: base.v1.IntegerArray + (*DoubleArray)(nil), // 50: base.v1.DoubleArray + (*BooleanArray)(nil), // 51: base.v1.BooleanArray + nil, // 52: base.v1.SchemaDefinition.EntityDefinitionsEntry + nil, // 53: base.v1.SchemaDefinition.RuleDefinitionsEntry + nil, // 54: base.v1.SchemaDefinition.ReferencesEntry + nil, // 55: base.v1.EntityDefinition.RelationsEntry + nil, // 56: base.v1.EntityDefinition.PermissionsEntry + nil, // 57: base.v1.EntityDefinition.AttributesEntry + nil, // 58: base.v1.EntityDefinition.ReferencesEntry + nil, // 59: base.v1.RuleDefinition.ArgumentsEntry + nil, // 60: base.v1.Values.ValuesEntry + (*structpb.Struct)(nil), // 61: google.protobuf.Struct + (*v1alpha1.CheckedExpr)(nil), // 62: google.api.expr.v1alpha1.CheckedExpr + (*anypb.Any)(nil), // 63: google.protobuf.Any + (*timestamppb.Timestamp)(nil), // 64: google.protobuf.Timestamp } var file_base_v1_base_proto_depIdxs = []int32{ - 6, // 0: base.v1.Child.leaf:type_name -> base.v1.Leaf - 7, // 1: base.v1.Child.rewrite:type_name -> base.v1.Rewrite - 13, // 2: base.v1.Leaf.computed_user_set:type_name -> base.v1.ComputedUserSet - 15, // 3: base.v1.Leaf.tuple_to_user_set:type_name -> base.v1.TupleToUserSet - 1, // 4: base.v1.Rewrite.rewrite_operation:type_name -> base.v1.Rewrite.Operation - 5, // 5: base.v1.Rewrite.children:type_name -> base.v1.Child - 30, // 6: base.v1.SchemaDefinition.entity_definitions:type_name -> base.v1.SchemaDefinition.EntityDefinitionsEntry - 31, // 7: base.v1.EntityDefinition.relations:type_name -> base.v1.EntityDefinition.RelationsEntry - 32, // 8: base.v1.EntityDefinition.permissions:type_name -> base.v1.EntityDefinition.PermissionsEntry - 33, // 9: base.v1.EntityDefinition.references:type_name -> base.v1.EntityDefinition.ReferencesEntry - 12, // 10: base.v1.RelationDefinition.relation_references:type_name -> base.v1.RelationReference - 5, // 11: base.v1.PermissionDefinition.child:type_name -> base.v1.Child - 14, // 12: base.v1.TupleToUserSet.tupleSet:type_name -> base.v1.TupleSet - 13, // 13: base.v1.TupleToUserSet.computed:type_name -> base.v1.ComputedUserSet - 18, // 14: base.v1.Tuple.entity:type_name -> base.v1.Entity - 20, // 15: base.v1.Tuple.subject:type_name -> base.v1.Subject - 16, // 16: base.v1.Tuples.tuples:type_name -> base.v1.Tuple - 18, // 17: base.v1.EntityAndRelation.entity:type_name -> base.v1.Entity - 22, // 18: base.v1.TupleFilter.entity:type_name -> base.v1.EntityFilter - 23, // 19: base.v1.TupleFilter.subject:type_name -> base.v1.SubjectFilter - 3, // 20: base.v1.ExpandTreeNode.operation:type_name -> base.v1.ExpandTreeNode.Operation - 25, // 21: base.v1.ExpandTreeNode.children:type_name -> base.v1.Expand - 19, // 22: base.v1.Expand.target:type_name -> base.v1.EntityAndRelation - 24, // 23: base.v1.Expand.expand:type_name -> base.v1.ExpandTreeNode - 26, // 24: base.v1.Expand.leaf:type_name -> base.v1.Subjects - 20, // 25: base.v1.Subjects.subjects:type_name -> base.v1.Subject - 34, // 26: base.v1.Tenant.created_at:type_name -> google.protobuf.Timestamp - 29, // 27: base.v1.TupleChanges.tuple_changes:type_name -> base.v1.TupleChange - 4, // 28: base.v1.TupleChange.operation:type_name -> base.v1.TupleChange.Operation - 16, // 29: base.v1.TupleChange.tuple:type_name -> base.v1.Tuple - 9, // 30: base.v1.SchemaDefinition.EntityDefinitionsEntry.value:type_name -> base.v1.EntityDefinition - 10, // 31: base.v1.EntityDefinition.RelationsEntry.value:type_name -> base.v1.RelationDefinition - 11, // 32: base.v1.EntityDefinition.PermissionsEntry.value:type_name -> base.v1.PermissionDefinition - 2, // 33: base.v1.EntityDefinition.ReferencesEntry.value:type_name -> base.v1.EntityDefinition.RelationalReference - 34, // [34:34] is the sub-list for method output_type - 34, // [34:34] is the sub-list for method input_type - 34, // [34:34] is the sub-list for extension type_name - 34, // [34:34] is the sub-list for extension extendee - 0, // [0:34] is the sub-list for field type_name + 25, // 0: base.v1.Context.tuples:type_name -> base.v1.Tuple + 26, // 1: base.v1.Context.attributes:type_name -> base.v1.Attribute + 61, // 2: base.v1.Context.data:type_name -> google.protobuf.Struct + 9, // 3: base.v1.Child.leaf:type_name -> base.v1.Leaf + 10, // 4: base.v1.Child.rewrite:type_name -> base.v1.Rewrite + 22, // 5: base.v1.Leaf.computed_user_set:type_name -> base.v1.ComputedUserSet + 23, // 6: base.v1.Leaf.tuple_to_user_set:type_name -> base.v1.TupleToUserSet + 20, // 7: base.v1.Leaf.computed_attribute:type_name -> base.v1.ComputedAttribute + 19, // 8: base.v1.Leaf.call:type_name -> base.v1.Call + 2, // 9: base.v1.Rewrite.rewrite_operation:type_name -> base.v1.Rewrite.Operation + 8, // 10: base.v1.Rewrite.children:type_name -> base.v1.Child + 52, // 11: base.v1.SchemaDefinition.entity_definitions:type_name -> base.v1.SchemaDefinition.EntityDefinitionsEntry + 53, // 12: base.v1.SchemaDefinition.rule_definitions:type_name -> base.v1.SchemaDefinition.RuleDefinitionsEntry + 54, // 13: base.v1.SchemaDefinition.references:type_name -> base.v1.SchemaDefinition.ReferencesEntry + 55, // 14: base.v1.EntityDefinition.relations:type_name -> base.v1.EntityDefinition.RelationsEntry + 56, // 15: base.v1.EntityDefinition.permissions:type_name -> base.v1.EntityDefinition.PermissionsEntry + 57, // 16: base.v1.EntityDefinition.attributes:type_name -> base.v1.EntityDefinition.AttributesEntry + 58, // 17: base.v1.EntityDefinition.references:type_name -> base.v1.EntityDefinition.ReferencesEntry + 59, // 18: base.v1.RuleDefinition.arguments:type_name -> base.v1.RuleDefinition.ArgumentsEntry + 62, // 19: base.v1.RuleDefinition.expression:type_name -> google.api.expr.v1alpha1.CheckedExpr + 1, // 20: base.v1.AttributeDefinition.type:type_name -> base.v1.AttributeType + 17, // 21: base.v1.RelationDefinition.relation_references:type_name -> base.v1.RelationReference + 8, // 22: base.v1.PermissionDefinition.child:type_name -> base.v1.Child + 20, // 23: base.v1.Argument.computed_attribute:type_name -> base.v1.ComputedAttribute + 21, // 24: base.v1.Argument.context_attribute:type_name -> base.v1.ContextAttribute + 18, // 25: base.v1.Call.arguments:type_name -> base.v1.Argument + 24, // 26: base.v1.TupleToUserSet.tupleSet:type_name -> base.v1.TupleSet + 22, // 27: base.v1.TupleToUserSet.computed:type_name -> base.v1.ComputedUserSet + 29, // 28: base.v1.Tuple.entity:type_name -> base.v1.Entity + 31, // 29: base.v1.Tuple.subject:type_name -> base.v1.Subject + 29, // 30: base.v1.Attribute.entity:type_name -> base.v1.Entity + 63, // 31: base.v1.Attribute.value:type_name -> google.protobuf.Any + 25, // 32: base.v1.Tuples.tuples:type_name -> base.v1.Tuple + 26, // 33: base.v1.Attributes.attributes:type_name -> base.v1.Attribute + 29, // 34: base.v1.EntityAndRelation.entity:type_name -> base.v1.Entity + 34, // 35: base.v1.AttributeFilter.entity:type_name -> base.v1.EntityFilter + 34, // 36: base.v1.TupleFilter.entity:type_name -> base.v1.EntityFilter + 35, // 37: base.v1.TupleFilter.subject:type_name -> base.v1.SubjectFilter + 5, // 38: base.v1.ExpandTreeNode.operation:type_name -> base.v1.ExpandTreeNode.Operation + 37, // 39: base.v1.ExpandTreeNode.children:type_name -> base.v1.Expand + 29, // 40: base.v1.Expand.entity:type_name -> base.v1.Entity + 18, // 41: base.v1.Expand.arguments:type_name -> base.v1.Argument + 36, // 42: base.v1.Expand.expand:type_name -> base.v1.ExpandTreeNode + 38, // 43: base.v1.Expand.leaf:type_name -> base.v1.ExpandLeaf + 40, // 44: base.v1.ExpandLeaf.subjects:type_name -> base.v1.Subjects + 39, // 45: base.v1.ExpandLeaf.values:type_name -> base.v1.Values + 63, // 46: base.v1.ExpandLeaf.value:type_name -> google.protobuf.Any + 60, // 47: base.v1.Values.values:type_name -> base.v1.Values.ValuesEntry + 31, // 48: base.v1.Subjects.subjects:type_name -> base.v1.Subject + 64, // 49: base.v1.Tenant.created_at:type_name -> google.protobuf.Timestamp + 43, // 50: base.v1.DataChanges.data_changes:type_name -> base.v1.DataChange + 6, // 51: base.v1.DataChange.operation:type_name -> base.v1.DataChange.Operation + 25, // 52: base.v1.DataChange.tuple:type_name -> base.v1.Tuple + 26, // 53: base.v1.DataChange.attribute:type_name -> base.v1.Attribute + 12, // 54: base.v1.SchemaDefinition.EntityDefinitionsEntry.value:type_name -> base.v1.EntityDefinition + 13, // 55: base.v1.SchemaDefinition.RuleDefinitionsEntry.value:type_name -> base.v1.RuleDefinition + 3, // 56: base.v1.SchemaDefinition.ReferencesEntry.value:type_name -> base.v1.SchemaDefinition.Reference + 15, // 57: base.v1.EntityDefinition.RelationsEntry.value:type_name -> base.v1.RelationDefinition + 16, // 58: base.v1.EntityDefinition.PermissionsEntry.value:type_name -> base.v1.PermissionDefinition + 14, // 59: base.v1.EntityDefinition.AttributesEntry.value:type_name -> base.v1.AttributeDefinition + 4, // 60: base.v1.EntityDefinition.ReferencesEntry.value:type_name -> base.v1.EntityDefinition.Reference + 1, // 61: base.v1.RuleDefinition.ArgumentsEntry.value:type_name -> base.v1.AttributeType + 63, // 62: base.v1.Values.ValuesEntry.value:type_name -> google.protobuf.Any + 63, // [63:63] is the sub-list for method output_type + 63, // [63:63] is the sub-list for method input_type + 63, // [63:63] is the sub-list for extension type_name + 63, // [63:63] is the sub-list for extension extendee + 0, // [0:63] is the sub-list for field type_name } func init() { file_base_v1_base_proto_init() } @@ -2163,7 +3810,7 @@ func file_base_v1_base_proto_init() { } if !protoimpl.UnsafeEnabled { file_base_v1_base_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Child); i { + switch v := v.(*Context); i { case 0: return &v.state case 1: @@ -2175,7 +3822,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Leaf); i { + switch v := v.(*Child); i { case 0: return &v.state case 1: @@ -2187,7 +3834,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Rewrite); i { + switch v := v.(*Leaf); i { case 0: return &v.state case 1: @@ -2199,7 +3846,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SchemaDefinition); i { + switch v := v.(*Rewrite); i { case 0: return &v.state case 1: @@ -2211,7 +3858,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntityDefinition); i { + switch v := v.(*SchemaDefinition); i { case 0: return &v.state case 1: @@ -2223,7 +3870,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RelationDefinition); i { + switch v := v.(*EntityDefinition); i { case 0: return &v.state case 1: @@ -2235,7 +3882,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PermissionDefinition); i { + switch v := v.(*RuleDefinition); i { case 0: return &v.state case 1: @@ -2247,7 +3894,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RelationReference); i { + switch v := v.(*AttributeDefinition); i { case 0: return &v.state case 1: @@ -2259,7 +3906,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ComputedUserSet); i { + switch v := v.(*RelationDefinition); i { case 0: return &v.state case 1: @@ -2271,7 +3918,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TupleSet); i { + switch v := v.(*PermissionDefinition); i { case 0: return &v.state case 1: @@ -2283,7 +3930,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TupleToUserSet); i { + switch v := v.(*RelationReference); i { case 0: return &v.state case 1: @@ -2295,7 +3942,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tuple); i { + switch v := v.(*Argument); i { case 0: return &v.state case 1: @@ -2307,7 +3954,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tuples); i { + switch v := v.(*Call); i { case 0: return &v.state case 1: @@ -2319,7 +3966,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Entity); i { + switch v := v.(*ComputedAttribute); i { case 0: return &v.state case 1: @@ -2331,7 +3978,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntityAndRelation); i { + switch v := v.(*ContextAttribute); i { case 0: return &v.state case 1: @@ -2343,7 +3990,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Subject); i { + switch v := v.(*ComputedUserSet); i { case 0: return &v.state case 1: @@ -2355,7 +4002,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TupleFilter); i { + switch v := v.(*TupleToUserSet); i { case 0: return &v.state case 1: @@ -2367,7 +4014,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EntityFilter); i { + switch v := v.(*TupleSet); i { case 0: return &v.state case 1: @@ -2379,7 +4026,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubjectFilter); i { + switch v := v.(*Tuple); i { case 0: return &v.state case 1: @@ -2391,7 +4038,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExpandTreeNode); i { + switch v := v.(*Attribute); i { case 0: return &v.state case 1: @@ -2403,7 +4050,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Expand); i { + switch v := v.(*Tuples); i { case 0: return &v.state case 1: @@ -2415,7 +4062,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Subjects); i { + switch v := v.(*Attributes); i { case 0: return &v.state case 1: @@ -2427,7 +4074,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Tenant); i { + switch v := v.(*Entity); i { case 0: return &v.state case 1: @@ -2439,7 +4086,7 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TupleChanges); i { + switch v := v.(*EntityAndRelation); i { case 0: return &v.state case 1: @@ -2451,7 +4098,247 @@ func file_base_v1_base_proto_init() { } } file_base_v1_base_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TupleChange); i { + switch v := v.(*Subject); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttributeFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TupleFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EntityFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubjectFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExpandTreeNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Expand); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExpandLeaf); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Values); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Subjects); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tenant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataChanges); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataChange); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*String); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Integer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Double); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Boolean); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StringArray); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IntegerArray); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoubleArray); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_base_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BooleanArray); i { case 0: return &v.state case 1: @@ -2463,25 +4350,40 @@ func file_base_v1_base_proto_init() { } } } - file_base_v1_base_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_base_v1_base_proto_msgTypes[1].OneofWrappers = []interface{}{ (*Child_Leaf)(nil), (*Child_Rewrite)(nil), } - file_base_v1_base_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_base_v1_base_proto_msgTypes[2].OneofWrappers = []interface{}{ (*Leaf_ComputedUserSet)(nil), (*Leaf_TupleToUserSet)(nil), + (*Leaf_ComputedAttribute)(nil), + (*Leaf_Call)(nil), + } + file_base_v1_base_proto_msgTypes[11].OneofWrappers = []interface{}{ + (*Argument_ComputedAttribute)(nil), + (*Argument_ContextAttribute)(nil), } - file_base_v1_base_proto_msgTypes[20].OneofWrappers = []interface{}{ + file_base_v1_base_proto_msgTypes[30].OneofWrappers = []interface{}{ (*Expand_Expand)(nil), (*Expand_Leaf)(nil), } + file_base_v1_base_proto_msgTypes[31].OneofWrappers = []interface{}{ + (*ExpandLeaf_Subjects)(nil), + (*ExpandLeaf_Values)(nil), + (*ExpandLeaf_Value)(nil), + } + file_base_v1_base_proto_msgTypes[36].OneofWrappers = []interface{}{ + (*DataChange_Tuple)(nil), + (*DataChange_Attribute)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_base_v1_base_proto_rawDesc, - NumEnums: 5, - NumMessages: 29, + NumEnums: 7, + NumMessages: 54, NumExtensions: 0, NumServices: 0, }, diff --git a/generated/base/v1/base.pb.validate.go b/generated/base/v1/base.pb.validate.go index 7449524..4455c7c 100644 --- a/generated/base/v1/base.pb.validate.go +++ b/generated/base/v1/base.pb.validate.go @@ -33,6 +33,110 @@ var ( _ = anypb.Any{} ) +// Validate checks the field values on Context with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Context) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetTuples() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ContextValidationError{ + field: fmt.Sprintf("Tuples[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetAttributes() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ContextValidationError{ + field: fmt.Sprintf("Attributes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if v, ok := interface{}(m.GetData()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ContextValidationError{ + field: "Data", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// ContextValidationError is the validation error returned by Context.Validate +// if the designated constraints aren't met. +type ContextValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ContextValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ContextValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ContextValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ContextValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ContextValidationError) ErrorName() string { return "ContextValidationError" } + +// Error satisfies the builtin error interface +func (e ContextValidationError) 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 %sContext.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ContextValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ContextValidationError{} + // Validate checks the field values on Child with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. func (m *Child) Validate() error { @@ -192,6 +296,44 @@ func (m *Leaf) Validate() error { } } + case *Leaf_ComputedAttribute: + + if m.GetComputedAttribute() == nil { + return LeafValidationError{ + field: "ComputedAttribute", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetComputedAttribute()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LeafValidationError{ + field: "ComputedAttribute", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Leaf_Call: + + if m.GetCall() == nil { + return LeafValidationError{ + field: "Call", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetCall()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LeafValidationError{ + field: "Call", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: return LeafValidationError{ field: "Type", @@ -363,6 +505,25 @@ func (m *SchemaDefinition) Validate() error { } + for key, val := range m.GetRuleDefinitions() { + _ = val + + // no validation rules for RuleDefinitions[key] + + if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SchemaDefinitionValidationError{ + field: fmt.Sprintf("RuleDefinitions[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for References + return nil } @@ -476,6 +637,23 @@ func (m *EntityDefinition) Validate() error { } + for key, val := range m.GetAttributes() { + _ = val + + // no validation rules for Attributes[key] + + if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return EntityDefinitionValidationError{ + field: fmt.Sprintf("Attributes[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + // no validation rules for References return nil @@ -537,49 +715,46 @@ var _ interface { var _EntityDefinition_Name_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") -// Validate checks the field values on RelationDefinition with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RelationDefinition) Validate() error { +// Validate checks the field values on RuleDefinition with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *RuleDefinition) Validate() error { if m == nil { return nil } if len(m.GetName()) > 64 { - return RelationDefinitionValidationError{ + return RuleDefinitionValidationError{ field: "Name", reason: "value length must be at most 64 bytes", } } - if !_RelationDefinition_Name_Pattern.MatchString(m.GetName()) { - return RelationDefinitionValidationError{ + if !_RuleDefinition_Name_Pattern.MatchString(m.GetName()) { + return RuleDefinitionValidationError{ field: "Name", reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])$\"", } } - for idx, item := range m.GetRelationReferences() { - _, _ = idx, item + // no validation rules for Arguments - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationDefinitionValidationError{ - field: fmt.Sprintf("RelationReferences[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetExpression()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RuleDefinitionValidationError{ + field: "Expression", + reason: "embedded message failed validation", + cause: err, } } - } return nil } -// RelationDefinitionValidationError is the validation error returned by -// RelationDefinition.Validate if the designated constraints aren't met. -type RelationDefinitionValidationError struct { +// RuleDefinitionValidationError is the validation error returned by +// RuleDefinition.Validate if the designated constraints aren't met. +type RuleDefinitionValidationError struct { field string reason string cause error @@ -587,24 +762,22 @@ type RelationDefinitionValidationError struct { } // Field function returns field value. -func (e RelationDefinitionValidationError) Field() string { return e.field } +func (e RuleDefinitionValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e RelationDefinitionValidationError) Reason() string { return e.reason } +func (e RuleDefinitionValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e RelationDefinitionValidationError) Cause() error { return e.cause } +func (e RuleDefinitionValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e RelationDefinitionValidationError) Key() bool { return e.key } +func (e RuleDefinitionValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e RelationDefinitionValidationError) ErrorName() string { - return "RelationDefinitionValidationError" -} +func (e RuleDefinitionValidationError) ErrorName() string { return "RuleDefinitionValidationError" } // Error satisfies the builtin error interface -func (e RelationDefinitionValidationError) Error() string { +func (e RuleDefinitionValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -616,14 +789,14 @@ func (e RelationDefinitionValidationError) Error() string { } return fmt.Sprintf( - "invalid %sRelationDefinition.%s: %s%s", + "invalid %sRuleDefinition.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = RelationDefinitionValidationError{} +var _ error = RuleDefinitionValidationError{} var _ interface { Field() string @@ -631,48 +804,40 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = RelationDefinitionValidationError{} +} = RuleDefinitionValidationError{} -var _RelationDefinition_Name_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") +var _RuleDefinition_Name_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") -// Validate checks the field values on PermissionDefinition with the rules +// Validate checks the field values on AttributeDefinition with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned. -func (m *PermissionDefinition) Validate() error { +func (m *AttributeDefinition) Validate() error { if m == nil { return nil } if len(m.GetName()) > 64 { - return PermissionDefinitionValidationError{ + return AttributeDefinitionValidationError{ field: "Name", reason: "value length must be at most 64 bytes", } } - if !_PermissionDefinition_Name_Pattern.MatchString(m.GetName()) { - return PermissionDefinitionValidationError{ + if !_AttributeDefinition_Name_Pattern.MatchString(m.GetName()) { + return AttributeDefinitionValidationError{ field: "Name", reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])$\"", } } - if v, ok := interface{}(m.GetChild()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PermissionDefinitionValidationError{ - field: "Child", - reason: "embedded message failed validation", - cause: err, - } - } - } + // no validation rules for Type return nil } -// PermissionDefinitionValidationError is the validation error returned by -// PermissionDefinition.Validate if the designated constraints aren't met. -type PermissionDefinitionValidationError struct { +// AttributeDefinitionValidationError is the validation error returned by +// AttributeDefinition.Validate if the designated constraints aren't met. +type AttributeDefinitionValidationError struct { field string reason string cause error @@ -680,24 +845,24 @@ type PermissionDefinitionValidationError struct { } // Field function returns field value. -func (e PermissionDefinitionValidationError) Field() string { return e.field } +func (e AttributeDefinitionValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e PermissionDefinitionValidationError) Reason() string { return e.reason } +func (e AttributeDefinitionValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e PermissionDefinitionValidationError) Cause() error { return e.cause } +func (e AttributeDefinitionValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e PermissionDefinitionValidationError) Key() bool { return e.key } +func (e AttributeDefinitionValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e PermissionDefinitionValidationError) ErrorName() string { - return "PermissionDefinitionValidationError" +func (e AttributeDefinitionValidationError) ErrorName() string { + return "AttributeDefinitionValidationError" } // Error satisfies the builtin error interface -func (e PermissionDefinitionValidationError) Error() string { +func (e AttributeDefinitionValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -709,14 +874,14 @@ func (e PermissionDefinitionValidationError) Error() string { } return fmt.Sprintf( - "invalid %sPermissionDefinition.%s: %s%s", + "invalid %sAttributeDefinition.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = PermissionDefinitionValidationError{} +var _ error = AttributeDefinitionValidationError{} var _ interface { Field() string @@ -724,45 +889,42 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = PermissionDefinitionValidationError{} +} = AttributeDefinitionValidationError{} -var _PermissionDefinition_Name_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") +var _AttributeDefinition_Name_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") -// Validate checks the field values on RelationReference with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *RelationReference) Validate() error { +// Validate checks the field values on RelationDefinition with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *RelationDefinition) Validate() error { if m == nil { return nil } - if len(m.GetType()) > 64 { - return RelationReferenceValidationError{ - field: "Type", + if len(m.GetName()) > 64 { + return RelationDefinitionValidationError{ + field: "Name", reason: "value length must be at most 64 bytes", } } - if !_RelationReference_Type_Pattern.MatchString(m.GetType()) { - return RelationReferenceValidationError{ - field: "Type", + if !_RelationDefinition_Name_Pattern.MatchString(m.GetName()) { + return RelationDefinitionValidationError{ + field: "Name", reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])$\"", } } - if m.GetRelation() != "" { - - if len(m.GetRelation()) > 64 { - return RelationReferenceValidationError{ - field: "Relation", - reason: "value length must be at most 64 bytes", - } - } + for idx, item := range m.GetRelationReferences() { + _, _ = idx, item - if !_RelationReference_Relation_Pattern.MatchString(m.GetRelation()) { - return RelationReferenceValidationError{ - field: "Relation", - reason: "value does not match regex pattern \"^[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RelationDefinitionValidationError{ + field: fmt.Sprintf("RelationReferences[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } } } @@ -771,9 +933,9 @@ func (m *RelationReference) Validate() error { return nil } -// RelationReferenceValidationError is the validation error returned by -// RelationReference.Validate if the designated constraints aren't met. -type RelationReferenceValidationError struct { +// RelationDefinitionValidationError is the validation error returned by +// RelationDefinition.Validate if the designated constraints aren't met. +type RelationDefinitionValidationError struct { field string reason string cause error @@ -781,24 +943,24 @@ type RelationReferenceValidationError struct { } // Field function returns field value. -func (e RelationReferenceValidationError) Field() string { return e.field } +func (e RelationDefinitionValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e RelationReferenceValidationError) Reason() string { return e.reason } +func (e RelationDefinitionValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e RelationReferenceValidationError) Cause() error { return e.cause } +func (e RelationDefinitionValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e RelationReferenceValidationError) Key() bool { return e.key } +func (e RelationDefinitionValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e RelationReferenceValidationError) ErrorName() string { - return "RelationReferenceValidationError" +func (e RelationDefinitionValidationError) ErrorName() string { + return "RelationDefinitionValidationError" } // Error satisfies the builtin error interface -func (e RelationReferenceValidationError) Error() string { +func (e RelationDefinitionValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -810,14 +972,14 @@ func (e RelationReferenceValidationError) Error() string { } return fmt.Sprintf( - "invalid %sRelationReference.%s: %s%s", + "invalid %sRelationDefinition.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = RelationReferenceValidationError{} +var _ error = RelationDefinitionValidationError{} var _ interface { Field() string @@ -825,40 +987,48 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = RelationReferenceValidationError{} - -var _RelationReference_Type_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") +} = RelationDefinitionValidationError{} -var _RelationReference_Relation_Pattern = regexp.MustCompile("^[a-z][a-z0-9_]{1,62}[a-z0-9]$") +var _RelationDefinition_Name_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") -// Validate checks the field values on ComputedUserSet with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *ComputedUserSet) Validate() error { +// Validate checks the field values on PermissionDefinition with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *PermissionDefinition) Validate() error { if m == nil { return nil } - if len(m.GetRelation()) > 64 { - return ComputedUserSetValidationError{ - field: "Relation", + if len(m.GetName()) > 64 { + return PermissionDefinitionValidationError{ + field: "Name", reason: "value length must be at most 64 bytes", } } - if !_ComputedUserSet_Relation_Pattern.MatchString(m.GetRelation()) { - return ComputedUserSetValidationError{ - field: "Relation", - reason: "value does not match regex pattern \"^[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", + if !_PermissionDefinition_Name_Pattern.MatchString(m.GetName()) { + return PermissionDefinitionValidationError{ + field: "Name", + reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])$\"", + } + } + + if v, ok := interface{}(m.GetChild()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionDefinitionValidationError{ + field: "Child", + reason: "embedded message failed validation", + cause: err, + } } } return nil } -// ComputedUserSetValidationError is the validation error returned by -// ComputedUserSet.Validate if the designated constraints aren't met. -type ComputedUserSetValidationError struct { +// PermissionDefinitionValidationError is the validation error returned by +// PermissionDefinition.Validate if the designated constraints aren't met. +type PermissionDefinitionValidationError struct { field string reason string cause error @@ -866,22 +1036,24 @@ type ComputedUserSetValidationError struct { } // Field function returns field value. -func (e ComputedUserSetValidationError) Field() string { return e.field } +func (e PermissionDefinitionValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e ComputedUserSetValidationError) Reason() string { return e.reason } +func (e PermissionDefinitionValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e ComputedUserSetValidationError) Cause() error { return e.cause } +func (e PermissionDefinitionValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e ComputedUserSetValidationError) Key() bool { return e.key } +func (e PermissionDefinitionValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e ComputedUserSetValidationError) ErrorName() string { return "ComputedUserSetValidationError" } +func (e PermissionDefinitionValidationError) ErrorName() string { + return "PermissionDefinitionValidationError" +} // Error satisfies the builtin error interface -func (e ComputedUserSetValidationError) Error() string { +func (e PermissionDefinitionValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -893,14 +1065,14 @@ func (e ComputedUserSetValidationError) Error() string { } return fmt.Sprintf( - "invalid %sComputedUserSet.%s: %s%s", + "invalid %sPermissionDefinition.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = ComputedUserSetValidationError{} +var _ error = PermissionDefinitionValidationError{} var _ interface { Field() string @@ -908,37 +1080,56 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = ComputedUserSetValidationError{} +} = PermissionDefinitionValidationError{} -var _ComputedUserSet_Relation_Pattern = regexp.MustCompile("^[a-z][a-z0-9_]{1,62}[a-z0-9]$") +var _PermissionDefinition_Name_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") -// Validate checks the field values on TupleSet with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *TupleSet) Validate() error { +// Validate checks the field values on RelationReference with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *RelationReference) Validate() error { if m == nil { return nil } - if len(m.GetRelation()) > 64 { - return TupleSetValidationError{ - field: "Relation", + if len(m.GetType()) > 64 { + return RelationReferenceValidationError{ + field: "Type", reason: "value length must be at most 64 bytes", } } - if !_TupleSet_Relation_Pattern.MatchString(m.GetRelation()) { - return TupleSetValidationError{ - field: "Relation", - reason: "value does not match regex pattern \"^[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", + if !_RelationReference_Type_Pattern.MatchString(m.GetType()) { + return RelationReferenceValidationError{ + field: "Type", + reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])$\"", + } + } + + if m.GetRelation() != "" { + + if len(m.GetRelation()) > 64 { + return RelationReferenceValidationError{ + field: "Relation", + reason: "value length must be at most 64 bytes", + } + } + + if !_RelationReference_Relation_Pattern.MatchString(m.GetRelation()) { + return RelationReferenceValidationError{ + field: "Relation", + reason: "value does not match regex pattern \"^[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", + } } + } return nil } -// TupleSetValidationError is the validation error returned by -// TupleSet.Validate if the designated constraints aren't met. -type TupleSetValidationError struct { +// RelationReferenceValidationError is the validation error returned by +// RelationReference.Validate if the designated constraints aren't met. +type RelationReferenceValidationError struct { field string reason string cause error @@ -946,22 +1137,24 @@ type TupleSetValidationError struct { } // Field function returns field value. -func (e TupleSetValidationError) Field() string { return e.field } +func (e RelationReferenceValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e TupleSetValidationError) Reason() string { return e.reason } +func (e RelationReferenceValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e TupleSetValidationError) Cause() error { return e.cause } +func (e RelationReferenceValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e TupleSetValidationError) Key() bool { return e.key } +func (e RelationReferenceValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e TupleSetValidationError) ErrorName() string { return "TupleSetValidationError" } +func (e RelationReferenceValidationError) ErrorName() string { + return "RelationReferenceValidationError" +} // Error satisfies the builtin error interface -func (e TupleSetValidationError) Error() string { +func (e RelationReferenceValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -973,14 +1166,14 @@ func (e TupleSetValidationError) Error() string { } return fmt.Sprintf( - "invalid %sTupleSet.%s: %s%s", + "invalid %sRelationReference.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = TupleSetValidationError{} +var _ error = RelationReferenceValidationError{} var _ interface { Field() string @@ -988,44 +1181,53 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = TupleSetValidationError{} +} = RelationReferenceValidationError{} -var _TupleSet_Relation_Pattern = regexp.MustCompile("^[a-z][a-z0-9_]{1,62}[a-z0-9]$") +var _RelationReference_Type_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") -// Validate checks the field values on TupleToUserSet with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *TupleToUserSet) Validate() error { +var _RelationReference_Relation_Pattern = regexp.MustCompile("^[a-z][a-z0-9_]{1,62}[a-z0-9]$") + +// Validate checks the field values on Argument with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Argument) Validate() error { if m == nil { return nil } - if v, ok := interface{}(m.GetTupleSet()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TupleToUserSetValidationError{ - field: "TupleSet", - reason: "embedded message failed validation", - cause: err, + switch m.Type.(type) { + + case *Argument_ComputedAttribute: + + if v, ok := interface{}(m.GetComputedAttribute()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ArgumentValidationError{ + field: "ComputedAttribute", + reason: "embedded message failed validation", + cause: err, + } } } - } - if v, ok := interface{}(m.GetComputed()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TupleToUserSetValidationError{ - field: "Computed", - reason: "embedded message failed validation", - cause: err, + case *Argument_ContextAttribute: + + if v, ok := interface{}(m.GetContextAttribute()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ArgumentValidationError{ + field: "ContextAttribute", + reason: "embedded message failed validation", + cause: err, + } } } + } return nil } -// TupleToUserSetValidationError is the validation error returned by -// TupleToUserSet.Validate if the designated constraints aren't met. -type TupleToUserSetValidationError struct { +// ArgumentValidationError is the validation error returned by +// Argument.Validate if the designated constraints aren't met. +type ArgumentValidationError struct { field string reason string cause error @@ -1033,22 +1235,22 @@ type TupleToUserSetValidationError struct { } // Field function returns field value. -func (e TupleToUserSetValidationError) Field() string { return e.field } +func (e ArgumentValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e TupleToUserSetValidationError) Reason() string { return e.reason } +func (e ArgumentValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e TupleToUserSetValidationError) Cause() error { return e.cause } +func (e ArgumentValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e TupleToUserSetValidationError) Key() bool { return e.key } +func (e ArgumentValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e TupleToUserSetValidationError) ErrorName() string { return "TupleToUserSetValidationError" } +func (e ArgumentValidationError) ErrorName() string { return "ArgumentValidationError" } // Error satisfies the builtin error interface -func (e TupleToUserSetValidationError) Error() string { +func (e ArgumentValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1060,14 +1262,14 @@ func (e TupleToUserSetValidationError) Error() string { } return fmt.Sprintf( - "invalid %sTupleToUserSet.%s: %s%s", + "invalid %sArgument.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = TupleToUserSetValidationError{} +var _ error = ArgumentValidationError{} var _ interface { Field() string @@ -1075,69 +1277,38 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = TupleToUserSetValidationError{} +} = ArgumentValidationError{} -// Validate checks the field values on Tuple with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Tuple) Validate() error { +// Validate checks the field values on Call with the rules defined in the proto +// definition for this message. If any rules are violated, an error is returned. +func (m *Call) Validate() error { if m == nil { return nil } - if m.GetEntity() == nil { - return TupleValidationError{ - field: "Entity", - reason: "value is required", - } - } - - if v, ok := interface{}(m.GetEntity()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TupleValidationError{ - field: "Entity", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(m.GetRelation()) > 64 { - return TupleValidationError{ - field: "Relation", - reason: "value length must be at most 64 bytes", - } - } - - if !_Tuple_Relation_Pattern.MatchString(m.GetRelation()) { - return TupleValidationError{ - field: "Relation", - reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])$\"", - } - } + // no validation rules for RuleName - if m.GetSubject() == nil { - return TupleValidationError{ - field: "Subject", - reason: "value is required", - } - } + for idx, item := range m.GetArguments() { + _, _ = idx, item - if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TupleValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CallValidationError{ + field: fmt.Sprintf("Arguments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } } } + } return nil } -// TupleValidationError is the validation error returned by Tuple.Validate if -// the designated constraints aren't met. -type TupleValidationError struct { +// CallValidationError is the validation error returned by Call.Validate if the +// designated constraints aren't met. +type CallValidationError struct { field string reason string cause error @@ -1145,22 +1316,1539 @@ type TupleValidationError struct { } // Field function returns field value. -func (e TupleValidationError) Field() string { return e.field } +func (e CallValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e TupleValidationError) Reason() string { return e.reason } +func (e CallValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e TupleValidationError) Cause() error { return e.cause } +func (e CallValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e TupleValidationError) Key() bool { return e.key } +func (e CallValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CallValidationError) ErrorName() string { return "CallValidationError" } + +// Error satisfies the builtin error interface +func (e CallValidationError) 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 %sCall.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CallValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CallValidationError{} + +// Validate checks the field values on ComputedAttribute with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *ComputedAttribute) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) > 64 { + return ComputedAttributeValidationError{ + field: "Name", + reason: "value length must be at most 64 bytes", + } + } + + if !_ComputedAttribute_Name_Pattern.MatchString(m.GetName()) { + return ComputedAttributeValidationError{ + field: "Name", + reason: "value does not match regex pattern \"^[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", + } + } + + return nil +} + +// ComputedAttributeValidationError is the validation error returned by +// ComputedAttribute.Validate if the designated constraints aren't met. +type ComputedAttributeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ComputedAttributeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ComputedAttributeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ComputedAttributeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ComputedAttributeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ComputedAttributeValidationError) ErrorName() string { + return "ComputedAttributeValidationError" +} + +// Error satisfies the builtin error interface +func (e ComputedAttributeValidationError) 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 %sComputedAttribute.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ComputedAttributeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ComputedAttributeValidationError{} + +var _ComputedAttribute_Name_Pattern = regexp.MustCompile("^[a-z][a-z0-9_]{1,62}[a-z0-9]$") + +// Validate checks the field values on ContextAttribute with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *ContextAttribute) Validate() error { + if m == nil { + return nil + } + + if len(m.GetName()) > 64 { + return ContextAttributeValidationError{ + field: "Name", + reason: "value length must be at most 64 bytes", + } + } + + if !_ContextAttribute_Name_Pattern.MatchString(m.GetName()) { + return ContextAttributeValidationError{ + field: "Name", + reason: "value does not match regex pattern \"^[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", + } + } + + return nil +} + +// ContextAttributeValidationError is the validation error returned by +// ContextAttribute.Validate if the designated constraints aren't met. +type ContextAttributeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ContextAttributeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ContextAttributeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ContextAttributeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ContextAttributeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ContextAttributeValidationError) ErrorName() string { return "ContextAttributeValidationError" } + +// Error satisfies the builtin error interface +func (e ContextAttributeValidationError) 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 %sContextAttribute.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ContextAttributeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ContextAttributeValidationError{} + +var _ContextAttribute_Name_Pattern = regexp.MustCompile("^[a-z][a-z0-9_]{1,62}[a-z0-9]$") + +// Validate checks the field values on ComputedUserSet with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *ComputedUserSet) Validate() error { + if m == nil { + return nil + } + + if len(m.GetRelation()) > 64 { + return ComputedUserSetValidationError{ + field: "Relation", + reason: "value length must be at most 64 bytes", + } + } + + if !_ComputedUserSet_Relation_Pattern.MatchString(m.GetRelation()) { + return ComputedUserSetValidationError{ + field: "Relation", + reason: "value does not match regex pattern \"^[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", + } + } + + return nil +} + +// ComputedUserSetValidationError is the validation error returned by +// ComputedUserSet.Validate if the designated constraints aren't met. +type ComputedUserSetValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ComputedUserSetValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ComputedUserSetValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ComputedUserSetValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ComputedUserSetValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ComputedUserSetValidationError) ErrorName() string { return "ComputedUserSetValidationError" } + +// Error satisfies the builtin error interface +func (e ComputedUserSetValidationError) 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 %sComputedUserSet.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ComputedUserSetValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ComputedUserSetValidationError{} + +var _ComputedUserSet_Relation_Pattern = regexp.MustCompile("^[a-z][a-z0-9_]{1,62}[a-z0-9]$") + +// Validate checks the field values on TupleToUserSet with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *TupleToUserSet) Validate() error { + if m == nil { + return nil + } + + if v, ok := interface{}(m.GetTupleSet()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TupleToUserSetValidationError{ + field: "TupleSet", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if v, ok := interface{}(m.GetComputed()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TupleToUserSetValidationError{ + field: "Computed", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// TupleToUserSetValidationError is the validation error returned by +// TupleToUserSet.Validate if the designated constraints aren't met. +type TupleToUserSetValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TupleToUserSetValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TupleToUserSetValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TupleToUserSetValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TupleToUserSetValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TupleToUserSetValidationError) ErrorName() string { return "TupleToUserSetValidationError" } + +// Error satisfies the builtin error interface +func (e TupleToUserSetValidationError) 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 %sTupleToUserSet.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TupleToUserSetValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TupleToUserSetValidationError{} + +// Validate checks the field values on TupleSet with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *TupleSet) Validate() error { + if m == nil { + return nil + } + + if len(m.GetRelation()) > 64 { + return TupleSetValidationError{ + field: "Relation", + reason: "value length must be at most 64 bytes", + } + } + + if !_TupleSet_Relation_Pattern.MatchString(m.GetRelation()) { + return TupleSetValidationError{ + field: "Relation", + reason: "value does not match regex pattern \"^[a-z][a-z0-9_]{1,62}[a-z0-9]$\"", + } + } + + return nil +} + +// TupleSetValidationError is the validation error returned by +// TupleSet.Validate if the designated constraints aren't met. +type TupleSetValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TupleSetValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TupleSetValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TupleSetValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TupleSetValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TupleSetValidationError) ErrorName() string { return "TupleSetValidationError" } + +// Error satisfies the builtin error interface +func (e TupleSetValidationError) 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 %sTupleSet.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TupleSetValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TupleSetValidationError{} + +var _TupleSet_Relation_Pattern = regexp.MustCompile("^[a-z][a-z0-9_]{1,62}[a-z0-9]$") + +// Validate checks the field values on Tuple with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Tuple) Validate() error { + if m == nil { + return nil + } + + if m.GetEntity() == nil { + return TupleValidationError{ + field: "Entity", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetEntity()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TupleValidationError{ + field: "Entity", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(m.GetRelation()) > 64 { + return TupleValidationError{ + field: "Relation", + reason: "value length must be at most 64 bytes", + } + } + + if !_Tuple_Relation_Pattern.MatchString(m.GetRelation()) { + return TupleValidationError{ + field: "Relation", + reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])$\"", + } + } + + if m.GetSubject() == nil { + return TupleValidationError{ + field: "Subject", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TupleValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// TupleValidationError is the validation error returned by Tuple.Validate if +// the designated constraints aren't met. +type TupleValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TupleValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TupleValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TupleValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TupleValidationError) Key() bool { return e.key } // ErrorName returns error name. func (e TupleValidationError) ErrorName() string { return "TupleValidationError" } // Error satisfies the builtin error interface -func (e TupleValidationError) Error() string { +func (e TupleValidationError) 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 %sTuple.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TupleValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TupleValidationError{} + +var _Tuple_Relation_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") + +// Validate checks the field values on Attribute with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Attribute) Validate() error { + if m == nil { + return nil + } + + if m.GetEntity() == nil { + return AttributeValidationError{ + field: "Entity", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetEntity()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeValidationError{ + field: "Entity", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Attribute + + if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// AttributeValidationError is the validation error returned by +// Attribute.Validate if the designated constraints aren't met. +type AttributeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AttributeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AttributeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AttributeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AttributeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AttributeValidationError) ErrorName() string { return "AttributeValidationError" } + +// Error satisfies the builtin error interface +func (e AttributeValidationError) 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 %sAttribute.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AttributeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AttributeValidationError{} + +// Validate checks the field values on Tuples with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Tuples) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetTuples() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TuplesValidationError{ + field: fmt.Sprintf("Tuples[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// TuplesValidationError is the validation error returned by Tuples.Validate if +// the designated constraints aren't met. +type TuplesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TuplesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TuplesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TuplesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TuplesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TuplesValidationError) ErrorName() string { return "TuplesValidationError" } + +// Error satisfies the builtin error interface +func (e TuplesValidationError) 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 %sTuples.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TuplesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TuplesValidationError{} + +// Validate checks the field values on Attributes with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Attributes) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetAttributes() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributesValidationError{ + field: fmt.Sprintf("Attributes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// AttributesValidationError is the validation error returned by +// Attributes.Validate if the designated constraints aren't met. +type AttributesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AttributesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AttributesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AttributesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AttributesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AttributesValidationError) ErrorName() string { return "AttributesValidationError" } + +// Error satisfies the builtin error interface +func (e AttributesValidationError) 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 %sAttributes.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AttributesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AttributesValidationError{} + +// Validate checks the field values on Entity with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Entity) Validate() error { + if m == nil { + return nil + } + + if len(m.GetType()) > 64 { + return EntityValidationError{ + field: "Type", + reason: "value length must be at most 64 bytes", + } + } + + if !_Entity_Type_Pattern.MatchString(m.GetType()) { + return EntityValidationError{ + field: "Type", + reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])$\"", + } + } + + if len(m.GetId()) > 128 { + return EntityValidationError{ + field: "Id", + reason: "value length must be at most 128 bytes", + } + } + + if !_Entity_Id_Pattern.MatchString(m.GetId()) { + return EntityValidationError{ + field: "Id", + reason: "value does not match regex pattern \"^(([a-zA-Z0-9_][a-zA-Z0-9_|-]{0,127})|\\\\*)$\"", + } + } + + return nil +} + +// EntityValidationError is the validation error returned by Entity.Validate if +// the designated constraints aren't met. +type EntityValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EntityValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EntityValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EntityValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EntityValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EntityValidationError) ErrorName() string { return "EntityValidationError" } + +// Error satisfies the builtin error interface +func (e EntityValidationError) 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 %sEntity.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EntityValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EntityValidationError{} + +var _Entity_Type_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") + +var _Entity_Id_Pattern = regexp.MustCompile("^(([a-zA-Z0-9_][a-zA-Z0-9_|-]{0,127})|\\*)$") + +// Validate checks the field values on EntityAndRelation with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *EntityAndRelation) Validate() error { + if m == nil { + return nil + } + + if m.GetEntity() == nil { + return EntityAndRelationValidationError{ + field: "Entity", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetEntity()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return EntityAndRelationValidationError{ + field: "Entity", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(m.GetRelation()) > 64 { + return EntityAndRelationValidationError{ + field: "Relation", + reason: "value length must be at most 64 bytes", + } + } + + if !_EntityAndRelation_Relation_Pattern.MatchString(m.GetRelation()) { + return EntityAndRelationValidationError{ + field: "Relation", + reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,64}[a-z0-9])$\"", + } + } + + return nil +} + +// EntityAndRelationValidationError is the validation error returned by +// EntityAndRelation.Validate if the designated constraints aren't met. +type EntityAndRelationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EntityAndRelationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EntityAndRelationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EntityAndRelationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EntityAndRelationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EntityAndRelationValidationError) ErrorName() string { + return "EntityAndRelationValidationError" +} + +// Error satisfies the builtin error interface +func (e EntityAndRelationValidationError) 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 %sEntityAndRelation.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EntityAndRelationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EntityAndRelationValidationError{} + +var _EntityAndRelation_Relation_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,64}[a-z0-9])$") + +// Validate checks the field values on Subject with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Subject) Validate() error { + if m == nil { + return nil + } + + if len(m.GetType()) > 64 { + return SubjectValidationError{ + field: "Type", + reason: "value length must be at most 64 bytes", + } + } + + if !_Subject_Type_Pattern.MatchString(m.GetType()) { + return SubjectValidationError{ + field: "Type", + reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])$\"", + } + } + + if len(m.GetId()) > 128 { + return SubjectValidationError{ + field: "Id", + reason: "value length must be at most 128 bytes", + } + } + + if !_Subject_Id_Pattern.MatchString(m.GetId()) { + return SubjectValidationError{ + field: "Id", + reason: "value does not match regex pattern \"^(([a-zA-Z0-9_][a-zA-Z0-9_|-]{0,127})|\\\\*)$\"", + } + } + + if m.GetRelation() != "" { + + if len(m.GetRelation()) > 64 { + return SubjectValidationError{ + field: "Relation", + reason: "value length must be at most 64 bytes", + } + } + + if !_Subject_Relation_Pattern.MatchString(m.GetRelation()) { + return SubjectValidationError{ + field: "Relation", + reason: "value does not match regex pattern \"^([.&a-z][.&a-z0-9_]{1,62}[.&a-z0-9])$\"", + } + } + + } + + return nil +} + +// SubjectValidationError is the validation error returned by Subject.Validate +// if the designated constraints aren't met. +type SubjectValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SubjectValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SubjectValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SubjectValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SubjectValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SubjectValidationError) ErrorName() string { return "SubjectValidationError" } + +// Error satisfies the builtin error interface +func (e SubjectValidationError) 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 %sSubject.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SubjectValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SubjectValidationError{} + +var _Subject_Type_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") + +var _Subject_Id_Pattern = regexp.MustCompile("^(([a-zA-Z0-9_][a-zA-Z0-9_|-]{0,127})|\\*)$") + +var _Subject_Relation_Pattern = regexp.MustCompile("^([.&a-z][.&a-z0-9_]{1,62}[.&a-z0-9])$") + +// Validate checks the field values on AttributeFilter with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *AttributeFilter) Validate() error { + if m == nil { + return nil + } + + if m.GetEntity() == nil { + return AttributeFilterValidationError{ + field: "Entity", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetEntity()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeFilterValidationError{ + field: "Entity", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// AttributeFilterValidationError is the validation error returned by +// AttributeFilter.Validate if the designated constraints aren't met. +type AttributeFilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AttributeFilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AttributeFilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AttributeFilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AttributeFilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AttributeFilterValidationError) ErrorName() string { return "AttributeFilterValidationError" } + +// Error satisfies the builtin error interface +func (e AttributeFilterValidationError) 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 %sAttributeFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AttributeFilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AttributeFilterValidationError{} + +// Validate checks the field values on TupleFilter with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *TupleFilter) Validate() error { + if m == nil { + return nil + } + + if m.GetEntity() == nil { + return TupleFilterValidationError{ + field: "Entity", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetEntity()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TupleFilterValidationError{ + field: "Entity", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetRelation() != "" { + + if len(m.GetRelation()) > 64 { + return TupleFilterValidationError{ + field: "Relation", + reason: "value length must be at most 64 bytes", + } + } + + if !_TupleFilter_Relation_Pattern.MatchString(m.GetRelation()) { + return TupleFilterValidationError{ + field: "Relation", + reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])$\"", + } + } + + } + + if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TupleFilterValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// TupleFilterValidationError is the validation error returned by +// TupleFilter.Validate if the designated constraints aren't met. +type TupleFilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TupleFilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TupleFilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TupleFilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TupleFilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TupleFilterValidationError) ErrorName() string { return "TupleFilterValidationError" } + +// Error satisfies the builtin error interface +func (e TupleFilterValidationError) 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 %sTupleFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TupleFilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TupleFilterValidationError{} + +var _TupleFilter_Relation_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") + +// Validate checks the field values on EntityFilter with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *EntityFilter) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Type + + return nil +} + +// EntityFilterValidationError is the validation error returned by +// EntityFilter.Validate if the designated constraints aren't met. +type EntityFilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EntityFilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EntityFilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EntityFilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EntityFilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EntityFilterValidationError) ErrorName() string { return "EntityFilterValidationError" } + +// Error satisfies the builtin error interface +func (e EntityFilterValidationError) 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 %sEntityFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EntityFilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EntityFilterValidationError{} + +// Validate checks the field values on SubjectFilter with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *SubjectFilter) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Type + + if m.GetRelation() != "" { + + if len(m.GetRelation()) > 64 { + return SubjectFilterValidationError{ + field: "Relation", + reason: "value length must be at most 64 bytes", + } + } + + if !_SubjectFilter_Relation_Pattern.MatchString(m.GetRelation()) { + return SubjectFilterValidationError{ + field: "Relation", + reason: "value does not match regex pattern \"^([.&a-z][.&a-z0-9_]{1,62}[.&a-z0-9])$\"", + } + } + + } + + return nil +} + +// SubjectFilterValidationError is the validation error returned by +// SubjectFilter.Validate if the designated constraints aren't met. +type SubjectFilterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SubjectFilterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SubjectFilterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SubjectFilterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SubjectFilterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SubjectFilterValidationError) ErrorName() string { return "SubjectFilterValidationError" } + +// Error satisfies the builtin error interface +func (e SubjectFilterValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sSubjectFilter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SubjectFilterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SubjectFilterValidationError{} + +var _SubjectFilter_Relation_Pattern = regexp.MustCompile("^([.&a-z][.&a-z0-9_]{1,62}[.&a-z0-9])$") + +// Validate checks the field values on ExpandTreeNode with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *ExpandTreeNode) Validate() error { + if m == nil { + return nil + } + + // no validation rules for Operation + + for idx, item := range m.GetChildren() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExpandTreeNodeValidationError{ + field: fmt.Sprintf("Children[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// ExpandTreeNodeValidationError is the validation error returned by +// ExpandTreeNode.Validate if the designated constraints aren't met. +type ExpandTreeNodeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExpandTreeNodeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExpandTreeNodeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExpandTreeNodeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExpandTreeNodeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExpandTreeNodeValidationError) ErrorName() string { return "ExpandTreeNodeValidationError" } + +// Error satisfies the builtin error interface +func (e ExpandTreeNodeValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1172,14 +2860,14 @@ func (e TupleValidationError) Error() string { } return fmt.Sprintf( - "invalid %sTuple.%s: %s%s", + "invalid %sExpandTreeNode.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = TupleValidationError{} +var _ error = ExpandTreeNodeValidationError{} var _ interface { Field() string @@ -1187,24 +2875,253 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = TupleValidationError{} +} = ExpandTreeNodeValidationError{} -var _Tuple_Relation_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") +// Validate checks the field values on Expand with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Expand) Validate() error { + if m == nil { + return nil + } -// Validate checks the field values on Tuples with the rules defined in the + if v, ok := interface{}(m.GetEntity()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExpandValidationError{ + field: "Entity", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Permission + + for idx, item := range m.GetArguments() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExpandValidationError{ + field: fmt.Sprintf("Arguments[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + switch m.Node.(type) { + + case *Expand_Expand: + + if v, ok := interface{}(m.GetExpand()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExpandValidationError{ + field: "Expand", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *Expand_Leaf: + + if v, ok := interface{}(m.GetLeaf()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExpandValidationError{ + field: "Leaf", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + return nil +} + +// ExpandValidationError is the validation error returned by Expand.Validate if +// the designated constraints aren't met. +type ExpandValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExpandValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExpandValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExpandValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExpandValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExpandValidationError) ErrorName() string { return "ExpandValidationError" } + +// Error satisfies the builtin error interface +func (e ExpandValidationError) 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 %sExpand.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExpandValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExpandValidationError{} + +// Validate checks the field values on ExpandLeaf with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. -func (m *Tuples) Validate() error { +func (m *ExpandLeaf) Validate() error { + if m == nil { + return nil + } + + switch m.Type.(type) { + + case *ExpandLeaf_Subjects: + + if v, ok := interface{}(m.GetSubjects()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExpandLeafValidationError{ + field: "Subjects", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ExpandLeaf_Values: + + if v, ok := interface{}(m.GetValues()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExpandLeafValidationError{ + field: "Values", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *ExpandLeaf_Value: + + if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExpandLeafValidationError{ + field: "Value", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + return ExpandLeafValidationError{ + field: "Type", + reason: "value is required", + } + + } + + return nil +} + +// ExpandLeafValidationError is the validation error returned by +// ExpandLeaf.Validate if the designated constraints aren't met. +type ExpandLeafValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExpandLeafValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExpandLeafValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExpandLeafValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExpandLeafValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExpandLeafValidationError) ErrorName() string { return "ExpandLeafValidationError" } + +// Error satisfies the builtin error interface +func (e ExpandLeafValidationError) 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 %sExpandLeaf.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExpandLeafValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExpandLeafValidationError{} + +// Validate checks the field values on Values with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Values) Validate() error { if m == nil { return nil } - for idx, item := range m.GetTuples() { - _, _ = idx, item + for key, val := range m.GetValues() { + _ = val - if v, ok := interface{}(item).(interface{ Validate() error }); ok { + // no validation rules for Values[key] + + if v, ok := interface{}(val).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return TuplesValidationError{ - field: fmt.Sprintf("Tuples[%v]", idx), + return ValuesValidationError{ + field: fmt.Sprintf("Values[%v]", key), reason: "embedded message failed validation", cause: err, } @@ -1216,9 +3133,9 @@ func (m *Tuples) Validate() error { return nil } -// TuplesValidationError is the validation error returned by Tuples.Validate if +// ValuesValidationError is the validation error returned by Values.Validate if // the designated constraints aren't met. -type TuplesValidationError struct { +type ValuesValidationError struct { field string reason string cause error @@ -1226,22 +3143,22 @@ type TuplesValidationError struct { } // Field function returns field value. -func (e TuplesValidationError) Field() string { return e.field } +func (e ValuesValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e TuplesValidationError) Reason() string { return e.reason } +func (e ValuesValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e TuplesValidationError) Cause() error { return e.cause } +func (e ValuesValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e TuplesValidationError) Key() bool { return e.key } +func (e ValuesValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e TuplesValidationError) ErrorName() string { return "TuplesValidationError" } +func (e ValuesValidationError) ErrorName() string { return "ValuesValidationError" } // Error satisfies the builtin error interface -func (e TuplesValidationError) Error() string { +func (e ValuesValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1253,14 +3170,14 @@ func (e TuplesValidationError) Error() string { } return fmt.Sprintf( - "invalid %sTuples.%s: %s%s", + "invalid %sValues.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = TuplesValidationError{} +var _ error = ValuesValidationError{} var _ interface { Field() string @@ -1268,49 +3185,36 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = TuplesValidationError{} +} = ValuesValidationError{} -// Validate checks the field values on Entity with the rules defined in the +// Validate checks the field values on Subjects with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. -func (m *Entity) Validate() error { +func (m *Subjects) Validate() error { if m == nil { return nil } - if len(m.GetType()) > 64 { - return EntityValidationError{ - field: "Type", - reason: "value length must be at most 64 bytes", - } - } - - if !_Entity_Type_Pattern.MatchString(m.GetType()) { - return EntityValidationError{ - field: "Type", - reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])$\"", - } - } + for idx, item := range m.GetSubjects() { + _, _ = idx, item - if len(m.GetId()) > 128 { - return EntityValidationError{ - field: "Id", - reason: "value length must be at most 128 bytes", + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SubjectsValidationError{ + field: fmt.Sprintf("Subjects[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } } - } - if !_Entity_Id_Pattern.MatchString(m.GetId()) { - return EntityValidationError{ - field: "Id", - reason: "value does not match regex pattern \"^(([a-zA-Z0-9_][a-zA-Z0-9_|-]{0,127})|\\\\*)$\"", - } } return nil } -// EntityValidationError is the validation error returned by Entity.Validate if -// the designated constraints aren't met. -type EntityValidationError struct { +// SubjectsValidationError is the validation error returned by +// Subjects.Validate if the designated constraints aren't met. +type SubjectsValidationError struct { field string reason string cause error @@ -1318,22 +3222,22 @@ type EntityValidationError struct { } // Field function returns field value. -func (e EntityValidationError) Field() string { return e.field } +func (e SubjectsValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e EntityValidationError) Reason() string { return e.reason } +func (e SubjectsValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e EntityValidationError) Cause() error { return e.cause } +func (e SubjectsValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e EntityValidationError) Key() bool { return e.key } +func (e SubjectsValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e EntityValidationError) ErrorName() string { return "EntityValidationError" } +func (e SubjectsValidationError) ErrorName() string { return "SubjectsValidationError" } // Error satisfies the builtin error interface -func (e EntityValidationError) Error() string { +func (e SubjectsValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1345,14 +3249,14 @@ func (e EntityValidationError) Error() string { } return fmt.Sprintf( - "invalid %sEntity.%s: %s%s", + "invalid %sSubjects.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = EntityValidationError{} +var _ error = SubjectsValidationError{} var _ interface { Field() string @@ -1360,57 +3264,35 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = EntityValidationError{} - -var _Entity_Type_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") - -var _Entity_Id_Pattern = regexp.MustCompile("^(([a-zA-Z0-9_][a-zA-Z0-9_|-]{0,127})|\\*)$") +} = SubjectsValidationError{} -// Validate checks the field values on EntityAndRelation with the rules defined -// in the proto definition for this message. If any rules are violated, an -// error is returned. -func (m *EntityAndRelation) Validate() error { +// Validate checks the field values on Tenant with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Tenant) Validate() error { if m == nil { return nil } - if m.GetEntity() == nil { - return EntityAndRelationValidationError{ - field: "Entity", - reason: "value is required", - } - } + // no validation rules for Id - if v, ok := interface{}(m.GetEntity()).(interface{ Validate() error }); ok { + // no validation rules for Name + + if v, ok := interface{}(m.GetCreatedAt()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return EntityAndRelationValidationError{ - field: "Entity", + return TenantValidationError{ + field: "CreatedAt", reason: "embedded message failed validation", cause: err, } } } - if len(m.GetRelation()) > 64 { - return EntityAndRelationValidationError{ - field: "Relation", - reason: "value length must be at most 64 bytes", - } - } - - if !_EntityAndRelation_Relation_Pattern.MatchString(m.GetRelation()) { - return EntityAndRelationValidationError{ - field: "Relation", - reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,64}[a-z0-9])$\"", - } - } - return nil } -// EntityAndRelationValidationError is the validation error returned by -// EntityAndRelation.Validate if the designated constraints aren't met. -type EntityAndRelationValidationError struct { +// TenantValidationError is the validation error returned by Tenant.Validate if +// the designated constraints aren't met. +type TenantValidationError struct { field string reason string cause error @@ -1418,24 +3300,22 @@ type EntityAndRelationValidationError struct { } // Field function returns field value. -func (e EntityAndRelationValidationError) Field() string { return e.field } +func (e TenantValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e EntityAndRelationValidationError) Reason() string { return e.reason } +func (e TenantValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e EntityAndRelationValidationError) Cause() error { return e.cause } +func (e TenantValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e EntityAndRelationValidationError) Key() bool { return e.key } +func (e TenantValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e EntityAndRelationValidationError) ErrorName() string { - return "EntityAndRelationValidationError" -} +func (e TenantValidationError) ErrorName() string { return "TenantValidationError" } // Error satisfies the builtin error interface -func (e EntityAndRelationValidationError) Error() string { +func (e TenantValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1447,14 +3327,14 @@ func (e EntityAndRelationValidationError) Error() string { } return fmt.Sprintf( - "invalid %sEntityAndRelation.%s: %s%s", + "invalid %sTenant.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = EntityAndRelationValidationError{} +var _ error = TenantValidationError{} var _ interface { Field() string @@ -1462,58 +3342,28 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = EntityAndRelationValidationError{} - -var _EntityAndRelation_Relation_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,64}[a-z0-9])$") +} = TenantValidationError{} -// Validate checks the field values on Subject with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Subject) Validate() error { +// Validate checks the field values on DataChanges with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *DataChanges) Validate() error { if m == nil { return nil } - if len(m.GetType()) > 64 { - return SubjectValidationError{ - field: "Type", - reason: "value length must be at most 64 bytes", - } - } - - if !_Subject_Type_Pattern.MatchString(m.GetType()) { - return SubjectValidationError{ - field: "Type", - reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])$\"", - } - } - - if len(m.GetId()) > 128 { - return SubjectValidationError{ - field: "Id", - reason: "value length must be at most 128 bytes", - } - } - - if !_Subject_Id_Pattern.MatchString(m.GetId()) { - return SubjectValidationError{ - field: "Id", - reason: "value does not match regex pattern \"^(([a-zA-Z0-9_][a-zA-Z0-9_|-]{0,127})|\\\\*)$\"", - } - } - - if m.GetRelation() != "" { + // no validation rules for SnapToken - if len(m.GetRelation()) > 64 { - return SubjectValidationError{ - field: "Relation", - reason: "value length must be at most 64 bytes", - } - } + for idx, item := range m.GetDataChanges() { + _, _ = idx, item - if !_Subject_Relation_Pattern.MatchString(m.GetRelation()) { - return SubjectValidationError{ - field: "Relation", - reason: "value does not match regex pattern \"^([.&a-z][.&a-z0-9_]{1,62}[.&a-z0-9])$\"", + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DataChangesValidationError{ + field: fmt.Sprintf("DataChanges[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } } } @@ -1522,9 +3372,9 @@ func (m *Subject) Validate() error { return nil } -// SubjectValidationError is the validation error returned by Subject.Validate -// if the designated constraints aren't met. -type SubjectValidationError struct { +// DataChangesValidationError is the validation error returned by +// DataChanges.Validate if the designated constraints aren't met. +type DataChangesValidationError struct { field string reason string cause error @@ -1532,22 +3382,22 @@ type SubjectValidationError struct { } // Field function returns field value. -func (e SubjectValidationError) Field() string { return e.field } +func (e DataChangesValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e SubjectValidationError) Reason() string { return e.reason } +func (e DataChangesValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e SubjectValidationError) Cause() error { return e.cause } +func (e DataChangesValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e SubjectValidationError) Key() bool { return e.key } +func (e DataChangesValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e SubjectValidationError) ErrorName() string { return "SubjectValidationError" } +func (e DataChangesValidationError) ErrorName() string { return "DataChangesValidationError" } // Error satisfies the builtin error interface -func (e SubjectValidationError) Error() string { +func (e DataChangesValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1559,14 +3409,14 @@ func (e SubjectValidationError) Error() string { } return fmt.Sprintf( - "invalid %sSubject.%s: %s%s", + "invalid %sDataChanges.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = SubjectValidationError{} +var _ error = DataChangesValidationError{} var _ interface { Field() string @@ -1574,73 +3424,57 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = SubjectValidationError{} - -var _Subject_Type_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") - -var _Subject_Id_Pattern = regexp.MustCompile("^(([a-zA-Z0-9_][a-zA-Z0-9_|-]{0,127})|\\*)$") - -var _Subject_Relation_Pattern = regexp.MustCompile("^([.&a-z][.&a-z0-9_]{1,62}[.&a-z0-9])$") +} = DataChangesValidationError{} -// Validate checks the field values on TupleFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *TupleFilter) Validate() error { +// Validate checks the field values on DataChange with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *DataChange) Validate() error { if m == nil { return nil } - if m.GetEntity() == nil { - return TupleFilterValidationError{ - field: "Entity", - reason: "value is required", - } - } + // no validation rules for Operation - if v, ok := interface{}(m.GetEntity()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TupleFilterValidationError{ - field: "Entity", - reason: "embedded message failed validation", - cause: err, - } - } - } + switch m.Type.(type) { - if m.GetRelation() != "" { + case *DataChange_Tuple: - if len(m.GetRelation()) > 64 { - return TupleFilterValidationError{ - field: "Relation", - reason: "value length must be at most 64 bytes", + if v, ok := interface{}(m.GetTuple()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DataChangeValidationError{ + field: "Tuple", + reason: "embedded message failed validation", + cause: err, + } } } - if !_TupleFilter_Relation_Pattern.MatchString(m.GetRelation()) { - return TupleFilterValidationError{ - field: "Relation", - reason: "value does not match regex pattern \"^([a-z][a-z0-9_]{1,62}[a-z0-9])$\"", + case *DataChange_Attribute: + + if v, ok := interface{}(m.GetAttribute()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DataChangeValidationError{ + field: "Attribute", + reason: "embedded message failed validation", + cause: err, + } } } - } - - if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TupleFilterValidationError{ - field: "Subject", - reason: "embedded message failed validation", - cause: err, - } + default: + return DataChangeValidationError{ + field: "Type", + reason: "value is required", } + } return nil } -// TupleFilterValidationError is the validation error returned by -// TupleFilter.Validate if the designated constraints aren't met. -type TupleFilterValidationError struct { +// DataChangeValidationError is the validation error returned by +// DataChange.Validate if the designated constraints aren't met. +type DataChangeValidationError struct { field string reason string cause error @@ -1648,22 +3482,22 @@ type TupleFilterValidationError struct { } // Field function returns field value. -func (e TupleFilterValidationError) Field() string { return e.field } +func (e DataChangeValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e TupleFilterValidationError) Reason() string { return e.reason } +func (e DataChangeValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e TupleFilterValidationError) Cause() error { return e.cause } +func (e DataChangeValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e TupleFilterValidationError) Key() bool { return e.key } +func (e DataChangeValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e TupleFilterValidationError) ErrorName() string { return "TupleFilterValidationError" } +func (e DataChangeValidationError) ErrorName() string { return "DataChangeValidationError" } // Error satisfies the builtin error interface -func (e TupleFilterValidationError) Error() string { +func (e DataChangeValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1675,14 +3509,14 @@ func (e TupleFilterValidationError) Error() string { } return fmt.Sprintf( - "invalid %sTupleFilter.%s: %s%s", + "invalid %sDataChange.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = TupleFilterValidationError{} +var _ error = DataChangeValidationError{} var _ interface { Field() string @@ -1690,26 +3524,23 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = TupleFilterValidationError{} - -var _TupleFilter_Relation_Pattern = regexp.MustCompile("^([a-z][a-z0-9_]{1,62}[a-z0-9])$") +} = DataChangeValidationError{} -// Validate checks the field values on EntityFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *EntityFilter) Validate() error { +// Validate checks the field values on String with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *String) Validate() error { if m == nil { return nil } - // no validation rules for Type + // no validation rules for Value return nil } -// EntityFilterValidationError is the validation error returned by -// EntityFilter.Validate if the designated constraints aren't met. -type EntityFilterValidationError struct { +// StringValidationError is the validation error returned by String.Validate if +// the designated constraints aren't met. +type StringValidationError struct { field string reason string cause error @@ -1717,22 +3548,22 @@ type EntityFilterValidationError struct { } // Field function returns field value. -func (e EntityFilterValidationError) Field() string { return e.field } +func (e StringValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e EntityFilterValidationError) Reason() string { return e.reason } +func (e StringValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e EntityFilterValidationError) Cause() error { return e.cause } +func (e StringValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e EntityFilterValidationError) Key() bool { return e.key } +func (e StringValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e EntityFilterValidationError) ErrorName() string { return "EntityFilterValidationError" } +func (e StringValidationError) ErrorName() string { return "StringValidationError" } // Error satisfies the builtin error interface -func (e EntityFilterValidationError) Error() string { +func (e StringValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1744,14 +3575,14 @@ func (e EntityFilterValidationError) Error() string { } return fmt.Sprintf( - "invalid %sEntityFilter.%s: %s%s", + "invalid %sString.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = EntityFilterValidationError{} +var _ error = StringValidationError{} var _ interface { Field() string @@ -1759,42 +3590,23 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = EntityFilterValidationError{} +} = StringValidationError{} -// Validate checks the field values on SubjectFilter with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *SubjectFilter) Validate() error { +// Validate checks the field values on Integer with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Integer) Validate() error { if m == nil { return nil } - // no validation rules for Type - - if m.GetRelation() != "" { - - if len(m.GetRelation()) > 64 { - return SubjectFilterValidationError{ - field: "Relation", - reason: "value length must be at most 64 bytes", - } - } - - if !_SubjectFilter_Relation_Pattern.MatchString(m.GetRelation()) { - return SubjectFilterValidationError{ - field: "Relation", - reason: "value does not match regex pattern \"^([.&a-z][.&a-z0-9_]{1,62}[.&a-z0-9])$\"", - } - } - - } + // no validation rules for Value return nil } -// SubjectFilterValidationError is the validation error returned by -// SubjectFilter.Validate if the designated constraints aren't met. -type SubjectFilterValidationError struct { +// IntegerValidationError is the validation error returned by Integer.Validate +// if the designated constraints aren't met. +type IntegerValidationError struct { field string reason string cause error @@ -1802,22 +3614,22 @@ type SubjectFilterValidationError struct { } // Field function returns field value. -func (e SubjectFilterValidationError) Field() string { return e.field } +func (e IntegerValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e SubjectFilterValidationError) Reason() string { return e.reason } +func (e IntegerValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e SubjectFilterValidationError) Cause() error { return e.cause } +func (e IntegerValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e SubjectFilterValidationError) Key() bool { return e.key } +func (e IntegerValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e SubjectFilterValidationError) ErrorName() string { return "SubjectFilterValidationError" } +func (e IntegerValidationError) ErrorName() string { return "IntegerValidationError" } // Error satisfies the builtin error interface -func (e SubjectFilterValidationError) Error() string { +func (e IntegerValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1829,14 +3641,14 @@ func (e SubjectFilterValidationError) Error() string { } return fmt.Sprintf( - "invalid %sSubjectFilter.%s: %s%s", + "invalid %sInteger.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = SubjectFilterValidationError{} +var _ error = IntegerValidationError{} var _ interface { Field() string @@ -1844,41 +3656,23 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = SubjectFilterValidationError{} +} = IntegerValidationError{} -var _SubjectFilter_Relation_Pattern = regexp.MustCompile("^([.&a-z][.&a-z0-9_]{1,62}[.&a-z0-9])$") - -// Validate checks the field values on ExpandTreeNode with the rules defined in -// the proto definition for this message. If any rules are violated, an error -// is returned. -func (m *ExpandTreeNode) Validate() error { +// Validate checks the field values on Double with the rules defined in the +// proto definition for this message. If any rules are violated, an error is returned. +func (m *Double) Validate() error { if m == nil { return nil } - // no validation rules for Operation - - for idx, item := range m.GetChildren() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExpandTreeNodeValidationError{ - field: fmt.Sprintf("Children[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } + // no validation rules for Value return nil } -// ExpandTreeNodeValidationError is the validation error returned by -// ExpandTreeNode.Validate if the designated constraints aren't met. -type ExpandTreeNodeValidationError struct { +// DoubleValidationError is the validation error returned by Double.Validate if +// the designated constraints aren't met. +type DoubleValidationError struct { field string reason string cause error @@ -1886,22 +3680,22 @@ type ExpandTreeNodeValidationError struct { } // Field function returns field value. -func (e ExpandTreeNodeValidationError) Field() string { return e.field } +func (e DoubleValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e ExpandTreeNodeValidationError) Reason() string { return e.reason } +func (e DoubleValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e ExpandTreeNodeValidationError) Cause() error { return e.cause } +func (e DoubleValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e ExpandTreeNodeValidationError) Key() bool { return e.key } +func (e DoubleValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e ExpandTreeNodeValidationError) ErrorName() string { return "ExpandTreeNodeValidationError" } +func (e DoubleValidationError) ErrorName() string { return "DoubleValidationError" } // Error satisfies the builtin error interface -func (e ExpandTreeNodeValidationError) Error() string { +func (e DoubleValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1913,14 +3707,14 @@ func (e ExpandTreeNodeValidationError) Error() string { } return fmt.Sprintf( - "invalid %sExpandTreeNode.%s: %s%s", + "invalid %sDouble.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = ExpandTreeNodeValidationError{} +var _ error = DoubleValidationError{} var _ interface { Field() string @@ -1928,59 +3722,23 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = ExpandTreeNodeValidationError{} +} = DoubleValidationError{} -// Validate checks the field values on Expand with the rules defined in the +// Validate checks the field values on Boolean with the rules defined in the // proto definition for this message. If any rules are violated, an error is returned. -func (m *Expand) Validate() error { +func (m *Boolean) Validate() error { if m == nil { return nil } - if v, ok := interface{}(m.GetTarget()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExpandValidationError{ - field: "Target", - reason: "embedded message failed validation", - cause: err, - } - } - } - - switch m.Node.(type) { - - case *Expand_Expand: - - if v, ok := interface{}(m.GetExpand()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExpandValidationError{ - field: "Expand", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *Expand_Leaf: - - if v, ok := interface{}(m.GetLeaf()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ExpandValidationError{ - field: "Leaf", - reason: "embedded message failed validation", - cause: err, - } - } - } - - } + // no validation rules for Value return nil } -// ExpandValidationError is the validation error returned by Expand.Validate if -// the designated constraints aren't met. -type ExpandValidationError struct { +// BooleanValidationError is the validation error returned by Boolean.Validate +// if the designated constraints aren't met. +type BooleanValidationError struct { field string reason string cause error @@ -1988,22 +3746,22 @@ type ExpandValidationError struct { } // Field function returns field value. -func (e ExpandValidationError) Field() string { return e.field } +func (e BooleanValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e ExpandValidationError) Reason() string { return e.reason } +func (e BooleanValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e ExpandValidationError) Cause() error { return e.cause } +func (e BooleanValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e ExpandValidationError) Key() bool { return e.key } +func (e BooleanValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e ExpandValidationError) ErrorName() string { return "ExpandValidationError" } +func (e BooleanValidationError) ErrorName() string { return "BooleanValidationError" } // Error satisfies the builtin error interface -func (e ExpandValidationError) Error() string { +func (e BooleanValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2015,14 +3773,14 @@ func (e ExpandValidationError) Error() string { } return fmt.Sprintf( - "invalid %sExpand.%s: %s%s", + "invalid %sBoolean.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = ExpandValidationError{} +var _ error = BooleanValidationError{} var _ interface { Field() string @@ -2030,36 +3788,22 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = ExpandValidationError{} +} = BooleanValidationError{} -// Validate checks the field values on Subjects with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Subjects) Validate() error { +// Validate checks the field values on StringArray with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *StringArray) Validate() error { if m == nil { return nil } - for idx, item := range m.GetSubjects() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SubjectsValidationError{ - field: fmt.Sprintf("Subjects[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - return nil } -// SubjectsValidationError is the validation error returned by -// Subjects.Validate if the designated constraints aren't met. -type SubjectsValidationError struct { +// StringArrayValidationError is the validation error returned by +// StringArray.Validate if the designated constraints aren't met. +type StringArrayValidationError struct { field string reason string cause error @@ -2067,22 +3811,22 @@ type SubjectsValidationError struct { } // Field function returns field value. -func (e SubjectsValidationError) Field() string { return e.field } +func (e StringArrayValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e SubjectsValidationError) Reason() string { return e.reason } +func (e StringArrayValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e SubjectsValidationError) Cause() error { return e.cause } +func (e StringArrayValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e SubjectsValidationError) Key() bool { return e.key } +func (e StringArrayValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e SubjectsValidationError) ErrorName() string { return "SubjectsValidationError" } +func (e StringArrayValidationError) ErrorName() string { return "StringArrayValidationError" } // Error satisfies the builtin error interface -func (e SubjectsValidationError) Error() string { +func (e StringArrayValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2094,14 +3838,14 @@ func (e SubjectsValidationError) Error() string { } return fmt.Sprintf( - "invalid %sSubjects.%s: %s%s", + "invalid %sStringArray.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = SubjectsValidationError{} +var _ error = StringArrayValidationError{} var _ interface { Field() string @@ -2109,35 +3853,22 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = SubjectsValidationError{} +} = StringArrayValidationError{} -// Validate checks the field values on Tenant with the rules defined in the -// proto definition for this message. If any rules are violated, an error is returned. -func (m *Tenant) Validate() error { +// Validate checks the field values on IntegerArray with the rules defined in +// the proto definition for this message. If any rules are violated, an error +// is returned. +func (m *IntegerArray) Validate() error { if m == nil { return nil } - // no validation rules for Id - - // no validation rules for Name - - if v, ok := interface{}(m.GetCreatedAt()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TenantValidationError{ - field: "CreatedAt", - reason: "embedded message failed validation", - cause: err, - } - } - } - return nil } -// TenantValidationError is the validation error returned by Tenant.Validate if -// the designated constraints aren't met. -type TenantValidationError struct { +// IntegerArrayValidationError is the validation error returned by +// IntegerArray.Validate if the designated constraints aren't met. +type IntegerArrayValidationError struct { field string reason string cause error @@ -2145,22 +3876,22 @@ type TenantValidationError struct { } // Field function returns field value. -func (e TenantValidationError) Field() string { return e.field } +func (e IntegerArrayValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e TenantValidationError) Reason() string { return e.reason } +func (e IntegerArrayValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e TenantValidationError) Cause() error { return e.cause } +func (e IntegerArrayValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e TenantValidationError) Key() bool { return e.key } +func (e IntegerArrayValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e TenantValidationError) ErrorName() string { return "TenantValidationError" } +func (e IntegerArrayValidationError) ErrorName() string { return "IntegerArrayValidationError" } // Error satisfies the builtin error interface -func (e TenantValidationError) Error() string { +func (e IntegerArrayValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2172,14 +3903,14 @@ func (e TenantValidationError) Error() string { } return fmt.Sprintf( - "invalid %sTenant.%s: %s%s", + "invalid %sIntegerArray.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = TenantValidationError{} +var _ error = IntegerArrayValidationError{} var _ interface { Field() string @@ -2187,39 +3918,22 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = TenantValidationError{} +} = IntegerArrayValidationError{} -// Validate checks the field values on TupleChanges with the rules defined in +// Validate checks the field values on DoubleArray with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned. -func (m *TupleChanges) Validate() error { +func (m *DoubleArray) Validate() error { if m == nil { return nil } - // no validation rules for SnapToken - - for idx, item := range m.GetTupleChanges() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TupleChangesValidationError{ - field: fmt.Sprintf("TupleChanges[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - return nil } -// TupleChangesValidationError is the validation error returned by -// TupleChanges.Validate if the designated constraints aren't met. -type TupleChangesValidationError struct { +// DoubleArrayValidationError is the validation error returned by +// DoubleArray.Validate if the designated constraints aren't met. +type DoubleArrayValidationError struct { field string reason string cause error @@ -2227,22 +3941,22 @@ type TupleChangesValidationError struct { } // Field function returns field value. -func (e TupleChangesValidationError) Field() string { return e.field } +func (e DoubleArrayValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e TupleChangesValidationError) Reason() string { return e.reason } +func (e DoubleArrayValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e TupleChangesValidationError) Cause() error { return e.cause } +func (e DoubleArrayValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e TupleChangesValidationError) Key() bool { return e.key } +func (e DoubleArrayValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e TupleChangesValidationError) ErrorName() string { return "TupleChangesValidationError" } +func (e DoubleArrayValidationError) ErrorName() string { return "DoubleArrayValidationError" } // Error satisfies the builtin error interface -func (e TupleChangesValidationError) Error() string { +func (e DoubleArrayValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2254,14 +3968,14 @@ func (e TupleChangesValidationError) Error() string { } return fmt.Sprintf( - "invalid %sTupleChanges.%s: %s%s", + "invalid %sDoubleArray.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = TupleChangesValidationError{} +var _ error = DoubleArrayValidationError{} var _ interface { Field() string @@ -2269,34 +3983,22 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = TupleChangesValidationError{} +} = DoubleArrayValidationError{} -// Validate checks the field values on TupleChange with the rules defined in +// Validate checks the field values on BooleanArray with the rules defined in // the proto definition for this message. If any rules are violated, an error // is returned. -func (m *TupleChange) Validate() error { +func (m *BooleanArray) Validate() error { if m == nil { return nil } - // no validation rules for Operation - - if v, ok := interface{}(m.GetTuple()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return TupleChangeValidationError{ - field: "Tuple", - reason: "embedded message failed validation", - cause: err, - } - } - } - return nil } -// TupleChangeValidationError is the validation error returned by -// TupleChange.Validate if the designated constraints aren't met. -type TupleChangeValidationError struct { +// BooleanArrayValidationError is the validation error returned by +// BooleanArray.Validate if the designated constraints aren't met. +type BooleanArrayValidationError struct { field string reason string cause error @@ -2304,22 +4006,22 @@ type TupleChangeValidationError struct { } // Field function returns field value. -func (e TupleChangeValidationError) Field() string { return e.field } +func (e BooleanArrayValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e TupleChangeValidationError) Reason() string { return e.reason } +func (e BooleanArrayValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e TupleChangeValidationError) Cause() error { return e.cause } +func (e BooleanArrayValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e TupleChangeValidationError) Key() bool { return e.key } +func (e BooleanArrayValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e TupleChangeValidationError) ErrorName() string { return "TupleChangeValidationError" } +func (e BooleanArrayValidationError) ErrorName() string { return "BooleanArrayValidationError" } // Error satisfies the builtin error interface -func (e TupleChangeValidationError) Error() string { +func (e BooleanArrayValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2331,14 +4033,14 @@ func (e TupleChangeValidationError) Error() string { } return fmt.Sprintf( - "invalid %sTupleChange.%s: %s%s", + "invalid %sBooleanArray.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = TupleChangeValidationError{} +var _ error = BooleanArrayValidationError{} var _ interface { Field() string @@ -2346,4 +4048,4 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = TupleChangeValidationError{} +} = BooleanArrayValidationError{} diff --git a/generated/base/v1/base_vtproto.pb.go b/generated/base/v1/base_vtproto.pb.go index cf6153e..cf25125 100644 --- a/generated/base/v1/base_vtproto.pb.go +++ b/generated/base/v1/base_vtproto.pb.go @@ -5,11 +5,16 @@ package v1 import ( + binary "encoding/binary" fmt "fmt" + v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + structpb "google.golang.org/protobuf/types/known/structpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" io "io" + math "math" bits "math/bits" ) @@ -20,6 +25,85 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +func (m *Context) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Context) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Context) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Data != nil { + if marshalto, ok := interface{}(m.Data).(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + } else { + encoded, err := proto.Marshal(m.Data) + if err != nil { + return 0, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = encodeVarint(dAtA, i, uint64(len(encoded))) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Attributes[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Tuples) > 0 { + for iNdEx := len(m.Tuples) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Tuples[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *Child) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -186,6 +270,44 @@ func (m *Leaf_TupleToUserSet) MarshalToSizedBufferVT(dAtA []byte) (int, error) { } return len(dAtA) - i, nil } +func (m *Leaf_ComputedAttribute) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Leaf_ComputedAttribute) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ComputedAttribute != nil { + size, err := m.ComputedAttribute.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *Leaf_Call) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Leaf_Call) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Call != nil { + size, err := m.Call.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} func (m *Rewrite) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -266,6 +388,45 @@ func (m *SchemaDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if len(m.References) > 0 { + for k := range m.References { + v := m.References[k] + baseI := i + i = encodeVarint(dAtA, i, uint64(v)) + i-- + dAtA[i] = 0x10 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a + } + } + if len(m.RuleDefinitions) > 0 { + for k := range m.RuleDefinitions { + v := m.RuleDefinitions[k] + baseI := i + size, err := v.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 + } + } if len(m.EntityDefinitions) > 0 { for k := range m.EntityDefinitions { v := m.EntityDefinitions[k] @@ -335,6 +496,28 @@ func (m *EntityDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0xa i = encodeVarint(dAtA, i, uint64(baseI-i)) i-- + dAtA[i] = 0x2a + } + } + if len(m.Attributes) > 0 { + for k := range m.Attributes { + v := m.Attributes[k] + baseI := i + size, err := v.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- dAtA[i] = 0x22 } } @@ -392,7 +575,7 @@ func (m *EntityDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *RelationDefinition) MarshalVT() (dAtA []byte, err error) { +func (m *RuleDefinition) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -405,12 +588,12 @@ func (m *RelationDefinition) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *RelationDefinition) MarshalToVT(dAtA []byte) (int, error) { +func (m *RuleDefinition) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *RelationDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *RuleDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -422,14 +605,41 @@ func (m *RelationDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.RelationReferences) > 0 { - for iNdEx := len(m.RelationReferences) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.RelationReferences[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if m.Expression != nil { + if marshalto, ok := interface{}(m.Expression).(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) + } else { + encoded, err := proto.Marshal(m.Expression) + if err != nil { + return 0, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = encodeVarint(dAtA, i, uint64(len(encoded))) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Arguments) > 0 { + for k := range m.Arguments { + v := m.Arguments[k] + baseI := i + i = encodeVarint(dAtA, i, uint64(v)) + i-- + dAtA[i] = 0x10 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x12 } @@ -444,7 +654,7 @@ func (m *RelationDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *PermissionDefinition) MarshalVT() (dAtA []byte, err error) { +func (m *AttributeDefinition) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -457,12 +667,12 @@ func (m *PermissionDefinition) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PermissionDefinition) MarshalToVT(dAtA []byte) (int, error) { +func (m *AttributeDefinition) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *PermissionDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *AttributeDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -474,15 +684,10 @@ func (m *PermissionDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Child != nil { - size, err := m.Child.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + if m.Type != 0 { + i = encodeVarint(dAtA, i, uint64(m.Type)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } if len(m.Name) > 0 { i -= len(m.Name) @@ -494,7 +699,7 @@ func (m *PermissionDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *RelationReference) MarshalVT() (dAtA []byte, err error) { +func (m *RelationDefinition) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -507,12 +712,12 @@ func (m *RelationReference) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *RelationReference) MarshalToVT(dAtA []byte) (int, error) { +func (m *RelationDefinition) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *RelationReference) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *RelationDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -524,24 +729,29 @@ func (m *RelationReference) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Relation) > 0 { - i -= len(m.Relation) - copy(dAtA[i:], m.Relation) - i = encodeVarint(dAtA, i, uint64(len(m.Relation))) - i-- - dAtA[i] = 0x12 + if len(m.RelationReferences) > 0 { + for iNdEx := len(m.RelationReferences) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.RelationReferences[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *ComputedUserSet) MarshalVT() (dAtA []byte, err error) { +func (m *PermissionDefinition) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -554,12 +764,12 @@ func (m *ComputedUserSet) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ComputedUserSet) MarshalToVT(dAtA []byte) (int, error) { +func (m *PermissionDefinition) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *ComputedUserSet) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *PermissionDefinition) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -571,17 +781,27 @@ func (m *ComputedUserSet) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Relation) > 0 { - i -= len(m.Relation) - copy(dAtA[i:], m.Relation) - i = encodeVarint(dAtA, i, uint64(len(m.Relation))) + if m.Child != nil { + size, err := m.Child.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *TupleSet) MarshalVT() (dAtA []byte, err error) { +func (m *RelationReference) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -594,12 +814,12 @@ func (m *TupleSet) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TupleSet) MarshalToVT(dAtA []byte) (int, error) { +func (m *RelationReference) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *TupleSet) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *RelationReference) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -616,12 +836,19 @@ func (m *TupleSet) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.Relation) i = encodeVarint(dAtA, i, uint64(len(m.Relation))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *TupleToUserSet) MarshalVT() (dAtA []byte, err error) { +func (m *Argument) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -634,12 +861,12 @@ func (m *TupleToUserSet) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TupleToUserSet) MarshalToVT(dAtA []byte) (int, error) { +func (m *Argument) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *TupleToUserSet) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Argument) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -651,18 +878,30 @@ func (m *TupleToUserSet) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Computed != nil { - size, err := m.Computed.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err + if vtmsg, ok := m.Type.(interface { + MarshalToVT([]byte) (int, error) + SizeVT() int + }); ok { + { + size := vtmsg.SizeVT() + i -= size + if _, err := vtmsg.MarshalToVT(dAtA[i:]); err != nil { + return 0, err + } } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 } - if m.TupleSet != nil { - size, err := m.TupleSet.MarshalToSizedBufferVT(dAtA[:i]) + return len(dAtA) - i, nil +} + +func (m *Argument_ComputedAttribute) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Argument_ComputedAttribute) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ComputedAttribute != nil { + size, err := m.ComputedAttribute.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -673,68 +912,26 @@ func (m *TupleToUserSet) MarshalToSizedBufferVT(dAtA []byte) (int, error) { } return len(dAtA) - i, nil } - -func (m *Tuple) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Tuple) MarshalToVT(dAtA []byte) (int, error) { +func (m *Argument_ContextAttribute) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Tuple) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } +func (m *Argument_ContextAttribute) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Subject != nil { - size, err := m.Subject.MarshalToSizedBufferVT(dAtA[:i]) + if m.ContextAttribute != nil { + size, err := m.ContextAttribute.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x1a - } - if len(m.Relation) > 0 { - i -= len(m.Relation) - copy(dAtA[i:], m.Relation) - i = encodeVarint(dAtA, i, uint64(len(m.Relation))) - i-- dAtA[i] = 0x12 } - if m.Entity != nil { - size, err := m.Entity.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } - -func (m *Tuples) MarshalVT() (dAtA []byte, err error) { +func (m *Call) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -747,12 +944,12 @@ func (m *Tuples) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Tuples) MarshalToVT(dAtA []byte) (int, error) { +func (m *Call) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Tuples) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Call) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -764,22 +961,29 @@ func (m *Tuples) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Tuples) > 0 { - for iNdEx := len(m.Tuples) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Tuples[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if len(m.Arguments) > 0 { + for iNdEx := len(m.Arguments) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Arguments[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 } } + if len(m.RuleName) > 0 { + i -= len(m.RuleName) + copy(dAtA[i:], m.RuleName) + i = encodeVarint(dAtA, i, uint64(len(m.RuleName))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } -func (m *Entity) MarshalVT() (dAtA []byte, err error) { +func (m *ComputedAttribute) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -792,12 +996,12 @@ func (m *Entity) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Entity) MarshalToVT(dAtA []byte) (int, error) { +func (m *ComputedAttribute) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Entity) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *ComputedAttribute) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -809,24 +1013,17 @@ func (m *Entity) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0x12 - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *EntityAndRelation) MarshalVT() (dAtA []byte, err error) { +func (m *ContextAttribute) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -839,12 +1036,12 @@ func (m *EntityAndRelation) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EntityAndRelation) MarshalToVT(dAtA []byte) (int, error) { +func (m *ContextAttribute) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *EntityAndRelation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *ContextAttribute) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -856,27 +1053,17 @@ func (m *EntityAndRelation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Relation) > 0 { - i -= len(m.Relation) - copy(dAtA[i:], m.Relation) - i = encodeVarint(dAtA, i, uint64(len(m.Relation))) - i-- - dAtA[i] = 0x12 - } - if m.Entity != nil { - size, err := m.Entity.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Subject) MarshalVT() (dAtA []byte, err error) { +func (m *ComputedUserSet) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -889,12 +1076,12 @@ func (m *Subject) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Subject) MarshalToVT(dAtA []byte) (int, error) { +func (m *ComputedUserSet) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Subject) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *ComputedUserSet) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -911,26 +1098,12 @@ func (m *Subject) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.Relation) i = encodeVarint(dAtA, i, uint64(len(m.Relation))) i-- - dAtA[i] = 0x1a - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0x12 - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *TupleFilter) MarshalVT() (dAtA []byte, err error) { +func (m *TupleToUserSet) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -943,12 +1116,12 @@ func (m *TupleFilter) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TupleFilter) MarshalToVT(dAtA []byte) (int, error) { +func (m *TupleToUserSet) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *TupleFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *TupleToUserSet) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -960,25 +1133,18 @@ func (m *TupleFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Subject != nil { - size, err := m.Subject.MarshalToSizedBufferVT(dAtA[:i]) + if m.Computed != nil { + size, err := m.Computed.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x1a - } - if len(m.Relation) > 0 { - i -= len(m.Relation) - copy(dAtA[i:], m.Relation) - i = encodeVarint(dAtA, i, uint64(len(m.Relation))) - i-- dAtA[i] = 0x12 } - if m.Entity != nil { - size, err := m.Entity.MarshalToSizedBufferVT(dAtA[:i]) + if m.TupleSet != nil { + size, err := m.TupleSet.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } @@ -990,7 +1156,7 @@ func (m *TupleFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *EntityFilter) MarshalVT() (dAtA []byte, err error) { +func (m *TupleSet) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -1003,12 +1169,12 @@ func (m *EntityFilter) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EntityFilter) MarshalToVT(dAtA []byte) (int, error) { +func (m *TupleSet) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *EntityFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *TupleSet) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -1020,26 +1186,17 @@ func (m *EntityFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Ids) > 0 { - for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Ids[iNdEx]) - copy(dAtA[i:], m.Ids[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Ids[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + if len(m.Relation) > 0 { + i -= len(m.Relation) + copy(dAtA[i:], m.Relation) + i = encodeVarint(dAtA, i, uint64(len(m.Relation))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *SubjectFilter) MarshalVT() (dAtA []byte, err error) { +func (m *Tuple) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -1052,12 +1209,12 @@ func (m *SubjectFilter) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SubjectFilter) MarshalToVT(dAtA []byte) (int, error) { +func (m *Tuple) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *SubjectFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Tuple) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -1069,33 +1226,37 @@ func (m *SubjectFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.Subject != nil { + size, err := m.Subject.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } if len(m.Relation) > 0 { i -= len(m.Relation) copy(dAtA[i:], m.Relation) i = encodeVarint(dAtA, i, uint64(len(m.Relation))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } - if len(m.Ids) > 0 { - for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Ids[iNdEx]) - copy(dAtA[i:], m.Ids[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Ids[iNdEx]))) - i-- - dAtA[i] = 0x12 + if m.Entity != nil { + size, err := m.Entity.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i -= size + i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *ExpandTreeNode) MarshalVT() (dAtA []byte, err error) { +func (m *Attribute) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -1108,12 +1269,12 @@ func (m *ExpandTreeNode) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ExpandTreeNode) MarshalToVT(dAtA []byte) (int, error) { +func (m *Attribute) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *ExpandTreeNode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Attribute) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -1125,27 +1286,49 @@ func (m *ExpandTreeNode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Children) > 0 { - for iNdEx := len(m.Children) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Children[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if m.Value != nil { + if marshalto, ok := interface{}(m.Value).(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 + } else { + encoded, err := proto.Marshal(m.Value) + if err != nil { + return 0, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = encodeVarint(dAtA, i, uint64(len(encoded))) } - } - if m.Operation != 0 { - i = encodeVarint(dAtA, i, uint64(m.Operation)) i-- - dAtA[i] = 0x8 + dAtA[i] = 0x1a + } + if len(m.Attribute) > 0 { + i -= len(m.Attribute) + copy(dAtA[i:], m.Attribute) + i = encodeVarint(dAtA, i, uint64(len(m.Attribute))) + i-- + dAtA[i] = 0x12 + } + if m.Entity != nil { + size, err := m.Entity.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Expand) MarshalVT() (dAtA []byte, err error) { +func (m *Tuples) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -1158,12 +1341,12 @@ func (m *Expand) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Expand) MarshalToVT(dAtA []byte) (int, error) { +func (m *Tuples) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Expand) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Tuples) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -1175,70 +1358,114 @@ func (m *Expand) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if vtmsg, ok := m.Node.(interface { - MarshalToVT([]byte) (int, error) - SizeVT() int - }); ok { - { - size := vtmsg.SizeVT() - i -= size - if _, err := vtmsg.MarshalToVT(dAtA[i:]); err != nil { + if len(m.Tuples) > 0 { + for iNdEx := len(m.Tuples) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Tuples[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } } - if m.Target != nil { - size, err := m.Target.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } -func (m *Expand_Expand) MarshalToVT(dAtA []byte) (int, error) { +func (m *Attributes) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Attributes) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Expand_Expand) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Attributes) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } i := len(dAtA) - if m.Expand != nil { - size, err := m.Expand.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Attributes[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 } return len(dAtA) - i, nil } -func (m *Expand_Leaf) MarshalToVT(dAtA []byte) (int, error) { + +func (m *Entity) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Entity) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Expand_Leaf) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Entity) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } i := len(dAtA) - if m.Leaf != nil { - size, err := m.Leaf.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarint(dAtA, i, uint64(len(m.Id))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Subjects) MarshalVT() (dAtA []byte, err error) { + +func (m *EntityAndRelation) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -1251,12 +1478,12 @@ func (m *Subjects) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Subjects) MarshalToVT(dAtA []byte) (int, error) { +func (m *EntityAndRelation) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Subjects) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *EntityAndRelation) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -1268,22 +1495,27 @@ func (m *Subjects) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Subjects) > 0 { - for iNdEx := len(m.Subjects) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Subjects[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa + if len(m.Relation) > 0 { + i -= len(m.Relation) + copy(dAtA[i:], m.Relation) + i = encodeVarint(dAtA, i, uint64(len(m.Relation))) + i-- + dAtA[i] = 0x12 + } + if m.Entity != nil { + size, err := m.Entity.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Tenant) MarshalVT() (dAtA []byte, err error) { +func (m *Subject) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -1296,12 +1528,12 @@ func (m *Tenant) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Tenant) MarshalToVT(dAtA []byte) (int, error) { +func (m *Subject) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Tenant) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *Subject) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -1313,46 +1545,31 @@ func (m *Tenant) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.CreatedAt != nil { - if marshalto, ok := interface{}(m.CreatedAt).(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.CreatedAt) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) - } + if len(m.Relation) > 0 { + i -= len(m.Relation) + copy(dAtA[i:], m.Relation) + i = encodeVarint(dAtA, i, uint64(len(m.Relation))) i-- dAtA[i] = 0x1a } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) i = encodeVarint(dAtA, i, uint64(len(m.Id))) i-- + dAtA[i] = 0x12 + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *TupleChanges) MarshalVT() (dAtA []byte, err error) { +func (m *AttributeFilter) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -1365,12 +1582,12 @@ func (m *TupleChanges) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TupleChanges) MarshalToVT(dAtA []byte) (int, error) { +func (m *AttributeFilter) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *TupleChanges) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *AttributeFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -1382,29 +1599,29 @@ func (m *TupleChanges) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.TupleChanges) > 0 { - for iNdEx := len(m.TupleChanges) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.TupleChanges[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Attributes[iNdEx]) + copy(dAtA[i:], m.Attributes[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Attributes[iNdEx]))) i-- dAtA[i] = 0x12 } } - if len(m.SnapToken) > 0 { - i -= len(m.SnapToken) - copy(dAtA[i:], m.SnapToken) - i = encodeVarint(dAtA, i, uint64(len(m.SnapToken))) + if m.Entity != nil { + size, err := m.Entity.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *TupleChange) MarshalVT() (dAtA []byte, err error) { +func (m *TupleFilter) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -1417,12 +1634,12 @@ func (m *TupleChange) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TupleChange) MarshalToVT(dAtA []byte) (int, error) { +func (m *TupleFilter) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *TupleChange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *TupleFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -1434,661 +1651,4923 @@ func (m *TupleChange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if m.Tuple != nil { - size, err := m.Tuple.MarshalToSizedBufferVT(dAtA[:i]) + if m.Subject != nil { + size, err := m.Subject.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- + dAtA[i] = 0x1a + } + if len(m.Relation) > 0 { + i -= len(m.Relation) + copy(dAtA[i:], m.Relation) + i = encodeVarint(dAtA, i, uint64(len(m.Relation))) + i-- dAtA[i] = 0x12 } - if m.Operation != 0 { - i = encodeVarint(dAtA, i, uint64(m.Operation)) + if m.Entity != nil { + size, err := m.Entity.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func encodeVarint(dAtA []byte, offset int, v uint64) int { - offset -= sov(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Child) SizeVT() (n int) { +func (m *EntityFilter) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if vtmsg, ok := m.Type.(interface{ SizeVT() int }); ok { - n += vtmsg.SizeVT() + return nil, nil } - if m.unknownFields != nil { - n += len(m.unknownFields) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *Child_Leaf) SizeVT() (n int) { +func (m *EntityFilter) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *EntityFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.Leaf != nil { - l = m.Leaf.SizeVT() - n += 1 + l + sov(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - return n -} -func (m *Child_Rewrite) SizeVT() (n int) { - if m == nil { - return 0 + if len(m.Ids) > 0 { + for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Ids[iNdEx]) + copy(dAtA[i:], m.Ids[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Ids[iNdEx]))) + i-- + dAtA[i] = 0x12 + } } - var l int - _ = l - if m.Rewrite != nil { - l = m.Rewrite.SizeVT() - n += 1 + l + sov(uint64(l)) + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *Leaf) SizeVT() (n int) { + +func (m *SubjectFilter) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if vtmsg, ok := m.Type.(interface{ SizeVT() int }); ok { - n += vtmsg.SizeVT() + return nil, nil } - if m.unknownFields != nil { - n += len(m.unknownFields) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *Leaf_ComputedUserSet) SizeVT() (n int) { +func (m *SubjectFilter) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *SubjectFilter) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.ComputedUserSet != nil { - l = m.ComputedUserSet.SizeVT() - n += 1 + l + sov(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - return n + if len(m.Relation) > 0 { + i -= len(m.Relation) + copy(dAtA[i:], m.Relation) + i = encodeVarint(dAtA, i, uint64(len(m.Relation))) + i-- + dAtA[i] = 0x1a + } + if len(m.Ids) > 0 { + for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Ids[iNdEx]) + copy(dAtA[i:], m.Ids[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Ids[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *Leaf_TupleToUserSet) SizeVT() (n int) { + +func (m *ExpandTreeNode) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil } - var l int - _ = l - if m.TupleToUserSet != nil { - l = m.TupleToUserSet.SizeVT() - n += 1 + l + sov(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *Rewrite) SizeVT() (n int) { + +func (m *ExpandTreeNode) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ExpandTreeNode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.RewriteOperation != 0 { - n += 1 + sov(uint64(m.RewriteOperation)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } if len(m.Children) > 0 { - for _, e := range m.Children { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + for iNdEx := len(m.Children) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Children[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } } - if m.unknownFields != nil { - n += len(m.unknownFields) + if m.Operation != 0 { + i = encodeVarint(dAtA, i, uint64(m.Operation)) + i-- + dAtA[i] = 0x8 } - return n + return len(dAtA) - i, nil } -func (m *SchemaDefinition) SizeVT() (n int) { +func (m *Expand) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if len(m.EntityDefinitions) > 0 { - for k, v := range m.EntityDefinitions { - _ = k - _ = v - l = 0 - if v != nil { - l = v.SizeVT() - } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } + return nil, nil } - if m.unknownFields != nil { - n += len(m.unknownFields) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *EntityDefinition) SizeVT() (n int) { +func (m *Expand) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Expand) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.Relations) > 0 { - for k, v := range m.Relations { - _ = k - _ = v - l = 0 - if v != nil { - l = v.SizeVT() + if vtmsg, ok := m.Node.(interface { + MarshalToVT([]byte) (int, error) + SizeVT() int + }); ok { + { + size := vtmsg.SizeVT() + i -= size + if _, err := vtmsg.MarshalToVT(dAtA[i:]); err != nil { + return 0, err } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) } } - if len(m.Permissions) > 0 { - for k, v := range m.Permissions { - _ = k - _ = v - l = 0 - if v != nil { - l = v.SizeVT() + if len(m.Arguments) > 0 { + for iNdEx := len(m.Arguments) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Arguments[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } - l += 1 + sov(uint64(l)) - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) - } - } - if len(m.References) > 0 { - for k, v := range m.References { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + sov(uint64(v)) - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a } } - if m.unknownFields != nil { - n += len(m.unknownFields) + if len(m.Permission) > 0 { + i -= len(m.Permission) + copy(dAtA[i:], m.Permission) + i = encodeVarint(dAtA, i, uint64(len(m.Permission))) + i-- + dAtA[i] = 0x12 } - return n + if m.Entity != nil { + size, err := m.Entity.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *RelationDefinition) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) +func (m *Expand_Expand) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Expand_Expand) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Expand != nil { + size, err := m.Expand.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - if len(m.RelationReferences) > 0 { - for _, e := range m.RelationReferences { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + return len(dAtA) - i, nil +} +func (m *Expand_Leaf) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Expand_Leaf) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Leaf != nil { + size, err := m.Leaf.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a } - if m.unknownFields != nil { - n += len(m.unknownFields) + return len(dAtA) - i, nil +} +func (m *ExpandLeaf) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - return n + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func (m *PermissionDefinition) SizeVT() (n int) { +func (m *ExpandLeaf) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ExpandLeaf) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.Child != nil { - l = m.Child.SizeVT() - n += 1 + l + sov(uint64(l)) + if vtmsg, ok := m.Type.(interface { + MarshalToVT([]byte) (int, error) + SizeVT() int + }); ok { + { + size := vtmsg.SizeVT() + i -= size + if _, err := vtmsg.MarshalToVT(dAtA[i:]); err != nil { + return 0, err + } + } } - if m.unknownFields != nil { - n += len(m.unknownFields) + return len(dAtA) - i, nil +} + +func (m *ExpandLeaf_Subjects) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ExpandLeaf_Subjects) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Subjects != nil { + size, err := m.Subjects.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil +} +func (m *ExpandLeaf_Values) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *RelationReference) SizeVT() (n int) { - if m == nil { - return 0 +func (m *ExpandLeaf_Values) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Values != nil { + size, err := m.Values.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sov(uint64(l)) + return len(dAtA) - i, nil +} +func (m *ExpandLeaf_Value) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *ExpandLeaf_Value) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Value != nil { + if marshalto, ok := interface{}(m.Value).(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + } else { + encoded, err := proto.Marshal(m.Value) + if err != nil { + return 0, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = encodeVarint(dAtA, i, uint64(len(encoded))) + } + i-- + dAtA[i] = 0x1a } - l = len(m.Relation) - if l > 0 { - n += 1 + l + sov(uint64(l)) + return len(dAtA) - i, nil +} +func (m *Values) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil } - if m.unknownFields != nil { - n += len(m.unknownFields) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *ComputedUserSet) SizeVT() (n int) { +func (m *Values) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Values) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Relation) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } if m.unknownFields != nil { - n += len(m.unknownFields) + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - return n + if len(m.Values) > 0 { + for k := range m.Values { + v := m.Values[k] + baseI := i + if marshalto, ok := interface{}(v).(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + } else { + encoded, err := proto.Marshal(v) + if err != nil { + return 0, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = encodeVarint(dAtA, i, uint64(len(encoded))) + } + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil } -func (m *TupleSet) SizeVT() (n int) { +func (m *Subjects) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Relation) - if l > 0 { - n += 1 + l + sov(uint64(l)) + return nil, nil } - if m.unknownFields != nil { - n += len(m.unknownFields) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *TupleToUserSet) SizeVT() (n int) { +func (m *Subjects) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Subjects) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.TupleSet != nil { - l = m.TupleSet.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.Computed != nil { - l = m.Computed.SizeVT() - n += 1 + l + sov(uint64(l)) - } if m.unknownFields != nil { - n += len(m.unknownFields) + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - return n + if len(m.Subjects) > 0 { + for iNdEx := len(m.Subjects) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Subjects[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil } -func (m *Tuple) SizeVT() (n int) { +func (m *Tenant) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if m.Entity != nil { - l = m.Entity.SizeVT() - n += 1 + l + sov(uint64(l)) - } - l = len(m.Relation) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.Subject != nil { - l = m.Subject.SizeVT() - n += 1 + l + sov(uint64(l)) + return nil, nil } - if m.unknownFields != nil { - n += len(m.unknownFields) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *Tuples) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Tuples) > 0 { - for _, e := range m.Tuples { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } - } - if m.unknownFields != nil { - n += len(m.unknownFields) - } - return n +func (m *Tenant) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *Entity) SizeVT() (n int) { +func (m *Tenant) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sov(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - l = len(m.Id) - if l > 0 { - n += 1 + l + sov(uint64(l)) + if m.CreatedAt != nil { + if marshalto, ok := interface{}(m.CreatedAt).(interface { + MarshalToSizedBufferVT([]byte) (int, error) + }); ok { + size, err := marshalto.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + } else { + encoded, err := proto.Marshal(m.CreatedAt) + if err != nil { + return 0, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = encodeVarint(dAtA, i, uint64(len(encoded))) + } + i-- + dAtA[i] = 0x1a } - if m.unknownFields != nil { - n += len(m.unknownFields) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 } - return n + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil } -func (m *EntityAndRelation) SizeVT() (n int) { +func (m *DataChanges) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if m.Entity != nil { - l = m.Entity.SizeVT() - n += 1 + l + sov(uint64(l)) - } - l = len(m.Relation) - if l > 0 { - n += 1 + l + sov(uint64(l)) + return nil, nil } - if m.unknownFields != nil { - n += len(m.unknownFields) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *Subject) SizeVT() (n int) { +func (m *DataChanges) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DataChanges) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Id) - if l > 0 { - n += 1 + l + sov(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - l = len(m.Relation) - if l > 0 { - n += 1 + l + sov(uint64(l)) + if len(m.DataChanges) > 0 { + for iNdEx := len(m.DataChanges) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.DataChanges[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } } - if m.unknownFields != nil { - n += len(m.unknownFields) + if len(m.SnapToken) > 0 { + i -= len(m.SnapToken) + copy(dAtA[i:], m.SnapToken) + i = encodeVarint(dAtA, i, uint64(len(m.SnapToken))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *TupleFilter) SizeVT() (n int) { +func (m *DataChange) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - if m.Entity != nil { - l = m.Entity.SizeVT() - n += 1 + l + sov(uint64(l)) - } - l = len(m.Relation) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.Subject != nil { - l = m.Subject.SizeVT() - n += 1 + l + sov(uint64(l)) + return nil, nil } - if m.unknownFields != nil { - n += len(m.unknownFields) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *EntityFilter) SizeVT() (n int) { +func (m *DataChange) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DataChange) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sov(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.Ids) > 0 { - for _, s := range m.Ids { - l = len(s) - n += 1 + l + sov(uint64(l)) + if vtmsg, ok := m.Type.(interface { + MarshalToVT([]byte) (int, error) + SizeVT() int + }); ok { + { + size := vtmsg.SizeVT() + i -= size + if _, err := vtmsg.MarshalToVT(dAtA[i:]); err != nil { + return 0, err + } } } - if m.unknownFields != nil { - n += len(m.unknownFields) + if m.Operation != 0 { + i = encodeVarint(dAtA, i, uint64(m.Operation)) + i-- + dAtA[i] = 0x8 } - return n + return len(dAtA) - i, nil } -func (m *SubjectFilter) SizeVT() (n int) { - if m == nil { - return 0 - } +func (m *DataChange_Tuple) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DataChange_Tuple) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Tuple != nil { + size, err := m.Tuple.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *DataChange_Attribute) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DataChange_Attribute) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Attribute != nil { + size, err := m.Attribute.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *String) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *String) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *String) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sov(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.Ids) > 0 { - for _, s := range m.Ids { - l = len(s) - n += 1 + l + sov(uint64(l)) - } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarint(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0xa } - l = len(m.Relation) - if l > 0 { - n += 1 + l + sov(uint64(l)) + return len(dAtA) - i, nil +} + +func (m *Integer) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil +} + +func (m *Integer) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Integer) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l if m.unknownFields != nil { - n += len(m.unknownFields) + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - return n + if m.Value != 0 { + i = encodeVarint(dAtA, i, uint64(m.Value)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *ExpandTreeNode) SizeVT() (n int) { +func (m *Double) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Double) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Double) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.Operation != 0 { - n += 1 + sov(uint64(m.Operation)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if len(m.Children) > 0 { - for _, e := range m.Children { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } + if m.Value != 0 { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) + i-- + dAtA[i] = 0x9 + } + return len(dAtA) - i, nil +} + +func (m *Boolean) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Boolean) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *Boolean) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } + i := len(dAtA) + _ = i + var l int + _ = l if m.unknownFields != nil { - n += len(m.unknownFields) + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - return n + if m.Value { + i-- + if m.Value { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *Expand) SizeVT() (n int) { +func (m *StringArray) MarshalVT() (dAtA []byte, err error) { if m == nil { - return 0 + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StringArray) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *StringArray) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - if m.Target != nil { - l = m.Target.SizeVT() - n += 1 + l + sov(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if vtmsg, ok := m.Node.(interface{ SizeVT() int }); ok { - n += vtmsg.SizeVT() + if len(m.Values) > 0 { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Values[iNdEx]) + copy(dAtA[i:], m.Values[iNdEx]) + i = encodeVarint(dAtA, i, uint64(len(m.Values[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *IntegerArray) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IntegerArray) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *IntegerArray) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil } + i := len(dAtA) + _ = i + var l int + _ = l if m.unknownFields != nil { - n += len(m.unknownFields) + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Values) > 0 { + var pksize2 int + for _, num := range m.Values { + pksize2 += sov(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num1 := range m.Values { + num := uint64(num1) + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = encodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DoubleArray) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DoubleArray) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DoubleArray) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Values) > 0 { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + f1 := math.Float64bits(float64(m.Values[iNdEx])) + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) + } + i = encodeVarint(dAtA, i, uint64(len(m.Values)*8)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BooleanArray) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BooleanArray) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *BooleanArray) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Values) > 0 { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + i-- + if m.Values[iNdEx] { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + } + i = encodeVarint(dAtA, i, uint64(len(m.Values))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarint(dAtA []byte, offset int, v uint64) int { + offset -= sov(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Context) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Tuples) > 0 { + for _, e := range m.Tuples { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if m.Data != nil { + if size, ok := interface{}(m.Data).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(m.Data) + } + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Child) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.Type.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Child_Leaf) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Leaf != nil { + l = m.Leaf.SizeVT() + n += 1 + l + sov(uint64(l)) + } + return n +} +func (m *Child_Rewrite) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Rewrite != nil { + l = m.Rewrite.SizeVT() + n += 1 + l + sov(uint64(l)) + } + return n +} +func (m *Leaf) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.Type.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Leaf_ComputedUserSet) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ComputedUserSet != nil { + l = m.ComputedUserSet.SizeVT() + n += 1 + l + sov(uint64(l)) + } + return n +} +func (m *Leaf_TupleToUserSet) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TupleToUserSet != nil { + l = m.TupleToUserSet.SizeVT() + n += 1 + l + sov(uint64(l)) + } + return n +} +func (m *Leaf_ComputedAttribute) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ComputedAttribute != nil { + l = m.ComputedAttribute.SizeVT() + n += 1 + l + sov(uint64(l)) + } + return n +} +func (m *Leaf_Call) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Call != nil { + l = m.Call.SizeVT() + n += 1 + l + sov(uint64(l)) + } + return n +} +func (m *Rewrite) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RewriteOperation != 0 { + n += 1 + sov(uint64(m.RewriteOperation)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *SchemaDefinition) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.EntityDefinitions) > 0 { + for k, v := range m.EntityDefinitions { + _ = k + _ = v + l = 0 + if v != nil { + l = v.SizeVT() + } + l += 1 + sov(uint64(l)) + mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l + n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + } + } + if len(m.RuleDefinitions) > 0 { + for k, v := range m.RuleDefinitions { + _ = k + _ = v + l = 0 + if v != nil { + l = v.SizeVT() + } + l += 1 + sov(uint64(l)) + mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l + n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + } + } + if len(m.References) > 0 { + for k, v := range m.References { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + sov(uint64(v)) + n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + } + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *EntityDefinition) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.Relations) > 0 { + for k, v := range m.Relations { + _ = k + _ = v + l = 0 + if v != nil { + l = v.SizeVT() + } + l += 1 + sov(uint64(l)) + mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l + n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + } + } + if len(m.Permissions) > 0 { + for k, v := range m.Permissions { + _ = k + _ = v + l = 0 + if v != nil { + l = v.SizeVT() + } + l += 1 + sov(uint64(l)) + mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l + n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + } + } + if len(m.Attributes) > 0 { + for k, v := range m.Attributes { + _ = k + _ = v + l = 0 + if v != nil { + l = v.SizeVT() + } + l += 1 + sov(uint64(l)) + mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l + n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + } + } + if len(m.References) > 0 { + for k, v := range m.References { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + sov(uint64(v)) + n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + } + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *RuleDefinition) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.Arguments) > 0 { + for k, v := range m.Arguments { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + sov(uint64(v)) + n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + } + } + if m.Expression != nil { + if size, ok := interface{}(m.Expression).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(m.Expression) + } + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *AttributeDefinition) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.Type != 0 { + n += 1 + sov(uint64(m.Type)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *RelationDefinition) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.RelationReferences) > 0 { + for _, e := range m.RelationReferences { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *PermissionDefinition) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.Child != nil { + l = m.Child.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *RelationReference) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Relation) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Argument) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.Type.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Argument_ComputedAttribute) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ComputedAttribute != nil { + l = m.ComputedAttribute.SizeVT() + n += 1 + l + sov(uint64(l)) + } + return n +} +func (m *Argument_ContextAttribute) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ContextAttribute != nil { + l = m.ContextAttribute.SizeVT() + n += 1 + l + sov(uint64(l)) + } + return n +} +func (m *Call) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RuleName) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.Arguments) > 0 { + for _, e := range m.Arguments { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *ComputedAttribute) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *ContextAttribute) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *ComputedUserSet) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Relation) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *TupleToUserSet) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TupleSet != nil { + l = m.TupleSet.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.Computed != nil { + l = m.Computed.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *TupleSet) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Relation) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Tuple) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Entity != nil { + l = m.Entity.SizeVT() + n += 1 + l + sov(uint64(l)) + } + l = len(m.Relation) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.Subject != nil { + l = m.Subject.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Attribute) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Entity != nil { + l = m.Entity.SizeVT() + n += 1 + l + sov(uint64(l)) + } + l = len(m.Attribute) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.Value != nil { + if size, ok := interface{}(m.Value).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(m.Value) + } + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Tuples) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Tuples) > 0 { + for _, e := range m.Tuples { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Attributes) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Entity) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Id) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *EntityAndRelation) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Entity != nil { + l = m.Entity.SizeVT() + n += 1 + l + sov(uint64(l)) + } + l = len(m.Relation) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Subject) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Id) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Relation) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *AttributeFilter) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Entity != nil { + l = m.Entity.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, s := range m.Attributes { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *TupleFilter) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Entity != nil { + l = m.Entity.SizeVT() + n += 1 + l + sov(uint64(l)) + } + l = len(m.Relation) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.Subject != nil { + l = m.Subject.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *EntityFilter) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.Ids) > 0 { + for _, s := range m.Ids { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *SubjectFilter) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.Ids) > 0 { + for _, s := range m.Ids { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + l = len(m.Relation) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *ExpandTreeNode) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Operation != 0 { + n += 1 + sov(uint64(m.Operation)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Expand) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Entity != nil { + l = m.Entity.SizeVT() + n += 1 + l + sov(uint64(l)) + } + l = len(m.Permission) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.Arguments) > 0 { + for _, e := range m.Arguments { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if vtmsg, ok := m.Node.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Expand_Expand) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Expand != nil { + l = m.Expand.SizeVT() + n += 1 + l + sov(uint64(l)) + } + return n +} +func (m *Expand_Leaf) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Leaf != nil { + l = m.Leaf.SizeVT() + n += 1 + l + sov(uint64(l)) + } + return n +} +func (m *ExpandLeaf) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if vtmsg, ok := m.Type.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *ExpandLeaf_Subjects) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Subjects != nil { + l = m.Subjects.SizeVT() + n += 1 + l + sov(uint64(l)) + } + return n +} +func (m *ExpandLeaf_Values) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Values != nil { + l = m.Values.SizeVT() + n += 1 + l + sov(uint64(l)) + } + return n +} +func (m *ExpandLeaf_Value) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != nil { + if size, ok := interface{}(m.Value).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(m.Value) + } + n += 1 + l + sov(uint64(l)) + } + return n +} +func (m *Values) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Values) > 0 { + for k, v := range m.Values { + _ = k + _ = v + l = 0 + if v != nil { + if size, ok := interface{}(v).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(v) + } + } + l += 1 + sov(uint64(l)) + mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + l + n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + } + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Subjects) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Subjects) > 0 { + for _, e := range m.Subjects { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Tenant) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.CreatedAt != nil { + if size, ok := interface{}(m.CreatedAt).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(m.CreatedAt) + } + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *DataChanges) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SnapToken) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if len(m.DataChanges) > 0 { + for _, e := range m.DataChanges { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *DataChange) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Operation != 0 { + n += 1 + sov(uint64(m.Operation)) + } + if vtmsg, ok := m.Type.(interface{ SizeVT() int }); ok { + n += vtmsg.SizeVT() + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *DataChange_Tuple) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Tuple != nil { + l = m.Tuple.SizeVT() + n += 1 + l + sov(uint64(l)) + } + return n +} +func (m *DataChange_Attribute) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Attribute != nil { + l = m.Attribute.SizeVT() + n += 1 + l + sov(uint64(l)) + } + return n +} +func (m *String) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Value) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Integer) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 1 + sov(uint64(m.Value)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Double) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 9 + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *Boolean) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value { + n += 2 + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *StringArray) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Values) > 0 { + for _, s := range m.Values { + l = len(s) + n += 1 + l + sov(uint64(l)) + } + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *IntegerArray) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Values) > 0 { + l = 0 + for _, e := range m.Values { + l += sov(uint64(e)) + } + n += 1 + sov(uint64(l)) + l + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *DoubleArray) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Values) > 0 { + n += 1 + sov(uint64(len(m.Values)*8)) + len(m.Values)*8 + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *BooleanArray) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Values) > 0 { + n += 1 + sov(uint64(len(m.Values))) + len(m.Values)*1 + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func sov(x uint64) (n int) { + return (bits.Len64(x|1) + 6) / 7 +} +func soz(x uint64) (n int) { + return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Context) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Context: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Context: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tuples", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tuples = append(m.Tuples, &Tuple{}) + if err := m.Tuples[len(m.Tuples)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Data == nil { + m.Data = &structpb.Struct{} + } + if unmarshal, ok := interface{}(m.Data).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Data); err != nil { + return err + } + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Child) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Child: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Child: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Type.(*Child_Leaf); ok { + if err := oneof.Leaf.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Leaf{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Type = &Child_Leaf{v} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rewrite", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Type.(*Child_Rewrite); ok { + if err := oneof.Rewrite.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Rewrite{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Type = &Child_Rewrite{v} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Leaf) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Leaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Leaf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ComputedUserSet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Type.(*Leaf_ComputedUserSet); ok { + if err := oneof.ComputedUserSet.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &ComputedUserSet{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Type = &Leaf_ComputedUserSet{v} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TupleToUserSet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Type.(*Leaf_TupleToUserSet); ok { + if err := oneof.TupleToUserSet.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &TupleToUserSet{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Type = &Leaf_TupleToUserSet{v} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ComputedAttribute", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Type.(*Leaf_ComputedAttribute); ok { + if err := oneof.ComputedAttribute.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &ComputedAttribute{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Type = &Leaf_ComputedAttribute{v} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Call", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Type.(*Leaf_Call); ok { + if err := oneof.Call.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Call{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Type = &Leaf_Call{v} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Rewrite) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Rewrite: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Rewrite: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RewriteOperation", wireType) + } + m.RewriteOperation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RewriteOperation |= Rewrite_Operation(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Children = append(m.Children, &Child{}) + if err := m.Children[len(m.Children)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SchemaDefinition) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SchemaDefinition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SchemaDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EntityDefinitions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.EntityDefinitions == nil { + m.EntityDefinitions = make(map[string]*EntityDefinition) + } + var mapkey string + var mapvalue *EntityDefinition + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLength + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &EntityDefinition{} + if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.EntityDefinitions[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuleDefinitions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RuleDefinitions == nil { + m.RuleDefinitions = make(map[string]*RuleDefinition) + } + var mapkey string + var mapvalue *RuleDefinition + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLength + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &RuleDefinition{} + if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.RuleDefinitions[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field References", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.References == nil { + m.References = make(map[string]SchemaDefinition_Reference) + } + var mapkey string + var mapvalue SchemaDefinition_Reference + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= SchemaDefinition_Reference(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.References[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EntityDefinition) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EntityDefinition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EntityDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Relations == nil { + m.Relations = make(map[string]*RelationDefinition) + } + var mapkey string + var mapvalue *RelationDefinition + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLength + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &RelationDefinition{} + if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Relations[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Permissions == nil { + m.Permissions = make(map[string]*PermissionDefinition) + } + var mapkey string + var mapvalue *PermissionDefinition + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLength + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &PermissionDefinition{} + if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Permissions[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Attributes == nil { + m.Attributes = make(map[string]*AttributeDefinition) + } + var mapkey string + var mapvalue *AttributeDefinition + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLength + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &AttributeDefinition{} + if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Attributes[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field References", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.References == nil { + m.References = make(map[string]EntityDefinition_Reference) + } + var mapkey string + var mapvalue EntityDefinition_Reference + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= EntityDefinition_Reference(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.References[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RuleDefinition) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RuleDefinition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RuleDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Arguments", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Arguments == nil { + m.Arguments = make(map[string]AttributeType) + } + var mapkey string + var mapvalue AttributeType + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= AttributeType(b&0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Arguments[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Expression == nil { + m.Expression = &v1alpha1.CheckedExpr{} + } + if unmarshal, ok := interface{}(m.Expression).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Expression); err != nil { + return err + } + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttributeDefinition) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AttributeDefinition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttributeDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= AttributeType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RelationDefinition) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RelationDefinition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RelationDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RelationReferences", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RelationReferences = append(m.RelationReferences, &RelationReference{}) + if err := m.RelationReferences[len(m.RelationReferences)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PermissionDefinition) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PermissionDefinition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PermissionDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Child", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Child == nil { + m.Child = &Child{} + } + if err := m.Child.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RelationReference) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RelationReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RelationReference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Relation = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Argument) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Argument: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Argument: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ComputedAttribute", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Type.(*Argument_ComputedAttribute); ok { + if err := oneof.ComputedAttribute.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &ComputedAttribute{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Type = &Argument_ComputedAttribute{v} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContextAttribute", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if oneof, ok := m.Type.(*Argument_ContextAttribute); ok { + if err := oneof.ContextAttribute.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &ContextAttribute{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Type = &Argument_ContextAttribute{v} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Call: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Call: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuleName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RuleName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Arguments", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Arguments = append(m.Arguments, &Argument{}) + if err := m.Arguments[len(m.Arguments)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } } - return n -} -func (m *Expand_Expand) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Expand != nil { - l = m.Expand.SizeVT() - n += 1 + l + sov(uint64(l)) - } - return n -} -func (m *Expand_Leaf) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Leaf != nil { - l = m.Leaf.SizeVT() - n += 1 + l + sov(uint64(l)) + if iNdEx > l { + return io.ErrUnexpectedEOF } - return n + return nil } -func (m *Subjects) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Subjects) > 0 { - for _, e := range m.Subjects { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) +func (m *ComputedAttribute) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - } - if m.unknownFields != nil { - n += len(m.unknownFields) - } - return n -} - -func (m *Tenant) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if m.CreatedAt != nil { - if size, ok := interface{}(m.CreatedAt).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.CreatedAt) + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ComputedAttribute: wiretype end group for non-group") } - n += 1 + l + sov(uint64(l)) - } - if m.unknownFields != nil { - n += len(m.unknownFields) - } - return n -} - -func (m *TupleChanges) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SnapToken) - if l > 0 { - n += 1 + l + sov(uint64(l)) - } - if len(m.TupleChanges) > 0 { - for _, e := range m.TupleChanges { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + if fieldNum <= 0 { + return fmt.Errorf("proto: ComputedAttribute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy } } - if m.unknownFields != nil { - n += len(m.unknownFields) - } - return n -} -func (m *TupleChange) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Operation != 0 { - n += 1 + sov(uint64(m.Operation)) - } - if m.Tuple != nil { - l = m.Tuple.SizeVT() - n += 1 + l + sov(uint64(l)) - } - if m.unknownFields != nil { - n += len(m.unknownFields) + if iNdEx > l { + return io.ErrUnexpectedEOF } - return n -} - -func sov(x uint64) (n int) { - return (bits.Len64(x|1) + 6) / 7 -} -func soz(x uint64) (n int) { - return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return nil } -func (m *Child) UnmarshalVT(dAtA []byte) error { +func (m *ContextAttribute) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2111,17 +6590,17 @@ func (m *Child) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Child: wiretype end group for non-group") + return fmt.Errorf("proto: ContextAttribute: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Child: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ContextAttribute: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -2131,38 +6610,80 @@ func (m *Child) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if oneof, ok := m.Type.(*Child_Leaf); ok { - if err := oneof.Leaf.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &Leaf{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Type = &Child_Leaf{v} + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ComputedUserSet) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break } - iNdEx = postIndex - case 2: + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ComputedUserSet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ComputedUserSet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rewrite", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -2172,32 +6693,23 @@ func (m *Child) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if oneof, ok := m.Type.(*Child_Rewrite); ok { - if err := oneof.Rewrite.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &Rewrite{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Type = &Child_Rewrite{v} - } + m.Relation = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2221,7 +6733,7 @@ func (m *Child) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Leaf) UnmarshalVT(dAtA []byte) error { +func (m *TupleToUserSet) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2244,15 +6756,15 @@ func (m *Leaf) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Leaf: wiretype end group for non-group") + return fmt.Errorf("proto: TupleToUserSet: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Leaf: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TupleToUserSet: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ComputedUserSet", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TupleSet", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2279,21 +6791,16 @@ func (m *Leaf) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if oneof, ok := m.Type.(*Leaf_ComputedUserSet); ok { - if err := oneof.ComputedUserSet.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &ComputedUserSet{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Type = &Leaf_ComputedUserSet{v} + if m.TupleSet == nil { + m.TupleSet = &TupleSet{} + } + if err := m.TupleSet.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TupleToUserSet", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Computed", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2320,16 +6827,11 @@ func (m *Leaf) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if oneof, ok := m.Type.(*Leaf_TupleToUserSet); ok { - if err := oneof.TupleToUserSet.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - v := &TupleToUserSet{} - if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Type = &Leaf_TupleToUserSet{v} + if m.Computed == nil { + m.Computed = &ComputedUserSet{} + } + if err := m.Computed.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: @@ -2354,7 +6856,7 @@ func (m *Leaf) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Rewrite) UnmarshalVT(dAtA []byte) error { +func (m *TupleSet) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2377,36 +6879,17 @@ func (m *Rewrite) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Rewrite: wiretype end group for non-group") + return fmt.Errorf("proto: TupleSet: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Rewrite: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TupleSet: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RewriteOperation", wireType) - } - m.RewriteOperation = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RewriteOperation |= Rewrite_Operation(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -2416,25 +6899,23 @@ func (m *Rewrite) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Children = append(m.Children, &Child{}) - if err := m.Children[len(m.Children)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Relation = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2458,7 +6939,7 @@ func (m *Rewrite) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SchemaDefinition) UnmarshalVT(dAtA []byte) error { +func (m *Tuple) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2481,15 +6962,15 @@ func (m *SchemaDefinition) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SchemaDefinition: wiretype end group for non-group") + return fmt.Errorf("proto: Tuple: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SchemaDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Tuple: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EntityDefinitions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Entity", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2516,105 +6997,80 @@ func (m *SchemaDefinition) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.EntityDefinitions == nil { - m.EntityDefinitions = make(map[string]*EntityDefinition) + if m.Entity == nil { + m.Entity = &Entity{} } - var mapkey string - var mapvalue *EntityDefinition - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if err := m.Entity.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLength - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &EntityDefinition{} - if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Relation = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } } - m.EntityDefinitions[mapkey] = mapvalue + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Subject == nil { + m.Subject = &Subject{} + } + if err := m.Subject.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -2638,7 +7094,7 @@ func (m *SchemaDefinition) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *EntityDefinition) UnmarshalVT(dAtA []byte) error { +func (m *Attribute) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2661,15 +7117,51 @@ func (m *EntityDefinition) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EntityDefinition: wiretype end group for non-group") + return fmt.Errorf("proto: Attribute: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EntityDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Attribute: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Entity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Entity == nil { + m.Entity = &Entity{} + } + if err := m.Entity.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attribute", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2697,11 +7189,11 @@ func (m *EntityDefinition) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Attribute = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Relations", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2728,109 +7220,75 @@ func (m *EntityDefinition) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Relations == nil { - m.Relations = make(map[string]*RelationDefinition) + if m.Value == nil { + m.Value = &anypb.Any{} } - var mapkey string - var mapvalue *RelationDefinition - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if unmarshal, ok := interface{}(m.Value).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLength - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &RelationDefinition{} - if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.Value); err != nil { + return err } } - m.Relations[mapkey] = mapvalue iNdEx = postIndex - case 3: + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Tuples) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Tuples: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tuples: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Tuples", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2850,116 +7308,72 @@ func (m *EntityDefinition) UnmarshalVT(dAtA []byte) error { if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen - if postIndex < 0 { + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tuples = append(m.Tuples, &Tuple{}) + if err := m.Tuples[len(m.Tuples)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.Permissions == nil { - m.Permissions = make(map[string]*PermissionDefinition) + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Attributes) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow } - var mapkey string - var mapvalue *PermissionDefinition - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLength - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &PermissionDefinition{} - if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + if iNdEx >= l { + return io.ErrUnexpectedEOF } - m.Permissions[mapkey] = mapvalue - iNdEx = postIndex - case 4: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Attributes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Attributes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field References", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2986,89 +7400,10 @@ func (m *EntityDefinition) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.References == nil { - m.References = make(map[string]EntityDefinition_RelationalReference) - } - var mapkey string - var mapvalue EntityDefinition_RelationalReference - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapvalue |= EntityDefinition_RelationalReference(b&0x7F) << shift - if b < 0x80 { - break - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + m.Attributes = append(m.Attributes, &Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.References[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -3092,7 +7427,7 @@ func (m *EntityDefinition) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *RelationDefinition) UnmarshalVT(dAtA []byte) error { +func (m *Entity) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3115,15 +7450,15 @@ func (m *RelationDefinition) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RelationDefinition: wiretype end group for non-group") + return fmt.Errorf("proto: Entity: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RelationDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Entity: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3151,13 +7486,13 @@ func (m *RelationDefinition) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Type = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RelationReferences", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3167,25 +7502,23 @@ func (m *RelationDefinition) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.RelationReferences = append(m.RelationReferences, &RelationReference{}) - if err := m.RelationReferences[len(m.RelationReferences)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3209,7 +7542,7 @@ func (m *RelationDefinition) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *PermissionDefinition) UnmarshalVT(dAtA []byte) error { +func (m *EntityAndRelation) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3232,17 +7565,17 @@ func (m *PermissionDefinition) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PermissionDefinition: wiretype end group for non-group") + return fmt.Errorf("proto: EntityAndRelation: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PermissionDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EntityAndRelation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Entity", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3252,29 +7585,33 @@ func (m *PermissionDefinition) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + if m.Entity == nil { + m.Entity = &Entity{} + } + if err := m.Entity.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Child", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3284,27 +7621,23 @@ func (m *PermissionDefinition) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Child == nil { - m.Child = &Child{} - } - if err := m.Child.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Relation = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3328,7 +7661,7 @@ func (m *PermissionDefinition) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *RelationReference) UnmarshalVT(dAtA []byte) error { +func (m *Subject) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3351,10 +7684,10 @@ func (m *RelationReference) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RelationReference: wiretype end group for non-group") + return fmt.Errorf("proto: Subject: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RelationReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3390,6 +7723,38 @@ func (m *RelationReference) UnmarshalVT(dAtA []byte) error { m.Type = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) } @@ -3443,7 +7808,7 @@ func (m *RelationReference) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *ComputedUserSet) UnmarshalVT(dAtA []byte) error { +func (m *AttributeFilter) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3466,15 +7831,51 @@ func (m *ComputedUserSet) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ComputedUserSet: wiretype end group for non-group") + return fmt.Errorf("proto: AttributeFilter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ComputedUserSet: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AttributeFilter: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Entity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Entity == nil { + m.Entity = &EntityFilter{} + } + if err := m.Entity.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3502,7 +7903,7 @@ func (m *ComputedUserSet) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Relation = string(dAtA[iNdEx:postIndex]) + m.Attributes = append(m.Attributes, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -3526,7 +7927,7 @@ func (m *ComputedUserSet) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *TupleSet) UnmarshalVT(dAtA []byte) error { +func (m *TupleFilter) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3549,13 +7950,49 @@ func (m *TupleSet) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TupleSet: wiretype end group for non-group") + return fmt.Errorf("proto: TupleFilter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TupleSet: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TupleFilter: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Entity == nil { + m.Entity = &EntityFilter{} + } + if err := m.Entity.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) } @@ -3587,6 +8024,42 @@ func (m *TupleSet) UnmarshalVT(dAtA []byte) error { } m.Relation = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Subject == nil { + m.Subject = &SubjectFilter{} + } + if err := m.Subject.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -3609,7 +8082,7 @@ func (m *TupleSet) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *TupleToUserSet) UnmarshalVT(dAtA []byte) error { +func (m *EntityFilter) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3632,17 +8105,17 @@ func (m *TupleToUserSet) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TupleToUserSet: wiretype end group for non-group") + return fmt.Errorf("proto: EntityFilter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TupleToUserSet: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EntityFilter: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TupleSet", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3652,33 +8125,29 @@ func (m *TupleToUserSet) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.TupleSet == nil { - m.TupleSet = &TupleSet{} - } - if err := m.TupleSet.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Type = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Computed", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3688,27 +8157,23 @@ func (m *TupleToUserSet) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Computed == nil { - m.Computed = &ComputedUserSet{} - } - if err := m.Computed.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -3732,7 +8197,7 @@ func (m *TupleToUserSet) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Tuple) UnmarshalVT(dAtA []byte) error { +func (m *SubjectFilter) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3755,17 +8220,17 @@ func (m *Tuple) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Tuple: wiretype end group for non-group") + return fmt.Errorf("proto: SubjectFilter: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Tuple: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SubjectFilter: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Entity", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3775,31 +8240,27 @@ func (m *Tuple) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Entity == nil { - m.Entity = &Entity{} + return ErrInvalidLength } - if err := m.Entity.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + if postIndex > l { + return io.ErrUnexpectedEOF } + m.Type = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3827,13 +8288,13 @@ func (m *Tuple) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Relation = string(dAtA[iNdEx:postIndex]) + m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -3843,27 +8304,23 @@ func (m *Tuple) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Subject == nil { - m.Subject = &Subject{} - } - if err := m.Subject.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Relation = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3887,7 +8344,7 @@ func (m *Tuple) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Tuples) UnmarshalVT(dAtA []byte) error { +func (m *ExpandTreeNode) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3910,15 +8367,34 @@ func (m *Tuples) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Tuples: wiretype end group for non-group") + return fmt.Errorf("proto: ExpandTreeNode: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Tuples: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExpandTreeNode: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) + } + m.Operation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Operation |= ExpandTreeNode_Operation(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tuples", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3945,8 +8421,8 @@ func (m *Tuples) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Tuples = append(m.Tuples, &Tuple{}) - if err := m.Tuples[len(m.Tuples)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Children = append(m.Children, &Expand{}) + if err := m.Children[len(m.Children)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3972,7 +8448,7 @@ func (m *Tuples) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Entity) UnmarshalVT(dAtA []byte) error { +func (m *Expand) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3995,17 +8471,17 @@ func (m *Entity) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Entity: wiretype end group for non-group") + return fmt.Errorf("proto: Expand: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Entity: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Expand: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Entity", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4015,27 +8491,31 @@ func (m *Entity) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = string(dAtA[iNdEx:postIndex]) + if m.Entity == nil { + m.Entity = &Entity{} + } + if err := m.Entity.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4063,62 +8543,45 @@ func (m *Entity) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + m.Permission = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Arguments", wireType) } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + if msglen < 0 { + return ErrInvalidLength } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EntityAndRelation) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + m.Arguments = append(m.Arguments, &Argument{}) + if err := m.Arguments[len(m.Arguments)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EntityAndRelation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EntityAndRelation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Entity", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Expand", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4145,18 +8608,23 @@ func (m *EntityAndRelation) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Entity == nil { - m.Entity = &Entity{} - } - if err := m.Entity.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err + if oneof, ok := m.Node.(*Expand_Expand); ok { + if err := oneof.Expand.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &ExpandTreeNode{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Node = &Expand_Expand{v} } iNdEx = postIndex - case 2: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4166,23 +8634,32 @@ func (m *EntityAndRelation) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Relation = string(dAtA[iNdEx:postIndex]) + if oneof, ok := m.Node.(*Expand_Leaf); ok { + if err := oneof.Leaf.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &ExpandLeaf{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Node = &Expand_Leaf{v} + } iNdEx = postIndex default: iNdEx = preIndex @@ -4206,7 +8683,7 @@ func (m *EntityAndRelation) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Subject) UnmarshalVT(dAtA []byte) error { +func (m *ExpandLeaf) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4229,17 +8706,17 @@ func (m *Subject) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Subject: wiretype end group for non-group") + return fmt.Errorf("proto: ExpandLeaf: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExpandLeaf: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4249,29 +8726,38 @@ func (m *Subject) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = string(dAtA[iNdEx:postIndex]) + if oneof, ok := m.Type.(*ExpandLeaf_Subjects); ok { + if err := oneof.Subjects.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Subjects{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Type = &ExpandLeaf_Subjects{v} + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4281,29 +8767,38 @@ func (m *Subject) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + if oneof, ok := m.Type.(*ExpandLeaf_Values); ok { + if err := oneof.Values.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + v := &Values{} + if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Type = &ExpandLeaf_Values{v} + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4313,23 +8808,48 @@ func (m *Subject) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Relation = string(dAtA[iNdEx:postIndex]) + if oneof, ok := m.Type.(*ExpandLeaf_Value); ok { + if unmarshal, ok := interface{}(oneof.Value).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], oneof.Value); err != nil { + return err + } + } + } else { + v := &anypb.Any{} + if unmarshal, ok := interface{}(v).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { + return err + } + } + m.Type = &ExpandLeaf_Value{v} + } iNdEx = postIndex default: iNdEx = preIndex @@ -4353,7 +8873,7 @@ func (m *Subject) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *TupleFilter) UnmarshalVT(dAtA []byte) error { +func (m *Values) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4376,15 +8896,15 @@ func (m *TupleFilter) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TupleFilter: wiretype end group for non-group") + return fmt.Errorf("proto: Values: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TupleFilter: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Values: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Entity", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4411,80 +8931,113 @@ func (m *TupleFilter) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Entity == nil { - m.Entity = &EntityFilter{} - } - if err := m.Entity.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Relation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) + if m.Values == nil { + m.Values = make(map[string]*anypb.Any) } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + var mapkey string + var mapvalue *anypb.Any + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLength + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLength + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &anypb.Any{} + if unmarshal, ok := interface{}(mapvalue).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { + return err + } + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Subject == nil { - m.Subject = &SubjectFilter{} - } - if err := m.Subject.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Values[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -4508,7 +9061,7 @@ func (m *TupleFilter) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *EntityFilter) UnmarshalVT(dAtA []byte) error { +func (m *Subjects) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4531,17 +9084,17 @@ func (m *EntityFilter) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EntityFilter: wiretype end group for non-group") + return fmt.Errorf("proto: Subjects: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EntityFilter: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Subjects: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4551,55 +9104,25 @@ func (m *EntityFilter) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF + m.Subjects = append(m.Subjects, &Subject{}) + if err := m.Subjects[len(m.Subjects)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -4623,7 +9146,7 @@ func (m *EntityFilter) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *SubjectFilter) UnmarshalVT(dAtA []byte) error { +func (m *Tenant) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4646,15 +9169,15 @@ func (m *SubjectFilter) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SubjectFilter: wiretype end group for non-group") + return fmt.Errorf("proto: Tenant: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SubjectFilter: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Tenant: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4682,11 +9205,11 @@ func (m *SubjectFilter) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = string(dAtA[iNdEx:postIndex]) + m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4714,13 +9237,13 @@ func (m *SubjectFilter) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Relation", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4730,23 +9253,35 @@ func (m *SubjectFilter) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Relation = string(dAtA[iNdEx:postIndex]) + if m.CreatedAt == nil { + m.CreatedAt = ×tamppb.Timestamp{} + } + if unmarshal, ok := interface{}(m.CreatedAt).(interface { + UnmarshalVT([]byte) error + }); ok { + if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + } else { + if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.CreatedAt); err != nil { + return err + } + } iNdEx = postIndex default: iNdEx = preIndex @@ -4770,7 +9305,7 @@ func (m *SubjectFilter) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *ExpandTreeNode) UnmarshalVT(dAtA []byte) error { +func (m *DataChanges) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4793,17 +9328,17 @@ func (m *ExpandTreeNode) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExpandTreeNode: wiretype end group for non-group") + return fmt.Errorf("proto: DataChanges: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExpandTreeNode: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DataChanges: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SnapToken", wireType) } - m.Operation = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4813,14 +9348,27 @@ func (m *ExpandTreeNode) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Operation |= ExpandTreeNode_Operation(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SnapToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DataChanges", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4847,8 +9395,8 @@ func (m *ExpandTreeNode) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Children = append(m.Children, &Expand{}) - if err := m.Children[len(m.Children)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.DataChanges = append(m.DataChanges, &DataChange{}) + if err := m.DataChanges[len(m.DataChanges)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4874,7 +9422,7 @@ func (m *ExpandTreeNode) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Expand) UnmarshalVT(dAtA []byte) error { +func (m *DataChange) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4897,17 +9445,17 @@ func (m *Expand) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Expand: wiretype end group for non-group") + return fmt.Errorf("proto: DataChange: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Expand: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DataChange: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) } - var msglen int + m.Operation = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -4917,31 +9465,14 @@ func (m *Expand) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Operation |= DataChange_Operation(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Target == nil { - m.Target = &EntityAndRelation{} - } - if err := m.Target.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Expand", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Tuple", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4968,21 +9499,21 @@ func (m *Expand) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if oneof, ok := m.Node.(*Expand_Expand); ok { - if err := oneof.Expand.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if oneof, ok := m.Type.(*DataChange_Tuple); ok { + if err := oneof.Tuple.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } } else { - v := &ExpandTreeNode{} + v := &Tuple{} if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Node = &Expand_Expand{v} + m.Type = &DataChange_Tuple{v} } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Attribute", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5009,16 +9540,16 @@ func (m *Expand) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if oneof, ok := m.Node.(*Expand_Leaf); ok { - if err := oneof.Leaf.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if oneof, ok := m.Type.(*DataChange_Attribute); ok { + if err := oneof.Attribute.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } } else { - v := &Subjects{} + v := &Attribute{} if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } - m.Node = &Expand_Leaf{v} + m.Type = &DataChange_Attribute{v} } iNdEx = postIndex default: @@ -5043,7 +9574,7 @@ func (m *Expand) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Subjects) UnmarshalVT(dAtA []byte) error { +func (m *String) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5066,17 +9597,17 @@ func (m *Subjects) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Subjects: wiretype end group for non-group") + return fmt.Errorf("proto: String: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Subjects: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: String: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -5086,25 +9617,23 @@ func (m *Subjects) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - m.Subjects = append(m.Subjects, &Subject{}) - if err := m.Subjects[len(m.Subjects)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Value = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5128,7 +9657,7 @@ func (m *Subjects) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *Tenant) UnmarshalVT(dAtA []byte) error { +func (m *Integer) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5151,17 +9680,17 @@ func (m *Tenant) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Tenant: wiretype end group for non-group") + return fmt.Errorf("proto: Integer: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Tenant: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Integer: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } - var stringLen uint64 + m.Value = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -5171,29 +9700,129 @@ func (m *Tenant) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Value |= int32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Double) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Double: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Double: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Value = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Boolean) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow } - var stringLen uint64 + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Boolean: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Boolean: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -5203,29 +9832,68 @@ func (m *Tenant) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength + m.Value = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StringArray) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StringArray: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StringArray: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflow @@ -5235,35 +9903,23 @@ func (m *Tenant) UnmarshalVT(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF } - if m.CreatedAt == nil { - m.CreatedAt = ×tamppb.Timestamp{} - } - if unmarshal, ok := interface{}(m.CreatedAt).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.CreatedAt); err != nil { - return err - } - } + m.Values = append(m.Values, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -5287,7 +9943,7 @@ func (m *Tenant) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *TupleChanges) UnmarshalVT(dAtA []byte) error { +func (m *IntegerArray) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5310,78 +9966,193 @@ func (m *TupleChanges) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TupleChanges: wiretype end group for non-group") + return fmt.Errorf("proto: IntegerArray: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TupleChanges: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IntegerArray: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SnapToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { + m.Values = append(m.Values, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Values) == 0 { + m.Values = make([]int32, 0, elementCount) } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Values = append(m.Values, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLength + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + intStringLen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.SnapToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TupleChanges", wireType) + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DoubleArray) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DoubleArray: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DoubleArray: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF } - if iNdEx >= l { + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Values = append(m.Values, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Values) == 0 { + m.Values = make([]float64, 0, elementCount) } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Values = append(m.Values, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TupleChanges = append(m.TupleChanges, &TupleChange{}) - if err := m.TupleChanges[len(m.TupleChanges)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -5404,7 +10175,7 @@ func (m *TupleChanges) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *TupleChange) UnmarshalVT(dAtA []byte) error { +func (m *BooleanArray) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5427,67 +10198,82 @@ func (m *TupleChange) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TupleChange: wiretype end group for non-group") + return fmt.Errorf("proto: BooleanArray: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TupleChange: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BooleanArray: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) - } - m.Operation = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + m.Values = append(m.Values, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - m.Operation |= TupleChange_Operation(b&0x7F) << shift - if b < 0x80 { - break + if packedLen < 0 { + return ErrInvalidLength } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tuple", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLength } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Values) == 0 { + m.Values = make([]bool, 0, elementCount) } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Values = append(m.Values, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } - if msglen < 0 { - return ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tuple == nil { - m.Tuple = &Tuple{} - } - if err := m.Tuple.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) diff --git a/generated/base/v1/errors.pb.go b/generated/base/v1/errors.pb.go index 88a1fd9..f6accd2 100644 --- a/generated/base/v1/errors.pb.go +++ b/generated/base/v1/errors.pb.go @@ -51,6 +51,10 @@ const ( ErrorCode_ERROR_CODE_INVALID_KEY ErrorCode = 2022 ErrorCode_ERROR_CODE_ENTITY_TYPE_REQUIRED ErrorCode = 2023 ErrorCode_ERROR_CODE_NO_ENTITY_REFERENCES_FOUND_IN_SCHEMA ErrorCode = 2024 + ErrorCode_ERROR_CODE_INVALID_ARGUMENT ErrorCode = 2025 + ErrorCode_ERROR_CODE_INVALID_RULE_REFERENCE ErrorCode = 2026 + ErrorCode_ERROR_CODE_NOT_SUPPORTED_WALK ErrorCode = 2027 + ErrorCode_ERROR_CODE_MISSING_ARGUMENT ErrorCode = 2028 // not found ErrorCode_ERROR_CODE_NOT_FOUND ErrorCode = 4000 ErrorCode_ERROR_CODE_ENTITY_TYPE_NOT_FOUND ErrorCode = 4001 @@ -62,6 +66,8 @@ const ( ErrorCode_ERROR_CODE_RELATION_DEFINITION_NOT_FOUND ErrorCode = 4007 ErrorCode_ERROR_CODE_RECORD_NOT_FOUND ErrorCode = 4008 ErrorCode_ERROR_CODE_TENANT_NOT_FOUND ErrorCode = 4009 + ErrorCode_ERROR_CODE_ATTRIBUTE_DEFINITION_NOT_FOUND ErrorCode = 4010 + ErrorCode_ERROR_CODE_ATTRIBUTE_TYPE_MISMATCH ErrorCode = 4011 // internal ErrorCode_ERROR_CODE_INTERNAL ErrorCode = 5000 ErrorCode_ERROR_CODE_CANCELLED ErrorCode = 5001 @@ -106,6 +112,10 @@ var ( 2022: "ERROR_CODE_INVALID_KEY", 2023: "ERROR_CODE_ENTITY_TYPE_REQUIRED", 2024: "ERROR_CODE_NO_ENTITY_REFERENCES_FOUND_IN_SCHEMA", + 2025: "ERROR_CODE_INVALID_ARGUMENT", + 2026: "ERROR_CODE_INVALID_RULE_REFERENCE", + 2027: "ERROR_CODE_NOT_SUPPORTED_WALK", + 2028: "ERROR_CODE_MISSING_ARGUMENT", 4000: "ERROR_CODE_NOT_FOUND", 4001: "ERROR_CODE_ENTITY_TYPE_NOT_FOUND", 4002: "ERROR_CODE_PERMISSION_NOT_FOUND", @@ -116,6 +126,8 @@ var ( 4007: "ERROR_CODE_RELATION_DEFINITION_NOT_FOUND", 4008: "ERROR_CODE_RECORD_NOT_FOUND", 4009: "ERROR_CODE_TENANT_NOT_FOUND", + 4010: "ERROR_CODE_ATTRIBUTE_DEFINITION_NOT_FOUND", + 4011: "ERROR_CODE_ATTRIBUTE_TYPE_MISMATCH", 5000: "ERROR_CODE_INTERNAL", 5001: "ERROR_CODE_CANCELLED", 5002: "ERROR_CODE_SQL_BUILDER", @@ -156,6 +168,10 @@ var ( "ERROR_CODE_INVALID_KEY": 2022, "ERROR_CODE_ENTITY_TYPE_REQUIRED": 2023, "ERROR_CODE_NO_ENTITY_REFERENCES_FOUND_IN_SCHEMA": 2024, + "ERROR_CODE_INVALID_ARGUMENT": 2025, + "ERROR_CODE_INVALID_RULE_REFERENCE": 2026, + "ERROR_CODE_NOT_SUPPORTED_WALK": 2027, + "ERROR_CODE_MISSING_ARGUMENT": 2028, "ERROR_CODE_NOT_FOUND": 4000, "ERROR_CODE_ENTITY_TYPE_NOT_FOUND": 4001, "ERROR_CODE_PERMISSION_NOT_FOUND": 4002, @@ -166,6 +182,8 @@ var ( "ERROR_CODE_RELATION_DEFINITION_NOT_FOUND": 4007, "ERROR_CODE_RECORD_NOT_FOUND": 4008, "ERROR_CODE_TENANT_NOT_FOUND": 4009, + "ERROR_CODE_ATTRIBUTE_DEFINITION_NOT_FOUND": 4010, + "ERROR_CODE_ATTRIBUTE_TYPE_MISMATCH": 4011, "ERROR_CODE_INTERNAL": 5000, "ERROR_CODE_CANCELLED": 5001, "ERROR_CODE_SQL_BUILDER": 5002, @@ -274,7 +292,7 @@ var file_base_v1_errors_proto_rawDesc = []byte{ 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x2a, 0xda, 0x0e, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, + 0x67, 0x65, 0x2a, 0xc3, 0x10, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x1f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4d, 0x49, 0x53, 0x53, 0x49, @@ -344,6 +362,15 @@ var file_base_v1_errors_proto_rawDesc = []byte{ 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x5f, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x53, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x49, 0x4e, 0x5f, 0x53, 0x43, 0x48, 0x45, 0x4d, 0x41, 0x10, 0xe8, + 0x0f, 0x12, 0x20, 0x0a, 0x1b, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, + 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, + 0x10, 0xe9, 0x0f, 0x12, 0x26, 0x0a, 0x21, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, + 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x52, 0x55, 0x4c, 0x45, 0x5f, 0x52, + 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x10, 0xea, 0x0f, 0x12, 0x22, 0x0a, 0x1d, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x55, + 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x57, 0x41, 0x4c, 0x4b, 0x10, 0xeb, 0x0f, 0x12, + 0x20, 0x0a, 0x1b, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4d, 0x49, + 0x53, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0xec, 0x0f, 0x12, 0x19, 0x0a, 0x14, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0xa0, 0x1f, 0x12, 0x25, 0x0a, 0x20, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x4e, 0x54, 0x49, 0x54, @@ -368,34 +395,39 @@ var file_base_v1_errors_proto_rawDesc = []byte{ 0x45, 0x43, 0x4f, 0x52, 0x44, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0xa8, 0x1f, 0x12, 0x20, 0x0a, 0x1b, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, - 0x44, 0x10, 0xa9, 0x1f, 0x12, 0x18, 0x0a, 0x13, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, - 0x44, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x88, 0x27, 0x12, 0x19, - 0x0a, 0x14, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x43, 0x41, 0x4e, - 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x89, 0x27, 0x12, 0x1b, 0x0a, 0x16, 0x45, 0x52, 0x52, - 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x51, 0x4c, 0x5f, 0x42, 0x55, 0x49, 0x4c, - 0x44, 0x45, 0x52, 0x10, 0x8a, 0x27, 0x12, 0x1f, 0x0a, 0x1a, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x43, 0x49, 0x52, 0x43, 0x55, 0x49, 0x54, 0x5f, 0x42, 0x52, 0x45, - 0x41, 0x4b, 0x45, 0x52, 0x10, 0x8b, 0x27, 0x12, 0x19, 0x0a, 0x14, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x10, - 0x8d, 0x27, 0x12, 0x14, 0x0a, 0x0f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, - 0x5f, 0x53, 0x43, 0x41, 0x4e, 0x10, 0x8e, 0x27, 0x12, 0x19, 0x0a, 0x14, 0x45, 0x52, 0x52, 0x4f, - 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4d, 0x49, 0x47, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, - 0x10, 0x8f, 0x27, 0x12, 0x21, 0x0a, 0x1c, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, - 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x10, 0x90, 0x27, 0x12, 0x21, 0x0a, 0x1c, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, - 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x52, - 0x45, 0x54, 0x52, 0x49, 0x45, 0x53, 0x10, 0x91, 0x27, 0x12, 0x18, 0x0a, 0x13, 0x45, 0x52, 0x52, - 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x52, 0x4f, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, - 0x10, 0x92, 0x27, 0x12, 0x39, 0x0a, 0x34, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, - 0x45, 0x5f, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x51, 0x55, - 0x49, 0x52, 0x45, 0x53, 0x5f, 0x4d, 0x4f, 0x52, 0x45, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, 0x4f, - 0x4e, 0x45, 0x5f, 0x46, 0x55, 0x4e, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x93, 0x27, 0x12, 0x1f, - 0x0a, 0x1a, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x54, - 0x5f, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x94, 0x27, 0x42, - 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x65, - 0x72, 0x6d, 0x69, 0x66, 0x79, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x66, 0x79, 0x2f, 0x70, 0x6b, - 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x44, 0x10, 0xa9, 0x1f, 0x12, 0x2e, 0x0a, 0x29, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, + 0x44, 0x45, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x44, 0x45, 0x46, + 0x49, 0x4e, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, + 0x44, 0x10, 0xaa, 0x1f, 0x12, 0x27, 0x0a, 0x22, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, + 0x44, 0x45, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x4d, 0x49, 0x53, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x10, 0xab, 0x1f, 0x12, 0x18, 0x0a, + 0x13, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, + 0x52, 0x4e, 0x41, 0x4c, 0x10, 0x88, 0x27, 0x12, 0x19, 0x0a, 0x14, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, + 0x89, 0x27, 0x12, 0x1b, 0x0a, 0x16, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, + 0x5f, 0x53, 0x51, 0x4c, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x45, 0x52, 0x10, 0x8a, 0x27, 0x12, + 0x1f, 0x0a, 0x1a, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x43, 0x49, + 0x52, 0x43, 0x55, 0x49, 0x54, 0x5f, 0x42, 0x52, 0x45, 0x41, 0x4b, 0x45, 0x52, 0x10, 0x8b, 0x27, + 0x12, 0x19, 0x0a, 0x14, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, + 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x8d, 0x27, 0x12, 0x14, 0x0a, 0x0f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x43, 0x41, 0x4e, 0x10, 0x8e, + 0x27, 0x12, 0x19, 0x0a, 0x14, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, + 0x4d, 0x49, 0x47, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x8f, 0x27, 0x12, 0x21, 0x0a, 0x1c, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x90, 0x27, 0x12, + 0x21, 0x0a, 0x1c, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x52, 0x45, 0x54, 0x52, 0x49, 0x45, 0x53, 0x10, + 0x91, 0x27, 0x12, 0x18, 0x0a, 0x13, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, + 0x5f, 0x52, 0x4f, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x92, 0x27, 0x12, 0x39, 0x0a, 0x34, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x4c, 0x55, + 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x53, 0x5f, 0x4d, 0x4f, + 0x52, 0x45, 0x5f, 0x54, 0x48, 0x41, 0x4e, 0x5f, 0x4f, 0x4e, 0x45, 0x5f, 0x46, 0x55, 0x4e, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x93, 0x27, 0x12, 0x1f, 0x0a, 0x1a, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, + 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x94, 0x27, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x66, 0x79, 0x2f, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x66, 0x79, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x62, 0x61, + 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/generated/base/v1/openapi.pb.go b/generated/base/v1/openapi.pb.go index be7fee9..9d5abb2 100644 --- a/generated/base/v1/openapi.pb.go +++ b/generated/base/v1/openapi.pb.go @@ -78,7 +78,7 @@ var file_base_v1_openapi_proto_rawDesc = []byte{ 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x66, 0x79, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x66, 0x79, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x06, - 0x76, 0x30, 0x2e, 0x34, 0x2e, 0x37, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x76, 0x30, 0x2e, 0x35, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x5a, 0x23, 0x0a, 0x21, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x13, 0x08, diff --git a/generated/base/v1/service.pb.go b/generated/base/v1/service.pb.go index 1731a28..2c807aa 100644 --- a/generated/base/v1/service.pb.go +++ b/generated/base/v1/service.pb.go @@ -12,7 +12,6 @@ import ( _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/emptypb" reflect "reflect" sync "sync" ) @@ -24,19 +23,26 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// PermissionCheckRequest +// PermissionCheckRequest is the request message for the Check method in the Permission service. type PermissionCheckRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // Metadata associated with this request, required. Metadata *PermissionCheckRequestMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` - Entity *Entity `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"` - // its can be permission or relation - Permission string `protobuf:"bytes,4,opt,name=permission,proto3" json:"permission,omitempty"` - Subject *Subject `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` - ContextualTuples []*Tuple `protobuf:"bytes,6,rep,name=contextual_tuples,proto3" json:"contextual_tuples,omitempty"` + // Entity on which the permission needs to be checked, required. + Entity *Entity `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"` + // Name of the permission or relation, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes. + Permission string `protobuf:"bytes,4,opt,name=permission,proto3" json:"permission,omitempty"` + // Subject for which the permission needs to be checked, required. + Subject *Subject `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` + // Context associated with this request. + Context *Context `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"` + // Additional arguments associated with this request. + Arguments []*Argument `protobuf:"bytes,7,rep,name=arguments,proto3" json:"arguments,omitempty"` } func (x *PermissionCheckRequest) Reset() { @@ -106,22 +112,32 @@ func (x *PermissionCheckRequest) GetSubject() *Subject { return nil } -func (x *PermissionCheckRequest) GetContextualTuples() []*Tuple { +func (x *PermissionCheckRequest) GetContext() *Context { + if x != nil { + return x.Context + } + return nil +} + +func (x *PermissionCheckRequest) GetArguments() []*Argument { if x != nil { - return x.ContextualTuples + return x.Arguments } return nil } -// PermissionCheckRequestMetadata +// PermissionCheckRequestMetadata is the metadata associated with a PermissionCheckRequest. type PermissionCheckRequestMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Version of the schema. SchemaVersion string `protobuf:"bytes,1,opt,name=schema_version,proto3" json:"schema_version,omitempty"` - SnapToken string `protobuf:"bytes,2,opt,name=snap_token,proto3" json:"snap_token,omitempty"` - Depth int32 `protobuf:"varint,3,opt,name=depth,proto3" json:"depth,omitempty"` + // Token associated with the snap. + SnapToken string `protobuf:"bytes,2,opt,name=snap_token,proto3" json:"snap_token,omitempty"` + // Depth of the check, must be greater than or equal to 3. + Depth int32 `protobuf:"varint,3,opt,name=depth,proto3" json:"depth,omitempty"` } func (x *PermissionCheckRequestMetadata) Reset() { @@ -177,13 +193,15 @@ func (x *PermissionCheckRequestMetadata) GetDepth() int32 { return 0 } -// PermissionCheckResponse +// PermissionCheckResponse is the response message for the Check method in the Permission service. type PermissionCheckResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Can CheckResult `protobuf:"varint,1,opt,name=can,proto3,enum=base.v1.CheckResult" json:"can,omitempty"` + // Result of the permission check. + Can CheckResult `protobuf:"varint,1,opt,name=can,proto3,enum=base.v1.CheckResult" json:"can,omitempty"` + // Metadata associated with this response. Metadata *PermissionCheckResponseMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` } @@ -223,7 +241,7 @@ func (x *PermissionCheckResponse) GetCan() CheckResult { if x != nil { return x.Can } - return CheckResult_RESULT_UNKNOWN + return CheckResult_CHECK_RESULT_UNSPECIFIED } func (x *PermissionCheckResponse) GetMetadata() *PermissionCheckResponseMetadata { @@ -233,12 +251,13 @@ func (x *PermissionCheckResponse) GetMetadata() *PermissionCheckResponseMetadata return nil } -// CheckResponseMetadata +// PermissionCheckResponseMetadata is the metadata associated with a PermissionCheckResponse. type PermissionCheckResponseMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The count of the checks performed. CheckCount int32 `protobuf:"varint,1,opt,name=check_count,proto3" json:"check_count,omitempty"` } @@ -281,17 +300,24 @@ func (x *PermissionCheckResponseMetadata) GetCheckCount() int32 { return 0 } -// PermissionExpandRequest +// PermissionExpandRequest is the request message for the Expand method in the Permission service. type PermissionExpandRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` - Metadata *PermissionExpandRequestMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` - Entity *Entity `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"` - Permission string `protobuf:"bytes,4,opt,name=permission,proto3" json:"permission,omitempty"` - ContextualTuples []*Tuple `protobuf:"bytes,5,rep,name=contextual_tuples,proto3" json:"contextual_tuples,omitempty"` + // Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // Metadata associated with this request, required. + Metadata *PermissionExpandRequestMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Entity on which the permission needs to be expanded, required. + Entity *Entity `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"` + // Name of the permission to be expanded, not required, must start with a letter and can include alphanumeric and underscore, max 64 bytes. + Permission string `protobuf:"bytes,4,opt,name=permission,proto3" json:"permission,omitempty"` + // Context associated with this request. + Context *Context `protobuf:"bytes,5,opt,name=context,proto3" json:"context,omitempty"` + // Additional arguments associated with this request. + Arguments []*Argument `protobuf:"bytes,6,rep,name=arguments,proto3" json:"arguments,omitempty"` } func (x *PermissionExpandRequest) Reset() { @@ -354,21 +380,30 @@ func (x *PermissionExpandRequest) GetPermission() string { return "" } -func (x *PermissionExpandRequest) GetContextualTuples() []*Tuple { +func (x *PermissionExpandRequest) GetContext() *Context { if x != nil { - return x.ContextualTuples + return x.Context } return nil } -// PermissionExpandRequestMetadata +func (x *PermissionExpandRequest) GetArguments() []*Argument { + if x != nil { + return x.Arguments + } + return nil +} + +// PermissionExpandRequestMetadata is the metadata associated with a PermissionExpandRequest. type PermissionExpandRequestMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Version of the schema. SchemaVersion string `protobuf:"bytes,1,opt,name=schema_version,proto3" json:"schema_version,omitempty"` - SnapToken string `protobuf:"bytes,2,opt,name=snap_token,proto3" json:"snap_token,omitempty"` + // Token associated with the snap. + SnapToken string `protobuf:"bytes,2,opt,name=snap_token,proto3" json:"snap_token,omitempty"` } func (x *PermissionExpandRequestMetadata) Reset() { @@ -417,12 +452,13 @@ func (x *PermissionExpandRequestMetadata) GetSnapToken() string { return "" } -// PermissionExpandResponse +// PermissionExpandResponse is the response message for the Expand method in the Permission service. type PermissionExpandResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Expansion tree. Tree *Expand `protobuf:"bytes,1,opt,name=tree,proto3" json:"tree,omitempty"` } @@ -465,18 +501,24 @@ func (x *PermissionExpandResponse) GetTree() *Expand { return nil } -// PermissionLookupEntityRequest +// PermissionLookupEntityRequest is the request message for the LookupEntity method in the Permission service. type PermissionLookupEntityRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` - Metadata *PermissionLookupEntityRequestMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` - EntityType string `protobuf:"bytes,3,opt,name=entity_type,proto3" json:"entity_type,omitempty"` - Permission string `protobuf:"bytes,4,opt,name=permission,proto3" json:"permission,omitempty"` - Subject *Subject `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` - ContextualTuples []*Tuple `protobuf:"bytes,6,rep,name=contextual_tuples,proto3" json:"contextual_tuples,omitempty"` + // Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // Metadata associated with this request, required. + Metadata *PermissionLookupEntityRequestMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Type of the entity to lookup, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes. + EntityType string `protobuf:"bytes,3,opt,name=entity_type,proto3" json:"entity_type,omitempty"` + // Name of the permission to check, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes. + Permission string `protobuf:"bytes,4,opt,name=permission,proto3" json:"permission,omitempty"` + // Subject for which to check the permission, required. + Subject *Subject `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"` + // Context associated with this request. + Context *Context `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"` } func (x *PermissionLookupEntityRequest) Reset() { @@ -546,22 +588,25 @@ func (x *PermissionLookupEntityRequest) GetSubject() *Subject { return nil } -func (x *PermissionLookupEntityRequest) GetContextualTuples() []*Tuple { +func (x *PermissionLookupEntityRequest) GetContext() *Context { if x != nil { - return x.ContextualTuples + return x.Context } return nil } -// PermissionLookupEntityRequestMetadata +// PermissionLookupEntityRequestMetadata is the metadata associated with a PermissionLookupEntityRequest. type PermissionLookupEntityRequestMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Version of the schema. SchemaVersion string `protobuf:"bytes,1,opt,name=schema_version,proto3" json:"schema_version,omitempty"` - SnapToken string `protobuf:"bytes,2,opt,name=snap_token,proto3" json:"snap_token,omitempty"` - Depth int32 `protobuf:"varint,3,opt,name=depth,proto3" json:"depth,omitempty"` + // Token associated with the snap. + SnapToken string `protobuf:"bytes,2,opt,name=snap_token,proto3" json:"snap_token,omitempty"` + // Depth of lookup, required, must be greater or equal to 3. + Depth int32 `protobuf:"varint,3,opt,name=depth,proto3" json:"depth,omitempty"` } func (x *PermissionLookupEntityRequestMetadata) Reset() { @@ -617,12 +662,13 @@ func (x *PermissionLookupEntityRequestMetadata) GetDepth() int32 { return 0 } -// PermissionLookupEntityResponse +// PermissionLookupEntityResponse is the response message for the LookupEntity method in the Permission service. type PermissionLookupEntityResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // List of identifiers for entities that match the lookup. EntityIds []string `protobuf:"bytes,1,rep,name=entity_ids,proto3" json:"entity_ids,omitempty"` } @@ -665,12 +711,13 @@ func (x *PermissionLookupEntityResponse) GetEntityIds() []string { return nil } -// PermissionLookupEntityStreamResponse +// PermissionLookupEntityStreamResponse is the response message for the LookupEntityStream method in the Permission service. type PermissionLookupEntityStreamResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Identifier for an entity that matches the lookup. EntityId string `protobuf:"bytes,1,opt,name=entity_id,proto3" json:"entity_id,omitempty"` } @@ -713,17 +760,22 @@ func (x *PermissionLookupEntityStreamResponse) GetEntityId() string { return "" } -// PermissionEntityFilterRequest +// PermissionEntityFilterRequest is the request message for the LookupEntityStream method in the Permission service. type PermissionEntityFilterRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` - Metadata *PermissionEntityFilterRequestMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` - EntityReference *RelationReference `protobuf:"bytes,3,opt,name=entity_reference,proto3" json:"entity_reference,omitempty"` - Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` - ContextualTuples []*Tuple `protobuf:"bytes,5,rep,name=contextual_tuples,proto3" json:"contextual_tuples,omitempty"` + // Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // Metadata associated with this request, required. + Metadata *PermissionEntityFilterRequestMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Reference to the entity to filter. + EntityReference *RelationReference `protobuf:"bytes,3,opt,name=entity_reference,proto3" json:"entity_reference,omitempty"` + // Subject for which to check the permission. + Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` + // Context associated with this request. + Context *Context `protobuf:"bytes,5,opt,name=context,proto3" json:"context,omitempty"` } func (x *PermissionEntityFilterRequest) Reset() { @@ -786,22 +838,25 @@ func (x *PermissionEntityFilterRequest) GetSubject() *Subject { return nil } -func (x *PermissionEntityFilterRequest) GetContextualTuples() []*Tuple { +func (x *PermissionEntityFilterRequest) GetContext() *Context { if x != nil { - return x.ContextualTuples + return x.Context } return nil } -// PermissionEntityFilterRequestMetadata +// PermissionEntityFilterRequestMetadata is the metadata associated with a PermissionEntityFilterRequest. type PermissionEntityFilterRequestMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Version of the schema. SchemaVersion string `protobuf:"bytes,1,opt,name=schema_version,proto3" json:"schema_version,omitempty"` - SnapToken string `protobuf:"bytes,2,opt,name=snap_token,proto3" json:"snap_token,omitempty"` - Depth int32 `protobuf:"varint,3,opt,name=depth,proto3" json:"depth,omitempty"` + // Token associated with the snap. + SnapToken string `protobuf:"bytes,2,opt,name=snap_token,proto3" json:"snap_token,omitempty"` + // Depth of lookup, required, must be greater or equal to 3. + Depth int32 `protobuf:"varint,3,opt,name=depth,proto3" json:"depth,omitempty"` } func (x *PermissionEntityFilterRequestMetadata) Reset() { @@ -857,19 +912,24 @@ func (x *PermissionEntityFilterRequestMetadata) GetDepth() int32 { return 0 } -// PermissionLookupSubjectRequest +// PermissionLookupSubjectRequest is the request message for the LookupSubject method in the Permission service. type PermissionLookupSubjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // Metadata associated with this request, required. Metadata *PermissionLookupSubjectRequestMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` - Entity *Entity `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"` - // its can be permission or relation - Permission string `protobuf:"bytes,4,opt,name=permission,proto3" json:"permission,omitempty"` + // Entity for which to check the permission, required. + Entity *Entity `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"` + // Permission to be checked, can be a permission or relation. Required, and must match the pattern "^([a-zA-Z][a-zA-Z0-9_]{1,62}[a-zA-Z0-9])$", max 64 bytes. + Permission string `protobuf:"bytes,4,opt,name=permission,proto3" json:"permission,omitempty"` + // Reference to the subject to lookup. SubjectReference *RelationReference `protobuf:"bytes,5,opt,name=subject_reference,proto3" json:"subject_reference,omitempty"` - ContextualTuples []*Tuple `protobuf:"bytes,6,rep,name=contextual_tuples,proto3" json:"contextual_tuples,omitempty"` + // Context associated with this request. + Context *Context `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"` } func (x *PermissionLookupSubjectRequest) Reset() { @@ -939,21 +999,25 @@ func (x *PermissionLookupSubjectRequest) GetSubjectReference() *RelationReferenc return nil } -func (x *PermissionLookupSubjectRequest) GetContextualTuples() []*Tuple { +func (x *PermissionLookupSubjectRequest) GetContext() *Context { if x != nil { - return x.ContextualTuples + return x.Context } return nil } -// PermissionLookupSubjectRequestMetadata +// PermissionLookupSubjectRequestMetadata is the metadata associated with a PermissionLookupSubjectRequest. type PermissionLookupSubjectRequestMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Version of the schema. SchemaVersion string `protobuf:"bytes,1,opt,name=schema_version,proto3" json:"schema_version,omitempty"` - SnapToken string `protobuf:"bytes,2,opt,name=snap_token,proto3" json:"snap_token,omitempty"` + // Token associated with the snap. + SnapToken string `protobuf:"bytes,2,opt,name=snap_token,proto3" json:"snap_token,omitempty"` + // Depth of the check, must be greater than or equal to 3. + Depth int32 `protobuf:"varint,3,opt,name=depth,proto3" json:"depth,omitempty"` } func (x *PermissionLookupSubjectRequestMetadata) Reset() { @@ -1002,12 +1066,20 @@ func (x *PermissionLookupSubjectRequestMetadata) GetSnapToken() string { return "" } -// PermissionLookupSubjectResponse +func (x *PermissionLookupSubjectRequestMetadata) GetDepth() int32 { + if x != nil { + return x.Depth + } + return 0 +} + +// PermissionLookupSubjectResponse is the response message for the LookupSubject method in the Permission service. type PermissionLookupSubjectResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // List of identifiers for subjects that match the lookup. SubjectIds []string `protobuf:"bytes,1,rep,name=subject_ids,proto3" json:"subject_ids,omitempty"` } @@ -1050,16 +1122,22 @@ func (x *PermissionLookupSubjectResponse) GetSubjectIds() []string { return nil } +// PermissionSubjectPermissionRequest is the request message for the SubjectPermission method in the Permission service. type PermissionSubjectPermissionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` - Metadata *PermissionSubjectPermissionRequestMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` - Entity *Entity `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"` - Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` - ContextualTuples []*Tuple `protobuf:"bytes,5,rep,name=contextual_tuples,proto3" json:"contextual_tuples,omitempty"` + // Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // Metadata associated with this request, required. + Metadata *PermissionSubjectPermissionRequestMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Entity for which to check the permission, required. + Entity *Entity `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"` + // Subject for which to check the permission, required. + Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` + // Context associated with this request. + Context *Context `protobuf:"bytes,5,opt,name=context,proto3" json:"context,omitempty"` } func (x *PermissionSubjectPermissionRequest) Reset() { @@ -1122,23 +1200,27 @@ func (x *PermissionSubjectPermissionRequest) GetSubject() *Subject { return nil } -func (x *PermissionSubjectPermissionRequest) GetContextualTuples() []*Tuple { +func (x *PermissionSubjectPermissionRequest) GetContext() *Context { if x != nil { - return x.ContextualTuples + return x.Context } return nil } -// PermissionCheckRequestMetadata +// PermissionSubjectPermissionRequestMetadata is the metadata associated with a PermissionSubjectPermissionRequest. type PermissionSubjectPermissionRequestMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SchemaVersion string `protobuf:"bytes,1,opt,name=schema_version,proto3" json:"schema_version,omitempty"` - SnapToken string `protobuf:"bytes,2,opt,name=snap_token,proto3" json:"snap_token,omitempty"` - OnlyPermission bool `protobuf:"varint,3,opt,name=only_permission,proto3" json:"only_permission,omitempty"` - Depth int32 `protobuf:"varint,4,opt,name=depth,proto3" json:"depth,omitempty"` + // Version of the schema. + SchemaVersion string `protobuf:"bytes,1,opt,name=schema_version,proto3" json:"schema_version,omitempty"` + // Token associated with the snap. + SnapToken string `protobuf:"bytes,2,opt,name=snap_token,proto3" json:"snap_token,omitempty"` + // Whether to only check permissions. + OnlyPermission bool `protobuf:"varint,3,opt,name=only_permission,proto3" json:"only_permission,omitempty"` + // Depth of the check, must be greater than or equal to 3. + Depth int32 `protobuf:"varint,4,opt,name=depth,proto3" json:"depth,omitempty"` } func (x *PermissionSubjectPermissionRequestMetadata) Reset() { @@ -1201,12 +1283,13 @@ func (x *PermissionSubjectPermissionRequestMetadata) GetDepth() int32 { return 0 } -// SubjectPermissionResponse +// PermissionSubjectPermissionResponse is the response message for the SubjectPermission method in the Permission service. type PermissionSubjectPermissionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Map of results for each permission check. Results map[string]CheckResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=base.v1.CheckResult"` } @@ -1249,13 +1332,16 @@ func (x *PermissionSubjectPermissionResponse) GetResults() map[string]CheckResul return nil } -// WatchRequest +// WatchRequest is the request message for the Watch RPC. It contains the +// details needed to establish a watch stream. type WatchRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // Snap token to be used for watching. SnapToken string `protobuf:"bytes,2,opt,name=snap_token,proto3" json:"snap_token,omitempty"` } @@ -1305,13 +1391,15 @@ func (x *WatchRequest) GetSnapToken() string { return "" } -// WatchResponse +// WatchResponse is the response message for the Watch RPC. It contains the +// changes in the data that are being watched. type WatchResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Changes *TupleChanges `protobuf:"bytes,1,opt,name=changes,proto3" json:"changes,omitempty"` + // Changes in the data. + Changes *DataChanges `protobuf:"bytes,1,opt,name=changes,proto3" json:"changes,omitempty"` } func (x *WatchResponse) Reset() { @@ -1346,21 +1434,25 @@ func (*WatchResponse) Descriptor() ([]byte, []int) { return file_base_v1_service_proto_rawDescGZIP(), []int{20} } -func (x *WatchResponse) GetChanges() *TupleChanges { +func (x *WatchResponse) GetChanges() *DataChanges { if x != nil { return x.Changes } return nil } -// SchemaWriteRequest +// SchemaWriteRequest is the request message for the Write method in the Schema service. +// It contains tenant_id and the schema to be written. type SchemaWriteRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // tenant_id is a string that identifies the tenant. It must match the pattern "[a-zA-Z0-9-,]+", + // be a maximum of 64 bytes, and must not be empty. TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` - Schema string `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` + // schema is the string representation of the schema to be written. + Schema string `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` } func (x *SchemaWriteRequest) Reset() { @@ -1409,12 +1501,14 @@ func (x *SchemaWriteRequest) GetSchema() string { return "" } -// SchemaWriteResponse +// SchemaWriteResponse is the response message for the Write method in the Schema service. +// It returns the version of the written schema. type SchemaWriteResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // schema_version is the string that identifies the version of the written schema. SchemaVersion string `protobuf:"bytes,1,opt,name=schema_version,proto3" json:"schema_version,omitempty"` } @@ -1457,13 +1551,17 @@ func (x *SchemaWriteResponse) GetSchemaVersion() string { return "" } -// SchemaReadRequest +// SchemaReadRequest is the request message for the Read method in the Schema service. +// It contains tenant_id and metadata about the schema to be read. type SchemaReadRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // tenant_id is a string that identifies the tenant. It must match the pattern "[a-zA-Z0-9-,]+", + // be a maximum of 64 bytes, and must not be empty. + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // metadata is the additional information needed for the Read request. Metadata *SchemaReadRequestMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` } @@ -1513,12 +1611,14 @@ func (x *SchemaReadRequest) GetMetadata() *SchemaReadRequestMetadata { return nil } -// SchemaReadRequestMetadata +// SchemaReadRequestMetadata provides additional information for the Schema Read request. +// It contains schema_version to specify which version of the schema should be read. type SchemaReadRequestMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // schema_version is the string that identifies the version of the schema to be read. SchemaVersion string `protobuf:"bytes,1,opt,name=schema_version,proto3" json:"schema_version,omitempty"` } @@ -1561,12 +1661,14 @@ func (x *SchemaReadRequestMetadata) GetSchemaVersion() string { return "" } -// SchemaReadRequest +// SchemaReadResponse is the response message for the Read method in the Schema service. +// It returns the requested schema. type SchemaReadResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // schema is the SchemaDefinition that represents the read schema. Schema *SchemaDefinition `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` } @@ -1609,21 +1711,202 @@ func (x *SchemaReadResponse) GetSchema() *SchemaDefinition { return nil } -// RelationshipWriteRequest +// DataWriteRequest defines the structure of a request for writing data. +// It contains the necessary information such as tenant_id, metadata, +// tuples and attributes for the write operation. +type DataWriteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tenant_id represents the unique identifier of the tenant for which data is written. + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // metadata holds additional data related to the request. + Metadata *DataWriteRequestMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + // tuples contains the list of tuples (entity-relation-entity triples) that need to be written. + Tuples []*Tuple `protobuf:"bytes,3,rep,name=tuples,proto3" json:"tuples,omitempty"` + // attributes contains the list of attributes (entity-attribute-value triples) that need to be written. + Attributes []*Attribute `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *DataWriteRequest) Reset() { + *x = DataWriteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataWriteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataWriteRequest) ProtoMessage() {} + +func (x *DataWriteRequest) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_service_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 DataWriteRequest.ProtoReflect.Descriptor instead. +func (*DataWriteRequest) Descriptor() ([]byte, []int) { + return file_base_v1_service_proto_rawDescGZIP(), []int{26} +} + +func (x *DataWriteRequest) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + +func (x *DataWriteRequest) GetMetadata() *DataWriteRequestMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *DataWriteRequest) GetTuples() []*Tuple { + if x != nil { + return x.Tuples + } + return nil +} + +func (x *DataWriteRequest) GetAttributes() []*Attribute { + if x != nil { + return x.Attributes + } + return nil +} + +// DataWriteRequestMetadata defines the structure of metadata for a write request. +// It includes the schema version of the data to be written. +type DataWriteRequestMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // schema_version represents the version of the schema for the data being written. + SchemaVersion string `protobuf:"bytes,1,opt,name=schema_version,proto3" json:"schema_version,omitempty"` +} + +func (x *DataWriteRequestMetadata) Reset() { + *x = DataWriteRequestMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataWriteRequestMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataWriteRequestMetadata) ProtoMessage() {} + +func (x *DataWriteRequestMetadata) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_service_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 DataWriteRequestMetadata.ProtoReflect.Descriptor instead. +func (*DataWriteRequestMetadata) Descriptor() ([]byte, []int) { + return file_base_v1_service_proto_rawDescGZIP(), []int{27} +} + +func (x *DataWriteRequestMetadata) GetSchemaVersion() string { + if x != nil { + return x.SchemaVersion + } + return "" +} + +// DataWriteResponse defines the structure of the response after writing data. +// It contains the snap_token generated after the write operation. +type DataWriteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // snap_token is the token generated after the data write operation, representing a snapshot of the data. + SnapToken string `protobuf:"bytes,1,opt,name=snap_token,proto3" json:"snap_token,omitempty"` +} + +func (x *DataWriteResponse) Reset() { + *x = DataWriteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataWriteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataWriteResponse) ProtoMessage() {} + +func (x *DataWriteResponse) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_service_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 DataWriteResponse.ProtoReflect.Descriptor instead. +func (*DataWriteResponse) Descriptor() ([]byte, []int) { + return file_base_v1_service_proto_rawDescGZIP(), []int{28} +} + +func (x *DataWriteResponse) GetSnapToken() string { + if x != nil { + return x.SnapToken + } + return "" +} + +// Represents a request to write relationship data. type RelationshipWriteRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // Unique identifier for the tenant with specific constraints. + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // Metadata for the request. It's required. Metadata *RelationshipWriteRequestMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` - Tuples []*Tuple `protobuf:"bytes,3,rep,name=tuples,proto3" json:"tuples,omitempty"` + // List of tuples for the request. Must have between 1 and 100 items. + Tuples []*Tuple `protobuf:"bytes,3,rep,name=tuples,proto3" json:"tuples,omitempty"` } func (x *RelationshipWriteRequest) Reset() { *x = RelationshipWriteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_service_proto_msgTypes[26] + mi := &file_base_v1_service_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1636,7 +1919,7 @@ func (x *RelationshipWriteRequest) String() string { func (*RelationshipWriteRequest) ProtoMessage() {} func (x *RelationshipWriteRequest) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_service_proto_msgTypes[26] + mi := &file_base_v1_service_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1649,7 +1932,7 @@ func (x *RelationshipWriteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RelationshipWriteRequest.ProtoReflect.Descriptor instead. func (*RelationshipWriteRequest) Descriptor() ([]byte, []int) { - return file_base_v1_service_proto_rawDescGZIP(), []int{26} + return file_base_v1_service_proto_rawDescGZIP(), []int{29} } func (x *RelationshipWriteRequest) GetTenantId() string { @@ -1685,7 +1968,7 @@ type RelationshipWriteRequestMetadata struct { func (x *RelationshipWriteRequestMetadata) Reset() { *x = RelationshipWriteRequestMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_service_proto_msgTypes[27] + mi := &file_base_v1_service_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1698,7 +1981,7 @@ func (x *RelationshipWriteRequestMetadata) String() string { func (*RelationshipWriteRequestMetadata) ProtoMessage() {} func (x *RelationshipWriteRequestMetadata) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_service_proto_msgTypes[27] + mi := &file_base_v1_service_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1711,7 +1994,7 @@ func (x *RelationshipWriteRequestMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use RelationshipWriteRequestMetadata.ProtoReflect.Descriptor instead. func (*RelationshipWriteRequestMetadata) Descriptor() ([]byte, []int) { - return file_base_v1_service_proto_rawDescGZIP(), []int{27} + return file_base_v1_service_proto_rawDescGZIP(), []int{30} } func (x *RelationshipWriteRequestMetadata) GetSchemaVersion() string { @@ -1733,7 +2016,7 @@ type RelationshipWriteResponse struct { func (x *RelationshipWriteResponse) Reset() { *x = RelationshipWriteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_service_proto_msgTypes[28] + mi := &file_base_v1_service_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1746,7 +2029,7 @@ func (x *RelationshipWriteResponse) String() string { func (*RelationshipWriteResponse) ProtoMessage() {} func (x *RelationshipWriteResponse) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_service_proto_msgTypes[28] + mi := &file_base_v1_service_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1759,7 +2042,7 @@ func (x *RelationshipWriteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RelationshipWriteResponse.ProtoReflect.Descriptor instead. func (*RelationshipWriteResponse) Descriptor() ([]byte, []int) { - return file_base_v1_service_proto_rawDescGZIP(), []int{28} + return file_base_v1_service_proto_rawDescGZIP(), []int{31} } func (x *RelationshipWriteResponse) GetSnapToken() string { @@ -1769,23 +2052,30 @@ func (x *RelationshipWriteResponse) GetSnapToken() string { return "" } -// RelationshipReadRequest +// RelationshipReadRequest defines the structure of a request for reading relationships. +// It contains the necessary information such as tenant_id, metadata, and filter for the read operation. type RelationshipReadRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` - Metadata *RelationshipReadRequestMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` - Filter *TupleFilter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` - PageSize uint32 `protobuf:"varint,4,opt,name=page_size,proto3" json:"page_size,omitempty"` - ContinuousToken string `protobuf:"bytes,5,opt,name=continuous_token,proto3" json:"continuous_token,omitempty"` + // tenant_id represents the unique identifier of the tenant for which relationships are read. + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // metadata holds additional data related to the request. + Metadata *RelationshipReadRequestMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + // filter is used to specify criteria for the data that needs to be read. + Filter *TupleFilter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` + // page_size specifies the number of results to return in a single page. + // If more results are available, a continuous_token is included in the response. + PageSize uint32 `protobuf:"varint,4,opt,name=page_size,proto3" json:"page_size,omitempty"` + // continuous_token is used in case of paginated reads to get the next page of results. + ContinuousToken string `protobuf:"bytes,5,opt,name=continuous_token,proto3" json:"continuous_token,omitempty"` } func (x *RelationshipReadRequest) Reset() { *x = RelationshipReadRequest{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_service_proto_msgTypes[29] + mi := &file_base_v1_service_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1798,7 +2088,7 @@ func (x *RelationshipReadRequest) String() string { func (*RelationshipReadRequest) ProtoMessage() {} func (x *RelationshipReadRequest) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_service_proto_msgTypes[29] + mi := &file_base_v1_service_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1811,7 +2101,7 @@ func (x *RelationshipReadRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RelationshipReadRequest.ProtoReflect.Descriptor instead. func (*RelationshipReadRequest) Descriptor() ([]byte, []int) { - return file_base_v1_service_proto_rawDescGZIP(), []int{29} + return file_base_v1_service_proto_rawDescGZIP(), []int{32} } func (x *RelationshipReadRequest) GetTenantId() string { @@ -1849,19 +2139,21 @@ func (x *RelationshipReadRequest) GetContinuousToken() string { return "" } -// RelationshipWriteRequestMetadata +// RelationshipReadRequestMetadata defines the structure of the metadata for a read request focused on relationships. +// It includes the snap_token associated with a particular state of the database. type RelationshipReadRequestMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // snap_token represents a specific state or "snapshot" of the database. SnapToken string `protobuf:"bytes,1,opt,name=snap_token,proto3" json:"snap_token,omitempty"` } func (x *RelationshipReadRequestMetadata) Reset() { *x = RelationshipReadRequestMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_service_proto_msgTypes[30] + mi := &file_base_v1_service_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1874,7 +2166,7 @@ func (x *RelationshipReadRequestMetadata) String() string { func (*RelationshipReadRequestMetadata) ProtoMessage() {} func (x *RelationshipReadRequestMetadata) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_service_proto_msgTypes[30] + mi := &file_base_v1_service_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1887,7 +2179,7 @@ func (x *RelationshipReadRequestMetadata) ProtoReflect() protoreflect.Message { // Deprecated: Use RelationshipReadRequestMetadata.ProtoReflect.Descriptor instead. func (*RelationshipReadRequestMetadata) Descriptor() ([]byte, []int) { - return file_base_v1_service_proto_rawDescGZIP(), []int{30} + return file_base_v1_service_proto_rawDescGZIP(), []int{33} } func (x *RelationshipReadRequestMetadata) GetSnapToken() string { @@ -1897,20 +2189,23 @@ func (x *RelationshipReadRequestMetadata) GetSnapToken() string { return "" } -// RelationshipReadResponse +// RelationshipReadResponse defines the structure of the response after reading relationships. +// It includes the tuples representing the relationships and a continuous token for handling result pagination. type RelationshipReadResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Tuples []*Tuple `protobuf:"bytes,1,rep,name=tuples,proto3" json:"tuples,omitempty"` - ContinuousToken string `protobuf:"bytes,2,opt,name=continuous_token,proto3" json:"continuous_token,omitempty"` + // tuples is a list of the relationships retrieved in the read operation, represented as entity-relation-entity triples. + Tuples []*Tuple `protobuf:"bytes,1,rep,name=tuples,proto3" json:"tuples,omitempty"` + // continuous_token is used in the case of paginated reads to retrieve the next page of results. + ContinuousToken string `protobuf:"bytes,2,opt,name=continuous_token,proto3" json:"continuous_token,omitempty"` } func (x *RelationshipReadResponse) Reset() { *x = RelationshipReadResponse{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_service_proto_msgTypes[31] + mi := &file_base_v1_service_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1923,7 +2218,7 @@ func (x *RelationshipReadResponse) String() string { func (*RelationshipReadResponse) ProtoMessage() {} func (x *RelationshipReadResponse) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_service_proto_msgTypes[31] + mi := &file_base_v1_service_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1936,7 +2231,7 @@ func (x *RelationshipReadResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RelationshipReadResponse.ProtoReflect.Descriptor instead. func (*RelationshipReadResponse) Descriptor() ([]byte, []int) { - return file_base_v1_service_proto_rawDescGZIP(), []int{31} + return file_base_v1_service_proto_rawDescGZIP(), []int{34} } func (x *RelationshipReadResponse) GetTuples() []*Tuple { @@ -1953,33 +2248,43 @@ func (x *RelationshipReadResponse) GetContinuousToken() string { return "" } -// RelationshipDeleteRequest -type RelationshipDeleteRequest struct { +// AttributeReadRequest defines the structure of a request for reading attributes. +// It includes the tenant_id, metadata, attribute filter, page size for pagination, and a continuous token for multi-page results. +type AttributeReadRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` - Filter *TupleFilter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` -} - -func (x *RelationshipDeleteRequest) Reset() { - *x = RelationshipDeleteRequest{} + // tenant_id represents the unique identifier of the tenant from which the attributes are being read. + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // metadata holds additional information related to the request. + Metadata *AttributeReadRequestMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + // filter specifies the criteria used to select the attributes that should be returned. + Filter *AttributeFilter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` + // page_size specifies the number of results to return in a single page. + // If more results are available, a continuous_token is included in the response. + PageSize uint32 `protobuf:"varint,4,opt,name=page_size,proto3" json:"page_size,omitempty"` + // continuous_token is used in case of paginated reads to get the next page of results. + ContinuousToken string `protobuf:"bytes,5,opt,name=continuous_token,proto3" json:"continuous_token,omitempty"` +} + +func (x *AttributeReadRequest) Reset() { + *x = AttributeReadRequest{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_service_proto_msgTypes[32] + mi := &file_base_v1_service_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RelationshipDeleteRequest) String() string { +func (x *AttributeReadRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RelationshipDeleteRequest) ProtoMessage() {} +func (*AttributeReadRequest) ProtoMessage() {} -func (x *RelationshipDeleteRequest) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_service_proto_msgTypes[32] +func (x *AttributeReadRequest) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_service_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1990,51 +2295,74 @@ func (x *RelationshipDeleteRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RelationshipDeleteRequest.ProtoReflect.Descriptor instead. -func (*RelationshipDeleteRequest) Descriptor() ([]byte, []int) { - return file_base_v1_service_proto_rawDescGZIP(), []int{32} +// Deprecated: Use AttributeReadRequest.ProtoReflect.Descriptor instead. +func (*AttributeReadRequest) Descriptor() ([]byte, []int) { + return file_base_v1_service_proto_rawDescGZIP(), []int{35} } -func (x *RelationshipDeleteRequest) GetTenantId() string { +func (x *AttributeReadRequest) GetTenantId() string { if x != nil { return x.TenantId } return "" } -func (x *RelationshipDeleteRequest) GetFilter() *TupleFilter { +func (x *AttributeReadRequest) GetMetadata() *AttributeReadRequestMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *AttributeReadRequest) GetFilter() *AttributeFilter { if x != nil { return x.Filter } return nil } -// RelationshipDeleteResponse -type RelationshipDeleteResponse struct { +func (x *AttributeReadRequest) GetPageSize() uint32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *AttributeReadRequest) GetContinuousToken() string { + if x != nil { + return x.ContinuousToken + } + return "" +} + +// AttributeReadRequestMetadata defines the structure for the metadata of an attribute read request. +// It includes the snap_token associated with a particular state of the database. +type AttributeReadRequestMetadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // snap_token represents a specific state or "snapshot" of the database. SnapToken string `protobuf:"bytes,1,opt,name=snap_token,proto3" json:"snap_token,omitempty"` } -func (x *RelationshipDeleteResponse) Reset() { - *x = RelationshipDeleteResponse{} +func (x *AttributeReadRequestMetadata) Reset() { + *x = AttributeReadRequestMetadata{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_service_proto_msgTypes[33] + mi := &file_base_v1_service_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RelationshipDeleteResponse) String() string { +func (x *AttributeReadRequestMetadata) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RelationshipDeleteResponse) ProtoMessage() {} +func (*AttributeReadRequestMetadata) ProtoMessage() {} -func (x *RelationshipDeleteResponse) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_service_proto_msgTypes[33] +func (x *AttributeReadRequestMetadata) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_service_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2045,9 +2373,290 @@ func (x *RelationshipDeleteResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RelationshipDeleteResponse.ProtoReflect.Descriptor instead. -func (*RelationshipDeleteResponse) Descriptor() ([]byte, []int) { - return file_base_v1_service_proto_rawDescGZIP(), []int{33} +// Deprecated: Use AttributeReadRequestMetadata.ProtoReflect.Descriptor instead. +func (*AttributeReadRequestMetadata) Descriptor() ([]byte, []int) { + return file_base_v1_service_proto_rawDescGZIP(), []int{36} +} + +func (x *AttributeReadRequestMetadata) GetSnapToken() string { + if x != nil { + return x.SnapToken + } + return "" +} + +// AttributeReadResponse defines the structure of the response to an attribute read request. +// It includes the attributes retrieved and a continuous token for handling result pagination. +type AttributeReadResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // attributes is a list of the attributes retrieved in the read operation. + Attributes []*Attribute `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"` + // continuous_token is used in the case of paginated reads to retrieve the next page of results. + ContinuousToken string `protobuf:"bytes,2,opt,name=continuous_token,proto3" json:"continuous_token,omitempty"` +} + +func (x *AttributeReadResponse) Reset() { + *x = AttributeReadResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_service_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttributeReadResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttributeReadResponse) ProtoMessage() {} + +func (x *AttributeReadResponse) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_service_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 AttributeReadResponse.ProtoReflect.Descriptor instead. +func (*AttributeReadResponse) Descriptor() ([]byte, []int) { + return file_base_v1_service_proto_rawDescGZIP(), []int{37} +} + +func (x *AttributeReadResponse) GetAttributes() []*Attribute { + if x != nil { + return x.Attributes + } + return nil +} + +func (x *AttributeReadResponse) GetContinuousToken() string { + if x != nil { + return x.ContinuousToken + } + return "" +} + +// DataDeleteRequest defines the structure of a request to delete data. +// It includes the tenant_id and filters for selecting tuples and attributes to be deleted. +type DataDeleteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // tenant_id represents the unique identifier of the tenant from which the data will be deleted. + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + // tuple_filter specifies the criteria used to select the tuples that should be deleted. + TupleFilter *TupleFilter `protobuf:"bytes,2,opt,name=tuple_filter,proto3" json:"tuple_filter,omitempty"` + // attribute_filter specifies the criteria used to select the attributes that should be deleted. + AttributeFilter *AttributeFilter `protobuf:"bytes,3,opt,name=attribute_filter,proto3" json:"attribute_filter,omitempty"` +} + +func (x *DataDeleteRequest) Reset() { + *x = DataDeleteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_service_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataDeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataDeleteRequest) ProtoMessage() {} + +func (x *DataDeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_service_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 DataDeleteRequest.ProtoReflect.Descriptor instead. +func (*DataDeleteRequest) Descriptor() ([]byte, []int) { + return file_base_v1_service_proto_rawDescGZIP(), []int{38} +} + +func (x *DataDeleteRequest) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + +func (x *DataDeleteRequest) GetTupleFilter() *TupleFilter { + if x != nil { + return x.TupleFilter + } + return nil +} + +func (x *DataDeleteRequest) GetAttributeFilter() *AttributeFilter { + if x != nil { + return x.AttributeFilter + } + return nil +} + +// DataDeleteResponse defines the structure of the response to a data delete request. +// It includes a snap_token representing the state of the database after the deletion. +type DataDeleteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // snap_token represents the state of the database after the requested deletions. + SnapToken string `protobuf:"bytes,1,opt,name=snap_token,proto3" json:"snap_token,omitempty"` +} + +func (x *DataDeleteResponse) Reset() { + *x = DataDeleteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_service_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataDeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataDeleteResponse) ProtoMessage() {} + +func (x *DataDeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_service_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 DataDeleteResponse.ProtoReflect.Descriptor instead. +func (*DataDeleteResponse) Descriptor() ([]byte, []int) { + return file_base_v1_service_proto_rawDescGZIP(), []int{39} +} + +func (x *DataDeleteResponse) GetSnapToken() string { + if x != nil { + return x.SnapToken + } + return "" +} + +// RelationshipDeleteRequest +type RelationshipDeleteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TenantId string `protobuf:"bytes,1,opt,name=tenant_id,proto3" json:"tenant_id,omitempty"` + Filter *TupleFilter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *RelationshipDeleteRequest) Reset() { + *x = RelationshipDeleteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_service_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RelationshipDeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RelationshipDeleteRequest) ProtoMessage() {} + +func (x *RelationshipDeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_service_proto_msgTypes[40] + 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 RelationshipDeleteRequest.ProtoReflect.Descriptor instead. +func (*RelationshipDeleteRequest) Descriptor() ([]byte, []int) { + return file_base_v1_service_proto_rawDescGZIP(), []int{40} +} + +func (x *RelationshipDeleteRequest) GetTenantId() string { + if x != nil { + return x.TenantId + } + return "" +} + +func (x *RelationshipDeleteRequest) GetFilter() *TupleFilter { + if x != nil { + return x.Filter + } + return nil +} + +// RelationshipDeleteResponse +type RelationshipDeleteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SnapToken string `protobuf:"bytes,1,opt,name=snap_token,proto3" json:"snap_token,omitempty"` +} + +func (x *RelationshipDeleteResponse) Reset() { + *x = RelationshipDeleteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_base_v1_service_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RelationshipDeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RelationshipDeleteResponse) ProtoMessage() {} + +func (x *RelationshipDeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_base_v1_service_proto_msgTypes[41] + 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 RelationshipDeleteResponse.ProtoReflect.Descriptor instead. +func (*RelationshipDeleteResponse) Descriptor() ([]byte, []int) { + return file_base_v1_service_proto_rawDescGZIP(), []int{41} } func (x *RelationshipDeleteResponse) GetSnapToken() string { @@ -2057,20 +2666,22 @@ func (x *RelationshipDeleteResponse) GetSnapToken() string { return "" } -// TenantCreateRequest +// TenantCreateRequest is the message used for the request to create a tenant. type TenantCreateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // id is a unique identifier for the tenant. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // name is the name of the tenant. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` } func (x *TenantCreateRequest) Reset() { *x = TenantCreateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_service_proto_msgTypes[34] + mi := &file_base_v1_service_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2083,7 +2694,7 @@ func (x *TenantCreateRequest) String() string { func (*TenantCreateRequest) ProtoMessage() {} func (x *TenantCreateRequest) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_service_proto_msgTypes[34] + mi := &file_base_v1_service_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2096,7 +2707,7 @@ func (x *TenantCreateRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TenantCreateRequest.ProtoReflect.Descriptor instead. func (*TenantCreateRequest) Descriptor() ([]byte, []int) { - return file_base_v1_service_proto_rawDescGZIP(), []int{34} + return file_base_v1_service_proto_rawDescGZIP(), []int{42} } func (x *TenantCreateRequest) GetId() string { @@ -2113,19 +2724,20 @@ func (x *TenantCreateRequest) GetName() string { return "" } -// TenantCreateResponse +// TenantCreateResponse is the message returned from the request to create a tenant. type TenantCreateResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // tenant is the created tenant information. Tenant *Tenant `protobuf:"bytes,1,opt,name=tenant,proto3" json:"tenant,omitempty"` } func (x *TenantCreateResponse) Reset() { *x = TenantCreateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_service_proto_msgTypes[35] + mi := &file_base_v1_service_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2138,7 +2750,7 @@ func (x *TenantCreateResponse) String() string { func (*TenantCreateResponse) ProtoMessage() {} func (x *TenantCreateResponse) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_service_proto_msgTypes[35] + mi := &file_base_v1_service_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2151,7 +2763,7 @@ func (x *TenantCreateResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TenantCreateResponse.ProtoReflect.Descriptor instead. func (*TenantCreateResponse) Descriptor() ([]byte, []int) { - return file_base_v1_service_proto_rawDescGZIP(), []int{35} + return file_base_v1_service_proto_rawDescGZIP(), []int{43} } func (x *TenantCreateResponse) GetTenant() *Tenant { @@ -2161,19 +2773,20 @@ func (x *TenantCreateResponse) GetTenant() *Tenant { return nil } -// TenantDeleteRequest +// TenantDeleteRequest is the message used for the request to delete a tenant. type TenantDeleteRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // id is the unique identifier of the tenant to be deleted. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *TenantDeleteRequest) Reset() { *x = TenantDeleteRequest{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_service_proto_msgTypes[36] + mi := &file_base_v1_service_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2186,7 +2799,7 @@ func (x *TenantDeleteRequest) String() string { func (*TenantDeleteRequest) ProtoMessage() {} func (x *TenantDeleteRequest) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_service_proto_msgTypes[36] + mi := &file_base_v1_service_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2199,7 +2812,7 @@ func (x *TenantDeleteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TenantDeleteRequest.ProtoReflect.Descriptor instead. func (*TenantDeleteRequest) Descriptor() ([]byte, []int) { - return file_base_v1_service_proto_rawDescGZIP(), []int{36} + return file_base_v1_service_proto_rawDescGZIP(), []int{44} } func (x *TenantDeleteRequest) GetId() string { @@ -2209,19 +2822,20 @@ func (x *TenantDeleteRequest) GetId() string { return "" } -// TenantDeleteResponse +// TenantDeleteResponse is the message returned from the request to delete a tenant. type TenantDeleteResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // tenant is the tenant information that was deleted. Tenant *Tenant `protobuf:"bytes,1,opt,name=tenant,proto3" json:"tenant,omitempty"` } func (x *TenantDeleteResponse) Reset() { *x = TenantDeleteResponse{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_service_proto_msgTypes[37] + mi := &file_base_v1_service_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2234,7 +2848,7 @@ func (x *TenantDeleteResponse) String() string { func (*TenantDeleteResponse) ProtoMessage() {} func (x *TenantDeleteResponse) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_service_proto_msgTypes[37] + mi := &file_base_v1_service_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2247,7 +2861,7 @@ func (x *TenantDeleteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TenantDeleteResponse.ProtoReflect.Descriptor instead. func (*TenantDeleteResponse) Descriptor() ([]byte, []int) { - return file_base_v1_service_proto_rawDescGZIP(), []int{37} + return file_base_v1_service_proto_rawDescGZIP(), []int{45} } func (x *TenantDeleteResponse) GetTenant() *Tenant { @@ -2257,20 +2871,24 @@ func (x *TenantDeleteResponse) GetTenant() *Tenant { return nil } -// TenantListRequest +// TenantListRequest is the message used for the request to list all tenants. type TenantListRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PageSize uint32 `protobuf:"varint,1,opt,name=page_size,proto3" json:"page_size,omitempty"` + // page_size is the number of tenants to be returned in the response. + // The value should be between 1 and 100. + PageSize uint32 `protobuf:"varint,1,opt,name=page_size,proto3" json:"page_size,omitempty"` + // continuous_token is an optional parameter used for pagination. + // It should be the value received in the previous response. ContinuousToken string `protobuf:"bytes,2,opt,name=continuous_token,proto3" json:"continuous_token,omitempty"` } func (x *TenantListRequest) Reset() { *x = TenantListRequest{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_service_proto_msgTypes[38] + mi := &file_base_v1_service_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2283,7 +2901,7 @@ func (x *TenantListRequest) String() string { func (*TenantListRequest) ProtoMessage() {} func (x *TenantListRequest) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_service_proto_msgTypes[38] + mi := &file_base_v1_service_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2296,7 +2914,7 @@ func (x *TenantListRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TenantListRequest.ProtoReflect.Descriptor instead. func (*TenantListRequest) Descriptor() ([]byte, []int) { - return file_base_v1_service_proto_rawDescGZIP(), []int{38} + return file_base_v1_service_proto_rawDescGZIP(), []int{46} } func (x *TenantListRequest) GetPageSize() uint32 { @@ -2313,20 +2931,22 @@ func (x *TenantListRequest) GetContinuousToken() string { return "" } -// TenantListResponse +// TenantListResponse is the message returned from the request to list all tenants. type TenantListResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Tenants []*Tenant `protobuf:"bytes,1,rep,name=tenants,proto3" json:"tenants,omitempty"` - ContinuousToken string `protobuf:"bytes,2,opt,name=continuous_token,proto3" json:"continuous_token,omitempty"` + // tenants is a list of tenants. + Tenants []*Tenant `protobuf:"bytes,1,rep,name=tenants,proto3" json:"tenants,omitempty"` + // continuous_token is a string that can be used to paginate and retrieve the next set of results. + ContinuousToken string `protobuf:"bytes,2,opt,name=continuous_token,proto3" json:"continuous_token,omitempty"` } func (x *TenantListResponse) Reset() { *x = TenantListResponse{} if protoimpl.UnsafeEnabled { - mi := &file_base_v1_service_proto_msgTypes[39] + mi := &file_base_v1_service_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2339,7 +2959,7 @@ func (x *TenantListResponse) String() string { func (*TenantListResponse) ProtoMessage() {} func (x *TenantListResponse) ProtoReflect() protoreflect.Message { - mi := &file_base_v1_service_proto_msgTypes[39] + mi := &file_base_v1_service_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2352,7 +2972,7 @@ func (x *TenantListResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TenantListResponse.ProtoReflect.Descriptor instead. func (*TenantListResponse) Descriptor() ([]byte, []int) { - return file_base_v1_service_proto_rawDescGZIP(), []int{39} + return file_base_v1_service_proto_rawDescGZIP(), []int{47} } func (x *TenantListResponse) GetTenants() []*Tenant { @@ -2374,128 +2994,204 @@ var File_base_v1_service_proto protoreflect.FileDescriptor var file_base_v1_service_proto_rawDesc = []byte{ 0x0a, 0x15, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, - 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x62, - 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9f, 0x03, 0x0a, 0x16, 0x50, 0x65, 0x72, + 0x1a, 0x12, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x03, 0x0a, 0x16, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, + 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, + 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x12, 0x4d, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, - 0x0e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, - 0x01, 0x00, 0x52, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x4d, 0x0a, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, - 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x06, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, - 0x55, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x35, 0xfa, 0x42, 0x32, 0x72, 0x30, 0x28, 0x40, 0x32, 0x29, 0x5e, 0x28, - 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, - 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, - 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0xd0, 0x01, 0x00, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3c, 0x0a, 0x11, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x75, 0x61, 0x6c, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x1e, 0x50, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, - 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28, 0x03, 0x52, 0x05, 0x64, - 0x65, 0x70, 0x74, 0x68, 0x22, 0x87, 0x01, 0x0a, 0x17, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x26, 0x0a, 0x03, 0x63, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x03, 0x63, 0x61, 0x6e, 0x12, 0x44, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x43, - 0x0a, 0x1f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0xeb, 0x02, 0x0a, 0x17, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, 0x2d, - 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, 0x09, - 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x4e, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, - 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x06, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x55, 0x0a, 0x0a, - 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x35, 0xfa, 0x42, 0x32, 0x72, 0x30, 0x28, 0x40, 0x32, 0x29, 0x5e, 0x28, 0x5b, 0x61, 0x2d, - 0x7a, 0x41, 0x2d, 0x5a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, - 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, - 0x39, 0x5d, 0x29, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, - 0x6c, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x11, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x22, 0x69, 0x0a, 0x1f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, - 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, - 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x3f, 0x0a, 0x18, - 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x74, 0x72, 0x65, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x04, 0x74, 0x72, 0x65, 0x65, 0x22, 0xd3, 0x03, - 0x0a, 0x1d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, - 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, 0x2d, - 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, 0x09, - 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x54, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x57, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xfa, 0x42, 0x32, 0x72, 0x30, 0x28, 0x40, 0x32, 0x29, 0x5e, - 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, - 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, - 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0xd0, 0x01, 0x00, 0x52, 0x0b, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xfa, 0x42, - 0x32, 0x72, 0x30, 0x28, 0x40, 0x32, 0x29, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, - 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, - 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, - 0xd0, 0x01, 0x00, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3c, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x75, 0x61, 0x6c, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x25, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, + 0x31, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x12, 0x55, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xfa, 0x42, 0x32, 0x72, 0x30, 0x28, 0x40, 0x32, + 0x29, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, + 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, + 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0xd0, 0x01, 0x00, 0x52, 0x0a, 0x70, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x2a, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x2f, 0x0a, 0x09, 0x61, + 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x87, 0x01, 0x0a, + 0x1e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x26, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, + 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28, 0x03, 0x52, + 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x22, 0x87, 0x01, 0x0a, 0x17, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x26, 0x0a, 0x03, 0x63, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x14, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x03, 0x63, 0x61, 0x6e, 0x12, 0x44, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x43, 0x0a, 0x1f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8a, 0x03, 0x0a, 0x17, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, + 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, + 0x52, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x4e, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x06, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x55, + 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x35, 0xfa, 0x42, 0x32, 0x72, 0x30, 0x28, 0x40, 0x32, 0x29, 0x5e, 0x28, 0x5b, + 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, + 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, + 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0xd0, 0x01, 0x01, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x12, 0x2f, 0x0a, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x22, 0x69, 0x0a, 0x1f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, + 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x3f, 0x0a, + 0x18, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x61, 0x6e, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x74, 0x72, 0x65, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x04, 0x74, 0x72, 0x65, 0x65, 0x22, 0xc1, + 0x03, 0x0a, 0x1d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, + 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, + 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x54, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, + 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x57, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xfa, 0x42, 0x32, 0x72, 0x30, 0x28, 0x40, 0x32, 0x29, + 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, + 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, + 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0xd0, 0x01, 0x00, 0x52, 0x0b, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xfa, + 0x42, 0x32, 0x72, 0x30, 0x28, 0x40, 0x32, 0x29, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, + 0x5a, 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, + 0x2c, 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x29, + 0x24, 0xd0, 0x01, 0x00, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x22, 0x8e, 0x01, 0x0a, 0x25, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0e, + 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28, 0x03, 0x52, 0x05, 0x64, 0x65, + 0x70, 0x74, 0x68, 0x22, 0x40, 0x0a, 0x1e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, + 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x44, 0x0a, 0x24, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x22, 0xcf, 0x02, 0x0a, 0x1d, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, + 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, + 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, 0x09, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x54, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x46, 0x0a, + 0x10, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x52, 0x10, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x8e, 0x01, + 0x0a, 0x25, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x1d, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28, 0x03, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x22, 0xb1, + 0x03, 0x0a, 0x1e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, + 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, + 0x52, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x55, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x31, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x55, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xfa, 0x42, 0x32, 0x72, 0x30, + 0x28, 0x40, 0x32, 0x29, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x5d, 0x5b, 0x61, + 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, 0x36, 0x32, 0x7d, + 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, 0xd0, 0x01, 0x00, + 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x11, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x52, 0x11, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x22, 0x8f, 0x01, 0x0a, 0x26, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, @@ -2503,459 +3199,495 @@ var file_base_v1_service_proto_rawDesc = []byte{ 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28, 0x03, 0x52, 0x05, 0x64, - 0x65, 0x70, 0x74, 0x68, 0x22, 0x40, 0x0a, 0x1e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x44, 0x0a, 0x24, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x22, 0xe1, 0x02, 0x0a, - 0x1d, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, - 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, 0x2d, 0x7a, - 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, 0x09, 0x74, - 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x54, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x46, - 0x0a, 0x10, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x52, 0x10, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x3c, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, - 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x11, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x22, 0x8e, 0x01, 0x0a, 0x25, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28, 0x03, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, - 0x68, 0x22, 0xc3, 0x03, 0x0a, 0x1e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, - 0x32, 0x0e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, - 0xd0, 0x01, 0x00, 0x52, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x55, - 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2f, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x65, 0x70, 0x74, 0x68, 0x22, 0x43, 0x0a, 0x1f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x22, 0xce, 0x02, 0x0a, 0x22, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, + 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, + 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x59, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x55, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0xfa, 0x42, - 0x32, 0x72, 0x30, 0x28, 0x40, 0x32, 0x29, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, - 0x5d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x5d, 0x7b, 0x31, 0x2c, - 0x36, 0x32, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x24, - 0xd0, 0x01, 0x00, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x48, 0x0a, 0x11, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x11, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x11, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, - 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x22, 0x70, 0x0a, 0x26, 0x50, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, - 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, - 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x43, 0x0a, 0x1f, 0x50, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x22, 0xe0, - 0x02, 0x0a, 0x22, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, - 0x40, 0x32, 0x0e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, - 0x2b, 0xd0, 0x01, 0x00, 0x52, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, - 0x59, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x33, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x06, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, - 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x34, 0x0a, - 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x12, 0x3c, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, - 0x6c, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x11, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x22, 0xbd, 0x01, 0x0a, 0x2a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, - 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x6e, 0x6c, 0x79, - 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0f, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, 0x02, 0x28, 0x03, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, - 0x68, 0x22, 0xcc, 0x01, 0x0a, 0x23, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x07, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, 0x50, - 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x14, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x68, 0x0a, 0x0c, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, - 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, - 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, - 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x40, 0x0a, 0x0d, 0x57, 0x61, - 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x73, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x22, 0x66, 0x0a, 0x12, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, - 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, - 0x00, 0x52, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3d, 0x0a, 0x13, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x57, 0x72, - 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0x97, 0x01, 0x0a, 0x11, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, - 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, + 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, + 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2a, + 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0xbd, 0x01, 0x0a, 0x2a, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6f, 0x6e, 0x6c, 0x79, + 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x05, 0x64, + 0x65, 0x70, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x1a, + 0x02, 0x28, 0x03, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x22, 0xcc, 0x01, 0x0a, 0x23, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x53, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, 0x50, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x68, 0x0a, 0x0c, 0x57, 0x61, 0x74, + 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, - 0x5f, 0x69, 0x64, 0x12, 0x48, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x5f, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x3f, 0x0a, 0x0d, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x07, 0x63, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x22, 0x66, 0x0a, 0x12, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x57, 0x72, + 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, + 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, + 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x3d, 0x0a, 0x13, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x97, 0x01, 0x0a, 0x11, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x43, 0x0a, - 0x19, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x22, 0x47, 0x0a, 0x12, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x61, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xe0, 0x01, 0x0a, 0x18, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x57, 0x72, 0x69, 0x74, + 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, + 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, + 0x52, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x48, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, + 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x43, 0x0a, 0x19, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, + 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x47, 0x0a, 0x12, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x31, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x22, 0x97, 0x02, 0x0a, 0x10, 0x44, 0x61, 0x74, 0x61, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x12, 0x4f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x57, 0x72, 0x69, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x06, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x42, 0x11, 0xfa, 0x42, 0x0e, 0x92, 0x01, 0x0b, 0x08, 0x01, 0x10, 0x64, 0x22, - 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x22, 0x4a, - 0x0a, 0x20, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x57, 0x72, - 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x19, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, - 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xbc, 0x02, 0x0a, 0x17, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x64, 0x12, 0x47, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x06, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x42, 0x11, 0xfa, 0x42, 0x0e, + 0x92, 0x01, 0x0b, 0x08, 0x00, 0x10, 0x64, 0x22, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, + 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x42, 0x11, + 0xfa, 0x42, 0x0e, 0x92, 0x01, 0x0b, 0x08, 0x00, 0x10, 0x64, 0x22, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0x42, 0x0a, + 0x18, 0x44, 0x61, 0x74, 0x61, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x22, 0x33, 0x0a, 0x11, 0x44, 0x61, 0x74, 0x61, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xe0, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, - 0x01, 0x00, 0x52, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x4e, 0x0a, + 0x01, 0x00, 0x52, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x4f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, - 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, - 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x18, - 0x64, 0x28, 0x01, 0x40, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, - 0x12, 0x34, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, - 0x03, 0xd0, 0x01, 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x41, 0x0a, 0x1f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, - 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, - 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x6e, 0x0a, 0x18, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x06, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x2a, 0x0a, + 0x29, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, + 0x0a, 0x06, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x42, 0x11, + 0xfa, 0x42, 0x0e, 0x92, 0x01, 0x0b, 0x08, 0x01, 0x10, 0x64, 0x22, 0x05, 0x8a, 0x01, 0x02, 0x10, + 0x01, 0x52, 0x06, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x22, 0x4a, 0x0a, 0x20, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, + 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x19, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x68, 0x69, 0x70, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x22, 0xbc, 0x02, 0x0a, 0x17, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x68, 0x69, 0x70, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, + 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, 0x2d, 0x7a, + 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, 0x09, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x4e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, + 0x70, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x12, 0x29, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0d, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x18, 0x64, 0x28, 0x01, 0x40, 0x01, + 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x34, 0x0a, 0x10, 0x63, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, - 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8d, 0x01, 0x0a, 0x19, 0x52, 0x65, + 0x6e, 0x22, 0x41, 0x0a, 0x1f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, + 0x70, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x6e, 0x0a, 0x18, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x26, 0x0a, 0x06, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x52, 0x06, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, + 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xba, 0x02, 0x0a, 0x14, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, + 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, + 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, 0x09, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x4b, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x61, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x12, 0x29, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0d, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x18, 0x64, 0x28, 0x01, 0x40, 0x01, + 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x34, 0x0a, 0x10, 0x63, + 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x01, 0x52, + 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x3e, 0x0a, 0x1c, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, + 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x77, 0x0a, 0x15, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, + 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x2a, + 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, + 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xe1, 0x01, 0x0a, 0x11, 0x44, + 0x61, 0x74, 0x61, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, + 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, + 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x42, 0x0a, 0x0c, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, + 0x52, 0x0c, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4e, + 0x0a, 0x10, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x34, + 0x0a, 0x12, 0x44, 0x61, 0x74, 0x61, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x83, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x68, 0x69, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, + 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x2b, 0x24, 0xd0, 0x01, + 0x00, 0x52, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x3c, 0x0a, 0x1a, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, - 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, - 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x12, 0x36, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, - 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, - 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x3c, 0x0a, 0x1a, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, - 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x61, 0x0a, 0x13, 0x54, 0x65, 0x6e, 0x61, 0x6e, - 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, 0x72, - 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x2d, - 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, 0x28, - 0x40, 0xd0, 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3f, 0x0a, 0x14, 0x54, 0x65, - 0x6e, 0x61, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, - 0x61, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x22, 0x2f, 0x0a, 0x13, 0x54, - 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x00, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3f, 0x0a, 0x14, - 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x22, 0x74, 0x0a, - 0x11, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x18, 0x64, 0x28, 0x01, - 0x40, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x34, 0x0a, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, + 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x61, 0x0a, 0x13, 0x54, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x2a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0xfa, 0x42, 0x17, + 0x72, 0x15, 0x28, 0x40, 0x32, 0x0e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, + 0x2d, 0x2c, 0x5d, 0x2b, 0xd0, 0x01, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x72, 0x05, + 0x28, 0x40, 0xd0, 0x01, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3f, 0x0a, 0x14, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x22, 0x2f, 0x0a, 0x13, + 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, 0x00, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3f, 0x0a, + 0x14, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x22, 0x74, + 0x0a, 0x11, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x18, 0x64, 0x28, + 0x01, 0x40, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x34, + 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, + 0x01, 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x6b, 0x0a, 0x12, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x52, 0x07, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, + 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0xd0, 0x01, - 0x01, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x22, 0x6b, 0x0a, 0x12, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x74, 0x65, 0x6e, - 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x52, 0x07, 0x74, 0x65, 0x6e, - 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, - 0x75, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, - 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x6f, 0x75, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x32, 0xfc, 0x0a, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0xbb, 0x02, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1f, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x62, 0x61, 0x73, + 0x6e, 0x32, 0xf7, 0x0b, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x88, 0x02, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1f, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xee, 0x01, 0x92, - 0x41, 0xb6, 0x01, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x94, 0x01, 0x54, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x72, 0x65, + 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbb, 0x01, + 0x92, 0x41, 0x83, 0x01, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x62, 0x54, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x61, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x20, 0x63, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x2c, 0x20, 0x43, 0x61, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x31, - 0x20, 0x70, 0x75, 0x73, 0x68, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x20, 0x31, 0x3f, 0x2a, 0x11, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x3a, - 0x01, 0x2a, 0x22, 0x29, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, - 0x7b, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0xd2, 0x01, - 0x0a, 0x06, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x20, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x72, 0x63, 0x65, 0x2e, 0x2a, 0x11, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x3a, 0x01, 0x2a, + 0x22, 0x29, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0xd2, 0x01, 0x0a, 0x06, + 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x20, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x61, 0x6e, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, - 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, - 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x82, 0x01, - 0x92, 0x41, 0x4a, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x28, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x68, 0x69, 0x70, 0x73, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x20, - 0x74, 0x6f, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2a, 0x12, 0x70, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x2f, 0x3a, 0x01, 0x2a, 0x22, 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, - 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, - 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x78, 0x70, 0x61, - 0x6e, 0x64, 0x12, 0xc6, 0x01, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x12, 0x26, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x65, 0x92, 0x41, 0x26, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x18, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x3a, 0x01, 0x2a, 0x22, 0x31, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, - 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, - 0x7d, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, - 0x6f, 0x6b, 0x75, 0x70, 0x2d, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0xe1, 0x01, 0x0a, 0x12, - 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x12, 0x26, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, - 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x72, 0x92, 0x41, 0x2c, 0x0a, 0x0a, - 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x1e, 0x70, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, - 0x3a, 0x01, 0x2a, 0x22, 0x38, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, + 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x82, 0x01, 0x92, 0x41, + 0x4a, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x65, + 0x78, 0x70, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, + 0x69, 0x70, 0x73, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, + 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2a, 0x12, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2f, 0x3a, 0x01, 0x2a, 0x22, 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x65, + 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, + 0x12, 0xee, 0x01, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x12, 0x26, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, + 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x8c, 0x01, 0x92, 0x41, 0x4d, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x20, 0x61, + 0x6e, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x20, 0x62, 0x79, 0x20, 0x69, 0x74, 0x73, 0x20, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2e, 0x2a, 0x18, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x3a, 0x01, 0x2a, 0x22, 0x31, + 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x2d, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x12, 0x89, 0x02, 0x0a, 0x12, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x26, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2d, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x99, 0x01, 0x92, 0x41, 0x53, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x25, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x2e, 0x2a, 0x1e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x3a, 0x01, + 0x2a, 0x22, 0x38, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x2d, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x2d, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, 0xf3, 0x01, + 0x0a, 0x0d, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x27, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, + 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x8e, 0x01, 0x92, 0x41, 0x4e, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x20, 0x61, + 0x20, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x62, 0x79, 0x20, 0x69, 0x74, 0x73, 0x20, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x2e, 0x2a, 0x19, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x3a, 0x01, 0x2a, 0x22, + 0x32, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x2d, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x12, 0x95, 0x02, 0x0a, 0x11, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, + 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa4, 0x01, 0x92, 0x41, 0x60, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, + 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x63, 0x20, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x2a, 0x1d, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, + 0x3a, 0x01, 0x2a, 0x22, 0x36, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x2d, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2d, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x30, 0x01, 0x12, - 0xcb, 0x01, 0x0a, 0x0d, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x27, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, - 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x92, 0x41, 0x27, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x19, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x3a, 0x01, 0x2a, 0x22, 0x32, 0x2f, 0x76, 0x31, 0x2f, 0x74, - 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, - 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x2d, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0xdf, 0x01, - 0x0a, 0x11, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, - 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2c, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, - 0x92, 0x41, 0x2b, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2a, - 0x1d, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x3b, 0x3a, 0x01, 0x2a, 0x22, 0x36, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, - 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, - 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x32, - 0x82, 0x01, 0x0a, 0x05, 0x57, 0x61, 0x74, 0x63, 0x68, 0x12, 0x79, 0x0a, 0x05, 0x57, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x15, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x74, - 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x3f, 0x92, 0x41, 0x14, 0x0a, 0x05, 0x57, 0x61, 0x74, 0x63, 0x68, 0x2a, 0x0b, 0x77, - 0x61, 0x74, 0x63, 0x68, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, - 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, - 0x2f, 0x7b, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x77, 0x61, 0x74, - 0x63, 0x68, 0x30, 0x01, 0x32, 0xe4, 0x02, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, - 0xae, 0x01, 0x0a, 0x05, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6a, 0x92, 0x41, 0x37, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x12, 0x1e, 0x77, 0x72, 0x69, 0x74, 0x65, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x6f, 0x64, 0x65, - 0x6c, 0x2a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x2e, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x3a, 0x01, 0x2a, 0x22, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x74, - 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x2f, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x12, 0xa8, 0x01, 0x0a, 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, 0x1a, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x67, 0x92, 0x41, 0x35, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, - 0x1d, 0x72, 0x65, 0x61, 0x64, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2a, 0x0c, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x2d, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x82, 0x01, 0x0a, 0x05, + 0x57, 0x61, 0x74, 0x63, 0x68, 0x12, 0x79, 0x0a, 0x05, 0x57, 0x61, 0x74, 0x63, 0x68, 0x12, 0x15, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x92, + 0x41, 0x14, 0x0a, 0x05, 0x57, 0x61, 0x74, 0x63, 0x68, 0x2a, 0x0b, 0x77, 0x61, 0x74, 0x63, 0x68, + 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, + 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x30, 0x01, + 0x32, 0xe4, 0x02, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0xae, 0x01, 0x0a, 0x05, + 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x6a, 0x92, 0x41, 0x37, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1e, 0x77, + 0x72, 0x69, 0x74, 0x65, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2a, 0x0d, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x2e, 0x77, 0x72, 0x69, 0x74, 0x65, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2a, 0x3a, 0x01, 0x2a, 0x22, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x32, 0xe5, 0x04, 0x0a, 0x0c, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0xc7, 0x01, 0x0a, - 0x05, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x57, 0x72, 0x69, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x2f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0xa8, 0x01, 0x0a, + 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, 0x1a, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, + 0x92, 0x41, 0x35, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1d, 0x72, 0x65, 0x61, + 0x64, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2a, 0x0c, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x73, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, + 0x2a, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x73, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x32, 0xda, 0x08, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x8f, 0x01, 0x0a, 0x05, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x4f, 0x92, 0x41, 0x1f, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0b, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x01, 0x2a, 0x22, 0x22, + 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x77, 0x72, 0x69, + 0x74, 0x65, 0x12, 0xcb, 0x01, 0x0a, 0x12, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x12, 0x21, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, - 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x77, 0x92, - 0x41, 0x3e, 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, - 0x12, 0x19, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x2a, 0x13, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x2e, 0x77, 0x72, 0x69, 0x74, 0x65, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x22, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x74, - 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, - 0x2f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0xbf, 0x01, 0x0a, 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, - 0x20, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x72, 0x92, 0x41, 0x3a, 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x16, 0x72, 0x65, 0x61, 0x64, 0x20, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x28, 0x73, 0x29, 0x2a, - 0x12, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x2e, 0x72, - 0x65, 0x61, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x01, 0x2a, 0x22, 0x2a, 0x2f, 0x76, - 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6e, 0x61, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, - 0x69, 0x70, 0x73, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x12, 0xc8, 0x01, 0x0a, 0x06, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x75, 0x92, 0x41, - 0x3b, 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, - 0x15, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x20, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x2a, 0x14, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x68, 0x69, 0x70, 0x73, 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x31, 0x3a, 0x01, 0x2a, 0x22, 0x2c, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, - 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x2f, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x32, 0xb3, 0x03, 0x0a, 0x07, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x79, 0x12, - 0x93, 0x01, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x92, 0x41, 0x2c, 0x0a, 0x07, 0x54, 0x65, - 0x6e, 0x61, 0x6e, 0x63, 0x79, 0x12, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x6e, 0x65, - 0x77, 0x20, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2a, 0x0e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, - 0x73, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, - 0x2a, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x12, 0x1c, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, - 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x92, - 0x41, 0x28, 0x0a, 0x07, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x79, 0x12, 0x0d, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x20, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2a, 0x0e, 0x74, 0x65, 0x6e, 0x61, - 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, - 0x2a, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x12, 0x84, 0x01, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1a, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x92, 0x41, 0x25, 0x0a, 0x07, 0x54, 0x65, 0x6e, 0x61, 0x6e, - 0x63, 0x79, 0x12, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, - 0x2a, 0x0c, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, - 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x66, 0x79, 0x2f, - 0x70, 0x65, 0x72, 0x6d, 0x69, 0x66, 0x79, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x62, - 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x68, 0x69, 0x70, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x6e, 0x92, 0x41, 0x35, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x68, 0x69, 0x70, 0x73, 0x2a, 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x68, 0x69, 0x70, 0x73, 0x2e, 0x77, 0x72, 0x69, 0x74, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, + 0x3a, 0x01, 0x2a, 0x22, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, + 0x2f, 0x7b, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x2f, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x12, 0xce, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x61, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, + 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x74, 0x92, 0x41, 0x37, + 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x72, 0x65, 0x61, 0x64, 0x20, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x28, 0x73, 0x29, 0x2a, 0x17, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, + 0x70, 0x73, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x3a, 0x01, 0x2a, + 0x22, 0x2f, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x2f, 0x72, 0x65, 0x61, + 0x64, 0x12, 0xba, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x69, 0x92, 0x41, 0x2f, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x11, + 0x72, 0x65, 0x61, 0x64, 0x20, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x73, + 0x29, 0x2a, 0x14, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x2e, 0x72, 0x65, 0x61, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x3a, 0x01, 0x2a, + 0x22, 0x2c, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x12, 0x94, + 0x01, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1a, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x51, 0x92, 0x41, 0x20, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0b, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x0b, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, + 0x22, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0xcc, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x12, 0x22, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x68, 0x69, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x23, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6c, 0x92, 0x41, 0x32, 0x0a, 0x04, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x14, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x2a, 0x14, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x31, 0x3a, 0x01, 0x2a, 0x22, 0x2c, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x2f, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x32, 0xb3, 0x03, 0x0a, 0x07, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x79, + 0x12, 0x93, 0x01, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4c, 0x92, 0x41, 0x2c, 0x0a, 0x07, 0x54, + 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x79, 0x12, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x6e, + 0x65, 0x77, 0x20, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2a, 0x0e, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x74, 0x73, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, + 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x12, 0x1c, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, + 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, + 0x92, 0x41, 0x28, 0x0a, 0x07, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x79, 0x12, 0x0d, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x20, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x2a, 0x0e, 0x74, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x12, 0x2a, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, + 0x69, 0x64, 0x7d, 0x12, 0x84, 0x01, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1a, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x92, 0x41, 0x25, 0x0a, 0x07, 0x54, 0x65, 0x6e, 0x61, + 0x6e, 0x63, 0x79, 0x12, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, + 0x73, 0x2a, 0x0c, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x66, 0x79, + 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x66, 0x79, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, + 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2970,7 +3702,7 @@ func file_base_v1_service_proto_rawDescGZIP() []byte { return file_base_v1_service_proto_rawDescData } -var file_base_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 41) +var file_base_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 49) var file_base_v1_service_proto_goTypes = []interface{}{ (*PermissionCheckRequest)(nil), // 0: base.v1.PermissionCheckRequest (*PermissionCheckRequestMetadata)(nil), // 1: base.v1.PermissionCheckRequestMetadata @@ -2998,107 +3730,135 @@ var file_base_v1_service_proto_goTypes = []interface{}{ (*SchemaReadRequest)(nil), // 23: base.v1.SchemaReadRequest (*SchemaReadRequestMetadata)(nil), // 24: base.v1.SchemaReadRequestMetadata (*SchemaReadResponse)(nil), // 25: base.v1.SchemaReadResponse - (*RelationshipWriteRequest)(nil), // 26: base.v1.RelationshipWriteRequest - (*RelationshipWriteRequestMetadata)(nil), // 27: base.v1.RelationshipWriteRequestMetadata - (*RelationshipWriteResponse)(nil), // 28: base.v1.RelationshipWriteResponse - (*RelationshipReadRequest)(nil), // 29: base.v1.RelationshipReadRequest - (*RelationshipReadRequestMetadata)(nil), // 30: base.v1.RelationshipReadRequestMetadata - (*RelationshipReadResponse)(nil), // 31: base.v1.RelationshipReadResponse - (*RelationshipDeleteRequest)(nil), // 32: base.v1.RelationshipDeleteRequest - (*RelationshipDeleteResponse)(nil), // 33: base.v1.RelationshipDeleteResponse - (*TenantCreateRequest)(nil), // 34: base.v1.TenantCreateRequest - (*TenantCreateResponse)(nil), // 35: base.v1.TenantCreateResponse - (*TenantDeleteRequest)(nil), // 36: base.v1.TenantDeleteRequest - (*TenantDeleteResponse)(nil), // 37: base.v1.TenantDeleteResponse - (*TenantListRequest)(nil), // 38: base.v1.TenantListRequest - (*TenantListResponse)(nil), // 39: base.v1.TenantListResponse - nil, // 40: base.v1.PermissionSubjectPermissionResponse.ResultsEntry - (*Entity)(nil), // 41: base.v1.Entity - (*Subject)(nil), // 42: base.v1.Subject - (*Tuple)(nil), // 43: base.v1.Tuple - (CheckResult)(0), // 44: base.v1.CheckResult - (*Expand)(nil), // 45: base.v1.Expand - (*RelationReference)(nil), // 46: base.v1.RelationReference - (*TupleChanges)(nil), // 47: base.v1.TupleChanges - (*SchemaDefinition)(nil), // 48: base.v1.SchemaDefinition - (*TupleFilter)(nil), // 49: base.v1.TupleFilter - (*Tenant)(nil), // 50: base.v1.Tenant + (*DataWriteRequest)(nil), // 26: base.v1.DataWriteRequest + (*DataWriteRequestMetadata)(nil), // 27: base.v1.DataWriteRequestMetadata + (*DataWriteResponse)(nil), // 28: base.v1.DataWriteResponse + (*RelationshipWriteRequest)(nil), // 29: base.v1.RelationshipWriteRequest + (*RelationshipWriteRequestMetadata)(nil), // 30: base.v1.RelationshipWriteRequestMetadata + (*RelationshipWriteResponse)(nil), // 31: base.v1.RelationshipWriteResponse + (*RelationshipReadRequest)(nil), // 32: base.v1.RelationshipReadRequest + (*RelationshipReadRequestMetadata)(nil), // 33: base.v1.RelationshipReadRequestMetadata + (*RelationshipReadResponse)(nil), // 34: base.v1.RelationshipReadResponse + (*AttributeReadRequest)(nil), // 35: base.v1.AttributeReadRequest + (*AttributeReadRequestMetadata)(nil), // 36: base.v1.AttributeReadRequestMetadata + (*AttributeReadResponse)(nil), // 37: base.v1.AttributeReadResponse + (*DataDeleteRequest)(nil), // 38: base.v1.DataDeleteRequest + (*DataDeleteResponse)(nil), // 39: base.v1.DataDeleteResponse + (*RelationshipDeleteRequest)(nil), // 40: base.v1.RelationshipDeleteRequest + (*RelationshipDeleteResponse)(nil), // 41: base.v1.RelationshipDeleteResponse + (*TenantCreateRequest)(nil), // 42: base.v1.TenantCreateRequest + (*TenantCreateResponse)(nil), // 43: base.v1.TenantCreateResponse + (*TenantDeleteRequest)(nil), // 44: base.v1.TenantDeleteRequest + (*TenantDeleteResponse)(nil), // 45: base.v1.TenantDeleteResponse + (*TenantListRequest)(nil), // 46: base.v1.TenantListRequest + (*TenantListResponse)(nil), // 47: base.v1.TenantListResponse + nil, // 48: base.v1.PermissionSubjectPermissionResponse.ResultsEntry + (*Entity)(nil), // 49: base.v1.Entity + (*Subject)(nil), // 50: base.v1.Subject + (*Context)(nil), // 51: base.v1.Context + (*Argument)(nil), // 52: base.v1.Argument + (CheckResult)(0), // 53: base.v1.CheckResult + (*Expand)(nil), // 54: base.v1.Expand + (*RelationReference)(nil), // 55: base.v1.RelationReference + (*DataChanges)(nil), // 56: base.v1.DataChanges + (*SchemaDefinition)(nil), // 57: base.v1.SchemaDefinition + (*Tuple)(nil), // 58: base.v1.Tuple + (*Attribute)(nil), // 59: base.v1.Attribute + (*TupleFilter)(nil), // 60: base.v1.TupleFilter + (*AttributeFilter)(nil), // 61: base.v1.AttributeFilter + (*Tenant)(nil), // 62: base.v1.Tenant } var file_base_v1_service_proto_depIdxs = []int32{ 1, // 0: base.v1.PermissionCheckRequest.metadata:type_name -> base.v1.PermissionCheckRequestMetadata - 41, // 1: base.v1.PermissionCheckRequest.entity:type_name -> base.v1.Entity - 42, // 2: base.v1.PermissionCheckRequest.subject:type_name -> base.v1.Subject - 43, // 3: base.v1.PermissionCheckRequest.contextual_tuples:type_name -> base.v1.Tuple - 44, // 4: base.v1.PermissionCheckResponse.can:type_name -> base.v1.CheckResult - 3, // 5: base.v1.PermissionCheckResponse.metadata:type_name -> base.v1.PermissionCheckResponseMetadata - 5, // 6: base.v1.PermissionExpandRequest.metadata:type_name -> base.v1.PermissionExpandRequestMetadata - 41, // 7: base.v1.PermissionExpandRequest.entity:type_name -> base.v1.Entity - 43, // 8: base.v1.PermissionExpandRequest.contextual_tuples:type_name -> base.v1.Tuple - 45, // 9: base.v1.PermissionExpandResponse.tree:type_name -> base.v1.Expand - 8, // 10: base.v1.PermissionLookupEntityRequest.metadata:type_name -> base.v1.PermissionLookupEntityRequestMetadata - 42, // 11: base.v1.PermissionLookupEntityRequest.subject:type_name -> base.v1.Subject - 43, // 12: base.v1.PermissionLookupEntityRequest.contextual_tuples:type_name -> base.v1.Tuple - 12, // 13: base.v1.PermissionEntityFilterRequest.metadata:type_name -> base.v1.PermissionEntityFilterRequestMetadata - 46, // 14: base.v1.PermissionEntityFilterRequest.entity_reference:type_name -> base.v1.RelationReference - 42, // 15: base.v1.PermissionEntityFilterRequest.subject:type_name -> base.v1.Subject - 43, // 16: base.v1.PermissionEntityFilterRequest.contextual_tuples:type_name -> base.v1.Tuple - 14, // 17: base.v1.PermissionLookupSubjectRequest.metadata:type_name -> base.v1.PermissionLookupSubjectRequestMetadata - 41, // 18: base.v1.PermissionLookupSubjectRequest.entity:type_name -> base.v1.Entity - 46, // 19: base.v1.PermissionLookupSubjectRequest.subject_reference:type_name -> base.v1.RelationReference - 43, // 20: base.v1.PermissionLookupSubjectRequest.contextual_tuples:type_name -> base.v1.Tuple - 17, // 21: base.v1.PermissionSubjectPermissionRequest.metadata:type_name -> base.v1.PermissionSubjectPermissionRequestMetadata - 41, // 22: base.v1.PermissionSubjectPermissionRequest.entity:type_name -> base.v1.Entity - 42, // 23: base.v1.PermissionSubjectPermissionRequest.subject:type_name -> base.v1.Subject - 43, // 24: base.v1.PermissionSubjectPermissionRequest.contextual_tuples:type_name -> base.v1.Tuple - 40, // 25: base.v1.PermissionSubjectPermissionResponse.results:type_name -> base.v1.PermissionSubjectPermissionResponse.ResultsEntry - 47, // 26: base.v1.WatchResponse.changes:type_name -> base.v1.TupleChanges - 24, // 27: base.v1.SchemaReadRequest.metadata:type_name -> base.v1.SchemaReadRequestMetadata - 48, // 28: base.v1.SchemaReadResponse.schema:type_name -> base.v1.SchemaDefinition - 27, // 29: base.v1.RelationshipWriteRequest.metadata:type_name -> base.v1.RelationshipWriteRequestMetadata - 43, // 30: base.v1.RelationshipWriteRequest.tuples:type_name -> base.v1.Tuple - 30, // 31: base.v1.RelationshipReadRequest.metadata:type_name -> base.v1.RelationshipReadRequestMetadata - 49, // 32: base.v1.RelationshipReadRequest.filter:type_name -> base.v1.TupleFilter - 43, // 33: base.v1.RelationshipReadResponse.tuples:type_name -> base.v1.Tuple - 49, // 34: base.v1.RelationshipDeleteRequest.filter:type_name -> base.v1.TupleFilter - 50, // 35: base.v1.TenantCreateResponse.tenant:type_name -> base.v1.Tenant - 50, // 36: base.v1.TenantDeleteResponse.tenant:type_name -> base.v1.Tenant - 50, // 37: base.v1.TenantListResponse.tenants:type_name -> base.v1.Tenant - 44, // 38: base.v1.PermissionSubjectPermissionResponse.ResultsEntry.value:type_name -> base.v1.CheckResult - 0, // 39: base.v1.Permission.Check:input_type -> base.v1.PermissionCheckRequest - 4, // 40: base.v1.Permission.Expand:input_type -> base.v1.PermissionExpandRequest - 7, // 41: base.v1.Permission.LookupEntity:input_type -> base.v1.PermissionLookupEntityRequest - 7, // 42: base.v1.Permission.LookupEntityStream:input_type -> base.v1.PermissionLookupEntityRequest - 13, // 43: base.v1.Permission.LookupSubject:input_type -> base.v1.PermissionLookupSubjectRequest - 16, // 44: base.v1.Permission.SubjectPermission:input_type -> base.v1.PermissionSubjectPermissionRequest - 19, // 45: base.v1.Watch.Watch:input_type -> base.v1.WatchRequest - 21, // 46: base.v1.Schema.Write:input_type -> base.v1.SchemaWriteRequest - 23, // 47: base.v1.Schema.Read:input_type -> base.v1.SchemaReadRequest - 26, // 48: base.v1.Relationship.Write:input_type -> base.v1.RelationshipWriteRequest - 29, // 49: base.v1.Relationship.Read:input_type -> base.v1.RelationshipReadRequest - 32, // 50: base.v1.Relationship.Delete:input_type -> base.v1.RelationshipDeleteRequest - 34, // 51: base.v1.Tenancy.Create:input_type -> base.v1.TenantCreateRequest - 36, // 52: base.v1.Tenancy.Delete:input_type -> base.v1.TenantDeleteRequest - 38, // 53: base.v1.Tenancy.List:input_type -> base.v1.TenantListRequest - 2, // 54: base.v1.Permission.Check:output_type -> base.v1.PermissionCheckResponse - 6, // 55: base.v1.Permission.Expand:output_type -> base.v1.PermissionExpandResponse - 9, // 56: base.v1.Permission.LookupEntity:output_type -> base.v1.PermissionLookupEntityResponse - 10, // 57: base.v1.Permission.LookupEntityStream:output_type -> base.v1.PermissionLookupEntityStreamResponse - 15, // 58: base.v1.Permission.LookupSubject:output_type -> base.v1.PermissionLookupSubjectResponse - 18, // 59: base.v1.Permission.SubjectPermission:output_type -> base.v1.PermissionSubjectPermissionResponse - 20, // 60: base.v1.Watch.Watch:output_type -> base.v1.WatchResponse - 22, // 61: base.v1.Schema.Write:output_type -> base.v1.SchemaWriteResponse - 25, // 62: base.v1.Schema.Read:output_type -> base.v1.SchemaReadResponse - 28, // 63: base.v1.Relationship.Write:output_type -> base.v1.RelationshipWriteResponse - 31, // 64: base.v1.Relationship.Read:output_type -> base.v1.RelationshipReadResponse - 33, // 65: base.v1.Relationship.Delete:output_type -> base.v1.RelationshipDeleteResponse - 35, // 66: base.v1.Tenancy.Create:output_type -> base.v1.TenantCreateResponse - 37, // 67: base.v1.Tenancy.Delete:output_type -> base.v1.TenantDeleteResponse - 39, // 68: base.v1.Tenancy.List:output_type -> base.v1.TenantListResponse - 54, // [54:69] is the sub-list for method output_type - 39, // [39:54] is the sub-list for method input_type - 39, // [39:39] is the sub-list for extension type_name - 39, // [39:39] is the sub-list for extension extendee - 0, // [0:39] is the sub-list for field type_name + 49, // 1: base.v1.PermissionCheckRequest.entity:type_name -> base.v1.Entity + 50, // 2: base.v1.PermissionCheckRequest.subject:type_name -> base.v1.Subject + 51, // 3: base.v1.PermissionCheckRequest.context:type_name -> base.v1.Context + 52, // 4: base.v1.PermissionCheckRequest.arguments:type_name -> base.v1.Argument + 53, // 5: base.v1.PermissionCheckResponse.can:type_name -> base.v1.CheckResult + 3, // 6: base.v1.PermissionCheckResponse.metadata:type_name -> base.v1.PermissionCheckResponseMetadata + 5, // 7: base.v1.PermissionExpandRequest.metadata:type_name -> base.v1.PermissionExpandRequestMetadata + 49, // 8: base.v1.PermissionExpandRequest.entity:type_name -> base.v1.Entity + 51, // 9: base.v1.PermissionExpandRequest.context:type_name -> base.v1.Context + 52, // 10: base.v1.PermissionExpandRequest.arguments:type_name -> base.v1.Argument + 54, // 11: base.v1.PermissionExpandResponse.tree:type_name -> base.v1.Expand + 8, // 12: base.v1.PermissionLookupEntityRequest.metadata:type_name -> base.v1.PermissionLookupEntityRequestMetadata + 50, // 13: base.v1.PermissionLookupEntityRequest.subject:type_name -> base.v1.Subject + 51, // 14: base.v1.PermissionLookupEntityRequest.context:type_name -> base.v1.Context + 12, // 15: base.v1.PermissionEntityFilterRequest.metadata:type_name -> base.v1.PermissionEntityFilterRequestMetadata + 55, // 16: base.v1.PermissionEntityFilterRequest.entity_reference:type_name -> base.v1.RelationReference + 50, // 17: base.v1.PermissionEntityFilterRequest.subject:type_name -> base.v1.Subject + 51, // 18: base.v1.PermissionEntityFilterRequest.context:type_name -> base.v1.Context + 14, // 19: base.v1.PermissionLookupSubjectRequest.metadata:type_name -> base.v1.PermissionLookupSubjectRequestMetadata + 49, // 20: base.v1.PermissionLookupSubjectRequest.entity:type_name -> base.v1.Entity + 55, // 21: base.v1.PermissionLookupSubjectRequest.subject_reference:type_name -> base.v1.RelationReference + 51, // 22: base.v1.PermissionLookupSubjectRequest.context:type_name -> base.v1.Context + 17, // 23: base.v1.PermissionSubjectPermissionRequest.metadata:type_name -> base.v1.PermissionSubjectPermissionRequestMetadata + 49, // 24: base.v1.PermissionSubjectPermissionRequest.entity:type_name -> base.v1.Entity + 50, // 25: base.v1.PermissionSubjectPermissionRequest.subject:type_name -> base.v1.Subject + 51, // 26: base.v1.PermissionSubjectPermissionRequest.context:type_name -> base.v1.Context + 48, // 27: base.v1.PermissionSubjectPermissionResponse.results:type_name -> base.v1.PermissionSubjectPermissionResponse.ResultsEntry + 56, // 28: base.v1.WatchResponse.changes:type_name -> base.v1.DataChanges + 24, // 29: base.v1.SchemaReadRequest.metadata:type_name -> base.v1.SchemaReadRequestMetadata + 57, // 30: base.v1.SchemaReadResponse.schema:type_name -> base.v1.SchemaDefinition + 27, // 31: base.v1.DataWriteRequest.metadata:type_name -> base.v1.DataWriteRequestMetadata + 58, // 32: base.v1.DataWriteRequest.tuples:type_name -> base.v1.Tuple + 59, // 33: base.v1.DataWriteRequest.attributes:type_name -> base.v1.Attribute + 30, // 34: base.v1.RelationshipWriteRequest.metadata:type_name -> base.v1.RelationshipWriteRequestMetadata + 58, // 35: base.v1.RelationshipWriteRequest.tuples:type_name -> base.v1.Tuple + 33, // 36: base.v1.RelationshipReadRequest.metadata:type_name -> base.v1.RelationshipReadRequestMetadata + 60, // 37: base.v1.RelationshipReadRequest.filter:type_name -> base.v1.TupleFilter + 58, // 38: base.v1.RelationshipReadResponse.tuples:type_name -> base.v1.Tuple + 36, // 39: base.v1.AttributeReadRequest.metadata:type_name -> base.v1.AttributeReadRequestMetadata + 61, // 40: base.v1.AttributeReadRequest.filter:type_name -> base.v1.AttributeFilter + 59, // 41: base.v1.AttributeReadResponse.attributes:type_name -> base.v1.Attribute + 60, // 42: base.v1.DataDeleteRequest.tuple_filter:type_name -> base.v1.TupleFilter + 61, // 43: base.v1.DataDeleteRequest.attribute_filter:type_name -> base.v1.AttributeFilter + 60, // 44: base.v1.RelationshipDeleteRequest.filter:type_name -> base.v1.TupleFilter + 62, // 45: base.v1.TenantCreateResponse.tenant:type_name -> base.v1.Tenant + 62, // 46: base.v1.TenantDeleteResponse.tenant:type_name -> base.v1.Tenant + 62, // 47: base.v1.TenantListResponse.tenants:type_name -> base.v1.Tenant + 53, // 48: base.v1.PermissionSubjectPermissionResponse.ResultsEntry.value:type_name -> base.v1.CheckResult + 0, // 49: base.v1.Permission.Check:input_type -> base.v1.PermissionCheckRequest + 4, // 50: base.v1.Permission.Expand:input_type -> base.v1.PermissionExpandRequest + 7, // 51: base.v1.Permission.LookupEntity:input_type -> base.v1.PermissionLookupEntityRequest + 7, // 52: base.v1.Permission.LookupEntityStream:input_type -> base.v1.PermissionLookupEntityRequest + 13, // 53: base.v1.Permission.LookupSubject:input_type -> base.v1.PermissionLookupSubjectRequest + 16, // 54: base.v1.Permission.SubjectPermission:input_type -> base.v1.PermissionSubjectPermissionRequest + 19, // 55: base.v1.Watch.Watch:input_type -> base.v1.WatchRequest + 21, // 56: base.v1.Schema.Write:input_type -> base.v1.SchemaWriteRequest + 23, // 57: base.v1.Schema.Read:input_type -> base.v1.SchemaReadRequest + 26, // 58: base.v1.Data.Write:input_type -> base.v1.DataWriteRequest + 29, // 59: base.v1.Data.WriteRelationships:input_type -> base.v1.RelationshipWriteRequest + 32, // 60: base.v1.Data.ReadRelationships:input_type -> base.v1.RelationshipReadRequest + 35, // 61: base.v1.Data.ReadAttributes:input_type -> base.v1.AttributeReadRequest + 38, // 62: base.v1.Data.Delete:input_type -> base.v1.DataDeleteRequest + 40, // 63: base.v1.Data.DeleteRelationships:input_type -> base.v1.RelationshipDeleteRequest + 42, // 64: base.v1.Tenancy.Create:input_type -> base.v1.TenantCreateRequest + 44, // 65: base.v1.Tenancy.Delete:input_type -> base.v1.TenantDeleteRequest + 46, // 66: base.v1.Tenancy.List:input_type -> base.v1.TenantListRequest + 2, // 67: base.v1.Permission.Check:output_type -> base.v1.PermissionCheckResponse + 6, // 68: base.v1.Permission.Expand:output_type -> base.v1.PermissionExpandResponse + 9, // 69: base.v1.Permission.LookupEntity:output_type -> base.v1.PermissionLookupEntityResponse + 10, // 70: base.v1.Permission.LookupEntityStream:output_type -> base.v1.PermissionLookupEntityStreamResponse + 15, // 71: base.v1.Permission.LookupSubject:output_type -> base.v1.PermissionLookupSubjectResponse + 18, // 72: base.v1.Permission.SubjectPermission:output_type -> base.v1.PermissionSubjectPermissionResponse + 20, // 73: base.v1.Watch.Watch:output_type -> base.v1.WatchResponse + 22, // 74: base.v1.Schema.Write:output_type -> base.v1.SchemaWriteResponse + 25, // 75: base.v1.Schema.Read:output_type -> base.v1.SchemaReadResponse + 28, // 76: base.v1.Data.Write:output_type -> base.v1.DataWriteResponse + 31, // 77: base.v1.Data.WriteRelationships:output_type -> base.v1.RelationshipWriteResponse + 34, // 78: base.v1.Data.ReadRelationships:output_type -> base.v1.RelationshipReadResponse + 37, // 79: base.v1.Data.ReadAttributes:output_type -> base.v1.AttributeReadResponse + 39, // 80: base.v1.Data.Delete:output_type -> base.v1.DataDeleteResponse + 41, // 81: base.v1.Data.DeleteRelationships:output_type -> base.v1.RelationshipDeleteResponse + 43, // 82: base.v1.Tenancy.Create:output_type -> base.v1.TenantCreateResponse + 45, // 83: base.v1.Tenancy.Delete:output_type -> base.v1.TenantDeleteResponse + 47, // 84: base.v1.Tenancy.List:output_type -> base.v1.TenantListResponse + 67, // [67:85] is the sub-list for method output_type + 49, // [49:67] is the sub-list for method input_type + 49, // [49:49] is the sub-list for extension type_name + 49, // [49:49] is the sub-list for extension extendee + 0, // [0:49] is the sub-list for field type_name } func init() { file_base_v1_service_proto_init() } @@ -3421,7 +4181,7 @@ func file_base_v1_service_proto_init() { } } file_base_v1_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RelationshipWriteRequest); i { + switch v := v.(*DataWriteRequest); i { case 0: return &v.state case 1: @@ -3433,7 +4193,7 @@ func file_base_v1_service_proto_init() { } } file_base_v1_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RelationshipWriteRequestMetadata); i { + switch v := v.(*DataWriteRequestMetadata); i { case 0: return &v.state case 1: @@ -3445,7 +4205,7 @@ func file_base_v1_service_proto_init() { } } file_base_v1_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RelationshipWriteResponse); i { + switch v := v.(*DataWriteResponse); i { case 0: return &v.state case 1: @@ -3457,7 +4217,7 @@ func file_base_v1_service_proto_init() { } } file_base_v1_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RelationshipReadRequest); i { + switch v := v.(*RelationshipWriteRequest); i { case 0: return &v.state case 1: @@ -3469,7 +4229,7 @@ func file_base_v1_service_proto_init() { } } file_base_v1_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RelationshipReadRequestMetadata); i { + switch v := v.(*RelationshipWriteRequestMetadata); i { case 0: return &v.state case 1: @@ -3481,7 +4241,7 @@ func file_base_v1_service_proto_init() { } } file_base_v1_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RelationshipReadResponse); i { + switch v := v.(*RelationshipWriteResponse); i { case 0: return &v.state case 1: @@ -3493,7 +4253,7 @@ func file_base_v1_service_proto_init() { } } file_base_v1_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RelationshipDeleteRequest); i { + switch v := v.(*RelationshipReadRequest); i { case 0: return &v.state case 1: @@ -3505,7 +4265,7 @@ func file_base_v1_service_proto_init() { } } file_base_v1_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RelationshipDeleteResponse); i { + switch v := v.(*RelationshipReadRequestMetadata); i { case 0: return &v.state case 1: @@ -3517,7 +4277,7 @@ func file_base_v1_service_proto_init() { } } file_base_v1_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TenantCreateRequest); i { + switch v := v.(*RelationshipReadResponse); i { case 0: return &v.state case 1: @@ -3529,7 +4289,7 @@ func file_base_v1_service_proto_init() { } } file_base_v1_service_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TenantCreateResponse); i { + switch v := v.(*AttributeReadRequest); i { case 0: return &v.state case 1: @@ -3541,7 +4301,7 @@ func file_base_v1_service_proto_init() { } } file_base_v1_service_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TenantDeleteRequest); i { + switch v := v.(*AttributeReadRequestMetadata); i { case 0: return &v.state case 1: @@ -3553,7 +4313,7 @@ func file_base_v1_service_proto_init() { } } file_base_v1_service_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TenantDeleteResponse); i { + switch v := v.(*AttributeReadResponse); i { case 0: return &v.state case 1: @@ -3565,7 +4325,7 @@ func file_base_v1_service_proto_init() { } } file_base_v1_service_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TenantListRequest); i { + switch v := v.(*DataDeleteRequest); i { case 0: return &v.state case 1: @@ -3577,6 +4337,102 @@ func file_base_v1_service_proto_init() { } } file_base_v1_service_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataDeleteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_service_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RelationshipDeleteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_service_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RelationshipDeleteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_service_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TenantCreateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_service_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TenantCreateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_service_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TenantDeleteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_service_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TenantDeleteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_service_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TenantListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_base_v1_service_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TenantListResponse); i { case 0: return &v.state @@ -3595,7 +4451,7 @@ func file_base_v1_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_base_v1_service_proto_rawDesc, NumEnums: 0, - NumMessages: 41, + NumMessages: 49, NumExtensions: 0, NumServices: 5, }, diff --git a/generated/base/v1/service.pb.gw.go b/generated/base/v1/service.pb.gw.go index b98087e..8373996 100644 --- a/generated/base/v1/service.pb.gw.go +++ b/generated/base/v1/service.pb.gw.go @@ -591,8 +591,8 @@ func local_request_Schema_Read_0(ctx context.Context, marshaler runtime.Marshale } -func request_Relationship_Write_0(ctx context.Context, marshaler runtime.Marshaler, client RelationshipClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RelationshipWriteRequest +func request_Data_Write_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DataWriteRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -625,8 +625,8 @@ func request_Relationship_Write_0(ctx context.Context, marshaler runtime.Marshal } -func local_request_Relationship_Write_0(ctx context.Context, marshaler runtime.Marshaler, server RelationshipServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RelationshipWriteRequest +func local_request_Data_Write_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DataWriteRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -659,7 +659,75 @@ func local_request_Relationship_Write_0(ctx context.Context, marshaler runtime.M } -func request_Relationship_Read_0(ctx context.Context, marshaler runtime.Marshaler, client RelationshipClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_Data_WriteRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RelationshipWriteRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["tenant_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") + } + + protoReq.TenantId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) + } + + msg, err := client.WriteRelationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Data_WriteRelationships_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RelationshipWriteRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["tenant_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") + } + + protoReq.TenantId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) + } + + msg, err := server.WriteRelationships(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Data_ReadRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RelationshipReadRequest var metadata runtime.ServerMetadata @@ -688,12 +756,12 @@ func request_Relationship_Read_0(ctx context.Context, marshaler runtime.Marshale return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) } - msg, err := client.Read(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ReadRelationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Relationship_Read_0(ctx context.Context, marshaler runtime.Marshaler, server RelationshipServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_Data_ReadRelationships_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RelationshipReadRequest var metadata runtime.ServerMetadata @@ -722,13 +790,81 @@ func local_request_Relationship_Read_0(ctx context.Context, marshaler runtime.Ma return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) } - msg, err := server.Read(ctx, &protoReq) + msg, err := server.ReadRelationships(ctx, &protoReq) return msg, metadata, err } -func request_Relationship_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client RelationshipClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RelationshipDeleteRequest +func request_Data_ReadAttributes_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AttributeReadRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["tenant_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") + } + + protoReq.TenantId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) + } + + msg, err := client.ReadAttributes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Data_ReadAttributes_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AttributeReadRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["tenant_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") + } + + protoReq.TenantId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) + } + + msg, err := server.ReadAttributes(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Data_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DataDeleteRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -761,8 +897,8 @@ func request_Relationship_Delete_0(ctx context.Context, marshaler runtime.Marsha } -func local_request_Relationship_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server RelationshipServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RelationshipDeleteRequest +func local_request_Data_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DataDeleteRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -795,6 +931,74 @@ func local_request_Relationship_Delete_0(ctx context.Context, marshaler runtime. } +func request_Data_DeleteRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RelationshipDeleteRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["tenant_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") + } + + protoReq.TenantId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) + } + + msg, err := client.DeleteRelationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Data_DeleteRelationships_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RelationshipDeleteRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["tenant_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") + } + + protoReq.TenantId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) + } + + msg, err := server.DeleteRelationships(ctx, &protoReq) + return msg, metadata, err + +} + func request_Tenancy_Create_0(ctx context.Context, marshaler runtime.Marshaler, client TenancyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq TenantCreateRequest var metadata runtime.ServerMetadata @@ -1117,24 +1321,47 @@ func RegisterSchemaHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser return nil } -// RegisterRelationshipHandlerServer registers the http handlers for service Relationship to "mux". -// UnaryRPC :call RelationshipServer directly. +// RegisterDataHandlerServer registers the http handlers for service Data to "mux". +// UnaryRPC :call DataServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRelationshipHandlerFromEndpoint instead. -func RegisterRelationshipHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RelationshipServer) error { +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDataHandlerFromEndpoint instead. +func RegisterDataHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DataServer) error { + + mux.Handle("POST", pattern_Data_Write_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/Write", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/write")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Data_Write_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } - mux.Handle("POST", pattern_Relationship_Write_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + forward_Data_Write_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Data_WriteRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Relationship/Write", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/write")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/WriteRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/write")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Relationship_Write_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Data_WriteRelationships_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -1142,22 +1369,22 @@ func RegisterRelationshipHandlerServer(ctx context.Context, mux *runtime.ServeMu return } - forward_Relationship_Write_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Data_WriteRelationships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Relationship_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Data_ReadRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Relationship/Read", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/read")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/ReadRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/relationships/read")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Relationship_Read_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Data_ReadRelationships_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -1165,22 +1392,22 @@ func RegisterRelationshipHandlerServer(ctx context.Context, mux *runtime.ServeMu return } - forward_Relationship_Read_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Data_ReadRelationships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Relationship_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Data_ReadAttributes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Relationship/Delete", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/delete")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/ReadAttributes", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/attributes/read")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Relationship_Delete_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Data_ReadAttributes_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -1188,7 +1415,53 @@ func RegisterRelationshipHandlerServer(ctx context.Context, mux *runtime.ServeMu return } - forward_Relationship_Delete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Data_ReadAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Data_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/Delete", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/delete")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Data_Delete_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Data_Delete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Data_DeleteRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/DeleteRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/delete")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Data_DeleteRelationships_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Data_DeleteRelationships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1624,9 +1897,9 @@ var ( forward_Schema_Read_0 = runtime.ForwardResponseMessage ) -// RegisterRelationshipHandlerFromEndpoint is same as RegisterRelationshipHandler but +// RegisterDataHandlerFromEndpoint is same as RegisterDataHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterRelationshipHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { +func RegisterDataHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { conn, err := grpc.Dial(endpoint, opts...) if err != nil { return err @@ -1646,79 +1919,139 @@ func RegisterRelationshipHandlerFromEndpoint(ctx context.Context, mux *runtime.S }() }() - return RegisterRelationshipHandler(ctx, mux, conn) + return RegisterDataHandler(ctx, mux, conn) } -// RegisterRelationshipHandler registers the http handlers for service Relationship to "mux". +// RegisterDataHandler registers the http handlers for service Data to "mux". // The handlers forward requests to the grpc endpoint over "conn". -func RegisterRelationshipHandler(ctx context.Context, mux *runtime.ServeMux, conn grpc.ClientConnInterface) error { - return RegisterRelationshipHandlerClient(ctx, mux, NewRelationshipClient(conn)) +func RegisterDataHandler(ctx context.Context, mux *runtime.ServeMux, conn grpc.ClientConnInterface) error { + return RegisterDataHandlerClient(ctx, mux, NewDataClient(conn)) } -// RegisterRelationshipHandlerClient registers the http handlers for service Relationship -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RelationshipClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RelationshipClient" +// RegisterDataHandlerClient registers the http handlers for service Data +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DataClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DataClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "RelationshipClient" to call the correct interceptors. -func RegisterRelationshipHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RelationshipClient) error { +// "DataClient" to call the correct interceptors. +func RegisterDataHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DataClient) error { + + mux.Handle("POST", pattern_Data_Write_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/Write", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/write")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Data_Write_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Data_Write_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) - mux.Handle("POST", pattern_Relationship_Write_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Data_WriteRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Relationship/Write", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/write")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/WriteRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/write")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Relationship_Write_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Data_WriteRelationships_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Relationship_Write_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Data_WriteRelationships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Relationship_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Data_ReadRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Relationship/Read", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/read")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/ReadRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/relationships/read")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Relationship_Read_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Data_ReadRelationships_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Relationship_Read_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Data_ReadRelationships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_Relationship_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Data_ReadAttributes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Relationship/Delete", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/delete")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/ReadAttributes", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/attributes/read")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Relationship_Delete_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Data_ReadAttributes_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Relationship_Delete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Data_ReadAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Data_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/Delete", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/delete")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Data_Delete_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Data_Delete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Data_DeleteRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/DeleteRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/delete")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Data_DeleteRelationships_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Data_DeleteRelationships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1726,19 +2059,31 @@ func RegisterRelationshipHandlerClient(ctx context.Context, mux *runtime.ServeMu } var ( - pattern_Relationship_Write_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "relationships", "write"}, "")) + pattern_Data_Write_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "data", "write"}, "")) + + pattern_Data_WriteRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "relationships", "write"}, "")) + + pattern_Data_ReadRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4, 2, 5}, []string{"v1", "tenants", "tenant_id", "data", "relationships", "read"}, "")) - pattern_Relationship_Read_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "relationships", "read"}, "")) + pattern_Data_ReadAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4, 2, 5}, []string{"v1", "tenants", "tenant_id", "data", "attributes", "read"}, "")) - pattern_Relationship_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "relationships", "delete"}, "")) + pattern_Data_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "data", "delete"}, "")) + + pattern_Data_DeleteRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "relationships", "delete"}, "")) ) var ( - forward_Relationship_Write_0 = runtime.ForwardResponseMessage + forward_Data_Write_0 = runtime.ForwardResponseMessage + + forward_Data_WriteRelationships_0 = runtime.ForwardResponseMessage + + forward_Data_ReadRelationships_0 = runtime.ForwardResponseMessage + + forward_Data_ReadAttributes_0 = runtime.ForwardResponseMessage - forward_Relationship_Read_0 = runtime.ForwardResponseMessage + forward_Data_Delete_0 = runtime.ForwardResponseMessage - forward_Relationship_Delete_0 = runtime.ForwardResponseMessage + forward_Data_DeleteRelationships_0 = runtime.ForwardResponseMessage ) // RegisterTenancyHandlerFromEndpoint is same as RegisterTenancyHandler but diff --git a/generated/base/v1/service.pb.validate.go b/generated/base/v1/service.pb.validate.go index 87cd264..a2082ef 100644 --- a/generated/base/v1/service.pb.validate.go +++ b/generated/base/v1/service.pb.validate.go @@ -120,13 +120,23 @@ func (m *PermissionCheckRequest) Validate() error { } } - for idx, item := range m.GetContextualTuples() { + if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionCheckRequestValidationError{ + field: "Context", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetArguments() { _, _ = idx, item if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionCheckRequestValidationError{ - field: fmt.Sprintf("ContextualTuples[%v]", idx), + field: fmt.Sprintf("Arguments[%v]", idx), reason: "embedded message failed validation", cause: err, } @@ -500,13 +510,23 @@ func (m *PermissionExpandRequest) Validate() error { } - for idx, item := range m.GetContextualTuples() { + if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionExpandRequestValidationError{ + field: "Context", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetArguments() { _, _ = idx, item if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { return PermissionExpandRequestValidationError{ - field: fmt.Sprintf("ContextualTuples[%v]", idx), + field: fmt.Sprintf("Arguments[%v]", idx), reason: "embedded message failed validation", cause: err, } @@ -811,19 +831,14 @@ func (m *PermissionLookupEntityRequest) Validate() error { } } - for idx, item := range m.GetContextualTuples() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PermissionLookupEntityRequestValidationError{ - field: fmt.Sprintf("ContextualTuples[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionLookupEntityRequestValidationError{ + field: "Context", + reason: "embedded message failed validation", + cause: err, } } - } return nil @@ -1168,19 +1183,14 @@ func (m *PermissionEntityFilterRequest) Validate() error { } } - for idx, item := range m.GetContextualTuples() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PermissionEntityFilterRequestValidationError{ - field: fmt.Sprintf("ContextualTuples[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionEntityFilterRequestValidationError{ + field: "Context", + reason: "embedded message failed validation", + cause: err, } } - } return nil @@ -1404,19 +1414,14 @@ func (m *PermissionLookupSubjectRequest) Validate() error { } } - for idx, item := range m.GetContextualTuples() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PermissionLookupSubjectRequestValidationError{ - field: fmt.Sprintf("ContextualTuples[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionLookupSubjectRequestValidationError{ + field: "Context", + reason: "embedded message failed validation", + cause: err, } } - } return nil @@ -1495,6 +1500,13 @@ func (m *PermissionLookupSubjectRequestMetadata) Validate() error { // no validation rules for SnapToken + if m.GetDepth() < 3 { + return PermissionLookupSubjectRequestMetadataValidationError{ + field: "Depth", + reason: "value must be greater than or equal to 3", + } + } + return nil } @@ -1696,19 +1708,14 @@ func (m *PermissionSubjectPermissionRequest) Validate() error { } } - for idx, item := range m.GetContextualTuples() { - _, _ = idx, item - - if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return PermissionSubjectPermissionRequestValidationError{ - field: fmt.Sprintf("ContextualTuples[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } + if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PermissionSubjectPermissionRequestValidationError{ + field: "Context", + reason: "embedded message failed validation", + cause: err, } } - } return nil @@ -2482,30 +2489,30 @@ var _ interface { ErrorName() string } = SchemaReadResponseValidationError{} -// Validate checks the field values on RelationshipWriteRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RelationshipWriteRequest) Validate() error { +// Validate checks the field values on DataWriteRequest with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *DataWriteRequest) Validate() error { if m == nil { return nil } if len(m.GetTenantId()) > 64 { - return RelationshipWriteRequestValidationError{ + return DataWriteRequestValidationError{ field: "TenantId", reason: "value length must be at most 64 bytes", } } - if !_RelationshipWriteRequest_TenantId_Pattern.MatchString(m.GetTenantId()) { - return RelationshipWriteRequestValidationError{ + if !_DataWriteRequest_TenantId_Pattern.MatchString(m.GetTenantId()) { + return DataWriteRequestValidationError{ field: "TenantId", reason: "value does not match regex pattern \"[a-zA-Z0-9-,]+\"", } } if m.GetMetadata() == nil { - return RelationshipWriteRequestValidationError{ + return DataWriteRequestValidationError{ field: "Metadata", reason: "value is required", } @@ -2513,7 +2520,7 @@ func (m *RelationshipWriteRequest) Validate() error { if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return RelationshipWriteRequestValidationError{ + return DataWriteRequestValidationError{ field: "Metadata", reason: "embedded message failed validation", cause: err, @@ -2521,10 +2528,10 @@ func (m *RelationshipWriteRequest) Validate() error { } } - if l := len(m.GetTuples()); l < 1 || l > 100 { - return RelationshipWriteRequestValidationError{ + if len(m.GetTuples()) > 100 { + return DataWriteRequestValidationError{ field: "Tuples", - reason: "value must contain between 1 and 100 items, inclusive", + reason: "value must contain no more than 100 item(s)", } } @@ -2532,7 +2539,7 @@ func (m *RelationshipWriteRequest) Validate() error { _, _ = idx, item if item == nil { - return RelationshipWriteRequestValidationError{ + return DataWriteRequestValidationError{ field: fmt.Sprintf("Tuples[%v]", idx), reason: "value is required", } @@ -2540,7 +2547,7 @@ func (m *RelationshipWriteRequest) Validate() error { if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return RelationshipWriteRequestValidationError{ + return DataWriteRequestValidationError{ field: fmt.Sprintf("Tuples[%v]", idx), reason: "embedded message failed validation", cause: err, @@ -2550,12 +2557,41 @@ func (m *RelationshipWriteRequest) Validate() error { } + if len(m.GetAttributes()) > 100 { + return DataWriteRequestValidationError{ + field: "Attributes", + reason: "value must contain no more than 100 item(s)", + } + } + + for idx, item := range m.GetAttributes() { + _, _ = idx, item + + if item == nil { + return DataWriteRequestValidationError{ + field: fmt.Sprintf("Attributes[%v]", idx), + reason: "value is required", + } + } + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DataWriteRequestValidationError{ + field: fmt.Sprintf("Attributes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + return nil } -// RelationshipWriteRequestValidationError is the validation error returned by -// RelationshipWriteRequest.Validate if the designated constraints aren't met. -type RelationshipWriteRequestValidationError struct { +// DataWriteRequestValidationError is the validation error returned by +// DataWriteRequest.Validate if the designated constraints aren't met. +type DataWriteRequestValidationError struct { field string reason string cause error @@ -2563,24 +2599,22 @@ type RelationshipWriteRequestValidationError struct { } // Field function returns field value. -func (e RelationshipWriteRequestValidationError) Field() string { return e.field } +func (e DataWriteRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e RelationshipWriteRequestValidationError) Reason() string { return e.reason } +func (e DataWriteRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e RelationshipWriteRequestValidationError) Cause() error { return e.cause } +func (e DataWriteRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e RelationshipWriteRequestValidationError) Key() bool { return e.key } +func (e DataWriteRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e RelationshipWriteRequestValidationError) ErrorName() string { - return "RelationshipWriteRequestValidationError" -} +func (e DataWriteRequestValidationError) ErrorName() string { return "DataWriteRequestValidationError" } // Error satisfies the builtin error interface -func (e RelationshipWriteRequestValidationError) Error() string { +func (e DataWriteRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2592,14 +2626,14 @@ func (e RelationshipWriteRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sRelationshipWriteRequest.%s: %s%s", + "invalid %sDataWriteRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = RelationshipWriteRequestValidationError{} +var _ error = DataWriteRequestValidationError{} var _ interface { Field() string @@ -2607,14 +2641,14 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = RelationshipWriteRequestValidationError{} +} = DataWriteRequestValidationError{} -var _RelationshipWriteRequest_TenantId_Pattern = regexp.MustCompile("[a-zA-Z0-9-,]+") +var _DataWriteRequest_TenantId_Pattern = regexp.MustCompile("[a-zA-Z0-9-,]+") -// Validate checks the field values on RelationshipWriteRequestMetadata with -// the rules defined in the proto definition for this message. If any rules -// are violated, an error is returned. -func (m *RelationshipWriteRequestMetadata) Validate() error { +// Validate checks the field values on DataWriteRequestMetadata with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *DataWriteRequestMetadata) Validate() error { if m == nil { return nil } @@ -2624,10 +2658,9 @@ func (m *RelationshipWriteRequestMetadata) Validate() error { return nil } -// RelationshipWriteRequestMetadataValidationError is the validation error -// returned by RelationshipWriteRequestMetadata.Validate if the designated -// constraints aren't met. -type RelationshipWriteRequestMetadataValidationError struct { +// DataWriteRequestMetadataValidationError is the validation error returned by +// DataWriteRequestMetadata.Validate if the designated constraints aren't met. +type DataWriteRequestMetadataValidationError struct { field string reason string cause error @@ -2635,24 +2668,24 @@ type RelationshipWriteRequestMetadataValidationError struct { } // Field function returns field value. -func (e RelationshipWriteRequestMetadataValidationError) Field() string { return e.field } +func (e DataWriteRequestMetadataValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e RelationshipWriteRequestMetadataValidationError) Reason() string { return e.reason } +func (e DataWriteRequestMetadataValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e RelationshipWriteRequestMetadataValidationError) Cause() error { return e.cause } +func (e DataWriteRequestMetadataValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e RelationshipWriteRequestMetadataValidationError) Key() bool { return e.key } +func (e DataWriteRequestMetadataValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e RelationshipWriteRequestMetadataValidationError) ErrorName() string { - return "RelationshipWriteRequestMetadataValidationError" +func (e DataWriteRequestMetadataValidationError) ErrorName() string { + return "DataWriteRequestMetadataValidationError" } // Error satisfies the builtin error interface -func (e RelationshipWriteRequestMetadataValidationError) Error() string { +func (e DataWriteRequestMetadataValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2664,14 +2697,14 @@ func (e RelationshipWriteRequestMetadataValidationError) Error() string { } return fmt.Sprintf( - "invalid %sRelationshipWriteRequestMetadata.%s: %s%s", + "invalid %sDataWriteRequestMetadata.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = RelationshipWriteRequestMetadataValidationError{} +var _ error = DataWriteRequestMetadataValidationError{} var _ interface { Field() string @@ -2679,12 +2712,12 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = RelationshipWriteRequestMetadataValidationError{} +} = DataWriteRequestMetadataValidationError{} -// Validate checks the field values on RelationshipWriteResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RelationshipWriteResponse) Validate() error { +// Validate checks the field values on DataWriteResponse with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *DataWriteResponse) Validate() error { if m == nil { return nil } @@ -2694,9 +2727,9 @@ func (m *RelationshipWriteResponse) Validate() error { return nil } -// RelationshipWriteResponseValidationError is the validation error returned by -// RelationshipWriteResponse.Validate if the designated constraints aren't met. -type RelationshipWriteResponseValidationError struct { +// DataWriteResponseValidationError is the validation error returned by +// DataWriteResponse.Validate if the designated constraints aren't met. +type DataWriteResponseValidationError struct { field string reason string cause error @@ -2704,24 +2737,24 @@ type RelationshipWriteResponseValidationError struct { } // Field function returns field value. -func (e RelationshipWriteResponseValidationError) Field() string { return e.field } +func (e DataWriteResponseValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e RelationshipWriteResponseValidationError) Reason() string { return e.reason } +func (e DataWriteResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e RelationshipWriteResponseValidationError) Cause() error { return e.cause } +func (e DataWriteResponseValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e RelationshipWriteResponseValidationError) Key() bool { return e.key } +func (e DataWriteResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e RelationshipWriteResponseValidationError) ErrorName() string { - return "RelationshipWriteResponseValidationError" +func (e DataWriteResponseValidationError) ErrorName() string { + return "DataWriteResponseValidationError" } // Error satisfies the builtin error interface -func (e RelationshipWriteResponseValidationError) Error() string { +func (e DataWriteResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2733,14 +2766,14 @@ func (e RelationshipWriteResponseValidationError) Error() string { } return fmt.Sprintf( - "invalid %sRelationshipWriteResponse.%s: %s%s", + "invalid %sDataWriteResponse.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = RelationshipWriteResponseValidationError{} +var _ error = DataWriteResponseValidationError{} var _ interface { Field() string @@ -2748,32 +2781,32 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = RelationshipWriteResponseValidationError{} +} = DataWriteResponseValidationError{} -// Validate checks the field values on RelationshipReadRequest with the rules +// Validate checks the field values on RelationshipWriteRequest with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned. -func (m *RelationshipReadRequest) Validate() error { +func (m *RelationshipWriteRequest) Validate() error { if m == nil { return nil } if len(m.GetTenantId()) > 64 { - return RelationshipReadRequestValidationError{ + return RelationshipWriteRequestValidationError{ field: "TenantId", reason: "value length must be at most 64 bytes", } } - if !_RelationshipReadRequest_TenantId_Pattern.MatchString(m.GetTenantId()) { - return RelationshipReadRequestValidationError{ + if !_RelationshipWriteRequest_TenantId_Pattern.MatchString(m.GetTenantId()) { + return RelationshipWriteRequestValidationError{ field: "TenantId", reason: "value does not match regex pattern \"[a-zA-Z0-9-,]+\"", } } if m.GetMetadata() == nil { - return RelationshipReadRequestValidationError{ + return RelationshipWriteRequestValidationError{ field: "Metadata", reason: "value is required", } @@ -2781,7 +2814,7 @@ func (m *RelationshipReadRequest) Validate() error { if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return RelationshipReadRequestValidationError{ + return RelationshipWriteRequestValidationError{ field: "Metadata", reason: "embedded message failed validation", cause: err, @@ -2789,44 +2822,41 @@ func (m *RelationshipReadRequest) Validate() error { } } - if m.GetFilter() == nil { - return RelationshipReadRequestValidationError{ - field: "Filter", - reason: "value is required", + if l := len(m.GetTuples()); l < 1 || l > 100 { + return RelationshipWriteRequestValidationError{ + field: "Tuples", + reason: "value must contain between 1 and 100 items, inclusive", } } - if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RelationshipReadRequestValidationError{ - field: "Filter", - reason: "embedded message failed validation", - cause: err, + for idx, item := range m.GetTuples() { + _, _ = idx, item + + if item == nil { + return RelationshipWriteRequestValidationError{ + field: fmt.Sprintf("Tuples[%v]", idx), + reason: "value is required", } } - } - if m.GetPageSize() != 0 { - - if val := m.GetPageSize(); val < 1 || val > 100 { - return RelationshipReadRequestValidationError{ - field: "PageSize", - reason: "value must be inside range [1, 100]", + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RelationshipWriteRequestValidationError{ + field: fmt.Sprintf("Tuples[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } } } } - if m.GetContinuousToken() != "" { - - } - return nil } -// RelationshipReadRequestValidationError is the validation error returned by -// RelationshipReadRequest.Validate if the designated constraints aren't met. -type RelationshipReadRequestValidationError struct { +// RelationshipWriteRequestValidationError is the validation error returned by +// RelationshipWriteRequest.Validate if the designated constraints aren't met. +type RelationshipWriteRequestValidationError struct { field string reason string cause error @@ -2834,24 +2864,24 @@ type RelationshipReadRequestValidationError struct { } // Field function returns field value. -func (e RelationshipReadRequestValidationError) Field() string { return e.field } +func (e RelationshipWriteRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e RelationshipReadRequestValidationError) Reason() string { return e.reason } +func (e RelationshipWriteRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e RelationshipReadRequestValidationError) Cause() error { return e.cause } +func (e RelationshipWriteRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e RelationshipReadRequestValidationError) Key() bool { return e.key } +func (e RelationshipWriteRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e RelationshipReadRequestValidationError) ErrorName() string { - return "RelationshipReadRequestValidationError" +func (e RelationshipWriteRequestValidationError) ErrorName() string { + return "RelationshipWriteRequestValidationError" } // Error satisfies the builtin error interface -func (e RelationshipReadRequestValidationError) Error() string { +func (e RelationshipWriteRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2863,14 +2893,14 @@ func (e RelationshipReadRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sRelationshipReadRequest.%s: %s%s", + "invalid %sRelationshipWriteRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = RelationshipReadRequestValidationError{} +var _ error = RelationshipWriteRequestValidationError{} var _ interface { Field() string @@ -2878,27 +2908,512 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = RelationshipReadRequestValidationError{} +} = RelationshipWriteRequestValidationError{} -var _RelationshipReadRequest_TenantId_Pattern = regexp.MustCompile("[a-zA-Z0-9-,]+") +var _RelationshipWriteRequest_TenantId_Pattern = regexp.MustCompile("[a-zA-Z0-9-,]+") -// Validate checks the field values on RelationshipReadRequestMetadata with the -// rules defined in the proto definition for this message. If any rules are -// violated, an error is returned. -func (m *RelationshipReadRequestMetadata) Validate() error { +// Validate checks the field values on RelationshipWriteRequestMetadata with +// the rules defined in the proto definition for this message. If any rules +// are violated, an error is returned. +func (m *RelationshipWriteRequestMetadata) Validate() error { if m == nil { return nil } - // no validation rules for SnapToken + // no validation rules for SchemaVersion return nil } -// RelationshipReadRequestMetadataValidationError is the validation error -// returned by RelationshipReadRequestMetadata.Validate if the designated +// RelationshipWriteRequestMetadataValidationError is the validation error +// returned by RelationshipWriteRequestMetadata.Validate if the designated // constraints aren't met. -type RelationshipReadRequestMetadataValidationError struct { +type RelationshipWriteRequestMetadataValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RelationshipWriteRequestMetadataValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RelationshipWriteRequestMetadataValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RelationshipWriteRequestMetadataValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RelationshipWriteRequestMetadataValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RelationshipWriteRequestMetadataValidationError) ErrorName() string { + return "RelationshipWriteRequestMetadataValidationError" +} + +// Error satisfies the builtin error interface +func (e RelationshipWriteRequestMetadataValidationError) 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 %sRelationshipWriteRequestMetadata.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RelationshipWriteRequestMetadataValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RelationshipWriteRequestMetadataValidationError{} + +// Validate checks the field values on RelationshipWriteResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *RelationshipWriteResponse) Validate() error { + if m == nil { + return nil + } + + // no validation rules for SnapToken + + return nil +} + +// RelationshipWriteResponseValidationError is the validation error returned by +// RelationshipWriteResponse.Validate if the designated constraints aren't met. +type RelationshipWriteResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RelationshipWriteResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RelationshipWriteResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RelationshipWriteResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RelationshipWriteResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RelationshipWriteResponseValidationError) ErrorName() string { + return "RelationshipWriteResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e RelationshipWriteResponseValidationError) 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 %sRelationshipWriteResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RelationshipWriteResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RelationshipWriteResponseValidationError{} + +// Validate checks the field values on RelationshipReadRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *RelationshipReadRequest) Validate() error { + if m == nil { + return nil + } + + if len(m.GetTenantId()) > 64 { + return RelationshipReadRequestValidationError{ + field: "TenantId", + reason: "value length must be at most 64 bytes", + } + } + + if !_RelationshipReadRequest_TenantId_Pattern.MatchString(m.GetTenantId()) { + return RelationshipReadRequestValidationError{ + field: "TenantId", + reason: "value does not match regex pattern \"[a-zA-Z0-9-,]+\"", + } + } + + if m.GetMetadata() == nil { + return RelationshipReadRequestValidationError{ + field: "Metadata", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RelationshipReadRequestValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetFilter() == nil { + return RelationshipReadRequestValidationError{ + field: "Filter", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RelationshipReadRequestValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetPageSize() != 0 { + + if val := m.GetPageSize(); val < 1 || val > 100 { + return RelationshipReadRequestValidationError{ + field: "PageSize", + reason: "value must be inside range [1, 100]", + } + } + + } + + if m.GetContinuousToken() != "" { + + } + + return nil +} + +// RelationshipReadRequestValidationError is the validation error returned by +// RelationshipReadRequest.Validate if the designated constraints aren't met. +type RelationshipReadRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RelationshipReadRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RelationshipReadRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RelationshipReadRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RelationshipReadRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RelationshipReadRequestValidationError) ErrorName() string { + return "RelationshipReadRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e RelationshipReadRequestValidationError) 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 %sRelationshipReadRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RelationshipReadRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RelationshipReadRequestValidationError{} + +var _RelationshipReadRequest_TenantId_Pattern = regexp.MustCompile("[a-zA-Z0-9-,]+") + +// Validate checks the field values on RelationshipReadRequestMetadata with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *RelationshipReadRequestMetadata) Validate() error { + if m == nil { + return nil + } + + // no validation rules for SnapToken + + return nil +} + +// RelationshipReadRequestMetadataValidationError is the validation error +// returned by RelationshipReadRequestMetadata.Validate if the designated +// constraints aren't met. +type RelationshipReadRequestMetadataValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RelationshipReadRequestMetadataValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RelationshipReadRequestMetadataValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RelationshipReadRequestMetadataValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RelationshipReadRequestMetadataValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RelationshipReadRequestMetadataValidationError) ErrorName() string { + return "RelationshipReadRequestMetadataValidationError" +} + +// Error satisfies the builtin error interface +func (e RelationshipReadRequestMetadataValidationError) 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 %sRelationshipReadRequestMetadata.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RelationshipReadRequestMetadataValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RelationshipReadRequestMetadataValidationError{} + +// Validate checks the field values on RelationshipReadResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *RelationshipReadResponse) Validate() error { + if m == nil { + return nil + } + + for idx, item := range m.GetTuples() { + _, _ = idx, item + + if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RelationshipReadResponseValidationError{ + field: fmt.Sprintf("Tuples[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for ContinuousToken + + return nil +} + +// RelationshipReadResponseValidationError is the validation error returned by +// RelationshipReadResponse.Validate if the designated constraints aren't met. +type RelationshipReadResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RelationshipReadResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RelationshipReadResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RelationshipReadResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RelationshipReadResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RelationshipReadResponseValidationError) ErrorName() string { + return "RelationshipReadResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e RelationshipReadResponseValidationError) 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 %sRelationshipReadResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RelationshipReadResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RelationshipReadResponseValidationError{} + +// Validate checks the field values on AttributeReadRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *AttributeReadRequest) Validate() error { + if m == nil { + return nil + } + + if len(m.GetTenantId()) > 64 { + return AttributeReadRequestValidationError{ + field: "TenantId", + reason: "value length must be at most 64 bytes", + } + } + + if !_AttributeReadRequest_TenantId_Pattern.MatchString(m.GetTenantId()) { + return AttributeReadRequestValidationError{ + field: "TenantId", + reason: "value does not match regex pattern \"[a-zA-Z0-9-,]+\"", + } + } + + if m.GetMetadata() == nil { + return AttributeReadRequestValidationError{ + field: "Metadata", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeReadRequestValidationError{ + field: "Metadata", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetFilter() == nil { + return AttributeReadRequestValidationError{ + field: "Filter", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AttributeReadRequestValidationError{ + field: "Filter", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetPageSize() != 0 { + + if val := m.GetPageSize(); val < 1 || val > 100 { + return AttributeReadRequestValidationError{ + field: "PageSize", + reason: "value must be inside range [1, 100]", + } + } + + } + + if m.GetContinuousToken() != "" { + + } + + return nil +} + +// AttributeReadRequestValidationError is the validation error returned by +// AttributeReadRequest.Validate if the designated constraints aren't met. +type AttributeReadRequestValidationError struct { field string reason string cause error @@ -2906,24 +3421,24 @@ type RelationshipReadRequestMetadataValidationError struct { } // Field function returns field value. -func (e RelationshipReadRequestMetadataValidationError) Field() string { return e.field } +func (e AttributeReadRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e RelationshipReadRequestMetadataValidationError) Reason() string { return e.reason } +func (e AttributeReadRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e RelationshipReadRequestMetadataValidationError) Cause() error { return e.cause } +func (e AttributeReadRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e RelationshipReadRequestMetadataValidationError) Key() bool { return e.key } +func (e AttributeReadRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e RelationshipReadRequestMetadataValidationError) ErrorName() string { - return "RelationshipReadRequestMetadataValidationError" +func (e AttributeReadRequestValidationError) ErrorName() string { + return "AttributeReadRequestValidationError" } // Error satisfies the builtin error interface -func (e RelationshipReadRequestMetadataValidationError) Error() string { +func (e AttributeReadRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -2935,14 +3450,14 @@ func (e RelationshipReadRequestMetadataValidationError) Error() string { } return fmt.Sprintf( - "invalid %sRelationshipReadRequestMetadata.%s: %s%s", + "invalid %sAttributeReadRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = RelationshipReadRequestMetadataValidationError{} +var _ error = AttributeReadRequestValidationError{} var _ interface { Field() string @@ -2950,23 +3465,95 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = RelationshipReadRequestMetadataValidationError{} +} = AttributeReadRequestValidationError{} -// Validate checks the field values on RelationshipReadResponse with the rules +var _AttributeReadRequest_TenantId_Pattern = regexp.MustCompile("[a-zA-Z0-9-,]+") + +// Validate checks the field values on AttributeReadRequestMetadata with the +// rules defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *AttributeReadRequestMetadata) Validate() error { + if m == nil { + return nil + } + + // no validation rules for SnapToken + + return nil +} + +// AttributeReadRequestMetadataValidationError is the validation error returned +// by AttributeReadRequestMetadata.Validate if the designated constraints +// aren't met. +type AttributeReadRequestMetadataValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AttributeReadRequestMetadataValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AttributeReadRequestMetadataValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AttributeReadRequestMetadataValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AttributeReadRequestMetadataValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AttributeReadRequestMetadataValidationError) ErrorName() string { + return "AttributeReadRequestMetadataValidationError" +} + +// Error satisfies the builtin error interface +func (e AttributeReadRequestMetadataValidationError) 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 %sAttributeReadRequestMetadata.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AttributeReadRequestMetadataValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AttributeReadRequestMetadataValidationError{} + +// Validate checks the field values on AttributeReadResponse with the rules // defined in the proto definition for this message. If any rules are // violated, an error is returned. -func (m *RelationshipReadResponse) Validate() error { +func (m *AttributeReadResponse) Validate() error { if m == nil { return nil } - for idx, item := range m.GetTuples() { + for idx, item := range m.GetAttributes() { _, _ = idx, item if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return RelationshipReadResponseValidationError{ - field: fmt.Sprintf("Tuples[%v]", idx), + return AttributeReadResponseValidationError{ + field: fmt.Sprintf("Attributes[%v]", idx), reason: "embedded message failed validation", cause: err, } @@ -2980,9 +3567,9 @@ func (m *RelationshipReadResponse) Validate() error { return nil } -// RelationshipReadResponseValidationError is the validation error returned by -// RelationshipReadResponse.Validate if the designated constraints aren't met. -type RelationshipReadResponseValidationError struct { +// AttributeReadResponseValidationError is the validation error returned by +// AttributeReadResponse.Validate if the designated constraints aren't met. +type AttributeReadResponseValidationError struct { field string reason string cause error @@ -2990,24 +3577,24 @@ type RelationshipReadResponseValidationError struct { } // Field function returns field value. -func (e RelationshipReadResponseValidationError) Field() string { return e.field } +func (e AttributeReadResponseValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e RelationshipReadResponseValidationError) Reason() string { return e.reason } +func (e AttributeReadResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e RelationshipReadResponseValidationError) Cause() error { return e.cause } +func (e AttributeReadResponseValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e RelationshipReadResponseValidationError) Key() bool { return e.key } +func (e AttributeReadResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e RelationshipReadResponseValidationError) ErrorName() string { - return "RelationshipReadResponseValidationError" +func (e AttributeReadResponseValidationError) ErrorName() string { + return "AttributeReadResponseValidationError" } // Error satisfies the builtin error interface -func (e RelationshipReadResponseValidationError) Error() string { +func (e AttributeReadResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -3019,14 +3606,14 @@ func (e RelationshipReadResponseValidationError) Error() string { } return fmt.Sprintf( - "invalid %sRelationshipReadResponse.%s: %s%s", + "invalid %sAttributeReadResponse.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = RelationshipReadResponseValidationError{} +var _ error = AttributeReadResponseValidationError{} var _ interface { Field() string @@ -3034,7 +3621,193 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = RelationshipReadResponseValidationError{} +} = AttributeReadResponseValidationError{} + +// Validate checks the field values on DataDeleteRequest with the rules defined +// in the proto definition for this message. If any rules are violated, an +// error is returned. +func (m *DataDeleteRequest) Validate() error { + if m == nil { + return nil + } + + if len(m.GetTenantId()) > 64 { + return DataDeleteRequestValidationError{ + field: "TenantId", + reason: "value length must be at most 64 bytes", + } + } + + if !_DataDeleteRequest_TenantId_Pattern.MatchString(m.GetTenantId()) { + return DataDeleteRequestValidationError{ + field: "TenantId", + reason: "value does not match regex pattern \"[a-zA-Z0-9-,]+\"", + } + } + + if m.GetTupleFilter() == nil { + return DataDeleteRequestValidationError{ + field: "TupleFilter", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetTupleFilter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DataDeleteRequestValidationError{ + field: "TupleFilter", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if m.GetAttributeFilter() == nil { + return DataDeleteRequestValidationError{ + field: "AttributeFilter", + reason: "value is required", + } + } + + if v, ok := interface{}(m.GetAttributeFilter()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DataDeleteRequestValidationError{ + field: "AttributeFilter", + reason: "embedded message failed validation", + cause: err, + } + } + } + + return nil +} + +// DataDeleteRequestValidationError is the validation error returned by +// DataDeleteRequest.Validate if the designated constraints aren't met. +type DataDeleteRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DataDeleteRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DataDeleteRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DataDeleteRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DataDeleteRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DataDeleteRequestValidationError) ErrorName() string { + return "DataDeleteRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e DataDeleteRequestValidationError) 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 %sDataDeleteRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DataDeleteRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DataDeleteRequestValidationError{} + +var _DataDeleteRequest_TenantId_Pattern = regexp.MustCompile("[a-zA-Z0-9-,]+") + +// Validate checks the field values on DataDeleteResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, an error is returned. +func (m *DataDeleteResponse) Validate() error { + if m == nil { + return nil + } + + // no validation rules for SnapToken + + return nil +} + +// DataDeleteResponseValidationError is the validation error returned by +// DataDeleteResponse.Validate if the designated constraints aren't met. +type DataDeleteResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DataDeleteResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DataDeleteResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DataDeleteResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DataDeleteResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DataDeleteResponseValidationError) ErrorName() string { + return "DataDeleteResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e DataDeleteResponseValidationError) 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 %sDataDeleteResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DataDeleteResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DataDeleteResponseValidationError{} // Validate checks the field values on RelationshipDeleteRequest with the rules // defined in the proto definition for this message. If any rules are @@ -3054,14 +3827,7 @@ func (m *RelationshipDeleteRequest) Validate() error { if !_RelationshipDeleteRequest_TenantId_Pattern.MatchString(m.GetTenantId()) { return RelationshipDeleteRequestValidationError{ field: "TenantId", - reason: "value does not match regex pattern \"[a-zA-Z0-9-,]+\"", - } - } - - if m.GetFilter() == nil { - return RelationshipDeleteRequestValidationError{ - field: "Filter", - reason: "value is required", + reason: "value does not match regex pattern \"^[a-zA-Z0-9]+$\"", } } @@ -3134,7 +3900,7 @@ var _ interface { ErrorName() string } = RelationshipDeleteRequestValidationError{} -var _RelationshipDeleteRequest_TenantId_Pattern = regexp.MustCompile("[a-zA-Z0-9-,]+") +var _RelationshipDeleteRequest_TenantId_Pattern = regexp.MustCompile("^[a-zA-Z0-9]+$") // Validate checks the field values on RelationshipDeleteResponse with the // rules defined in the proto definition for this message. If any rules are diff --git a/generated/base/v1/service_grpc.pb.go b/generated/base/v1/service_grpc.pb.go index da050ed..d7de9fb 100644 --- a/generated/base/v1/service_grpc.pb.go +++ b/generated/base/v1/service_grpc.pb.go @@ -22,11 +22,24 @@ const _ = grpc.SupportPackageIsVersion7 // // 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 PermissionClient interface { + // Check method receives a PermissionCheckRequest and returns a PermissionCheckResponse. + // It is used to determine whether a specific user has permission to perform an action on a resource. + // For example, "Can the user 1 push to repository 1?" Check(ctx context.Context, in *PermissionCheckRequest, opts ...grpc.CallOption) (*PermissionCheckResponse, error) + // Expand method receives a PermissionExpandRequest and returns a PermissionExpandResponse. + // It expands relationships according to the schema provided. Expand(ctx context.Context, in *PermissionExpandRequest, opts ...grpc.CallOption) (*PermissionExpandResponse, error) + // LookupEntity method receives a PermissionLookupEntityRequest and returns a PermissionLookupEntityResponse. + // It is used to retrieve an entity by its identifier. LookupEntity(ctx context.Context, in *PermissionLookupEntityRequest, opts ...grpc.CallOption) (*PermissionLookupEntityResponse, error) + // LookupEntityStream method receives a PermissionLookupEntityRequest and streams a series of PermissionLookupEntityStreamResponse messages. + // It is used to retrieve entities by their identifiers in a streaming fashion. LookupEntityStream(ctx context.Context, in *PermissionLookupEntityRequest, opts ...grpc.CallOption) (Permission_LookupEntityStreamClient, error) + // LookupSubject method receives a PermissionLookupSubjectRequest and returns a PermissionLookupSubjectResponse. + // It is used to retrieve a subject by its identifier. LookupSubject(ctx context.Context, in *PermissionLookupSubjectRequest, opts ...grpc.CallOption) (*PermissionLookupSubjectResponse, error) + // SubjectPermission method receives a PermissionSubjectPermissionRequest and returns a PermissionSubjectPermissionResponse. + // It is used to retrieve permissions related to a specific subject. SubjectPermission(ctx context.Context, in *PermissionSubjectPermissionRequest, opts ...grpc.CallOption) (*PermissionSubjectPermissionResponse, error) } @@ -119,11 +132,24 @@ func (c *permissionClient) SubjectPermission(ctx context.Context, in *Permission // All implementations must embed UnimplementedPermissionServer // for forward compatibility type PermissionServer interface { + // Check method receives a PermissionCheckRequest and returns a PermissionCheckResponse. + // It is used to determine whether a specific user has permission to perform an action on a resource. + // For example, "Can the user 1 push to repository 1?" Check(context.Context, *PermissionCheckRequest) (*PermissionCheckResponse, error) + // Expand method receives a PermissionExpandRequest and returns a PermissionExpandResponse. + // It expands relationships according to the schema provided. Expand(context.Context, *PermissionExpandRequest) (*PermissionExpandResponse, error) + // LookupEntity method receives a PermissionLookupEntityRequest and returns a PermissionLookupEntityResponse. + // It is used to retrieve an entity by its identifier. LookupEntity(context.Context, *PermissionLookupEntityRequest) (*PermissionLookupEntityResponse, error) + // LookupEntityStream method receives a PermissionLookupEntityRequest and streams a series of PermissionLookupEntityStreamResponse messages. + // It is used to retrieve entities by their identifiers in a streaming fashion. LookupEntityStream(*PermissionLookupEntityRequest, Permission_LookupEntityStreamServer) error + // LookupSubject method receives a PermissionLookupSubjectRequest and returns a PermissionLookupSubjectResponse. + // It is used to retrieve a subject by its identifier. LookupSubject(context.Context, *PermissionLookupSubjectRequest) (*PermissionLookupSubjectResponse, error) + // SubjectPermission method receives a PermissionSubjectPermissionRequest and returns a PermissionSubjectPermissionResponse. + // It is used to retrieve permissions related to a specific subject. SubjectPermission(context.Context, *PermissionSubjectPermissionRequest) (*PermissionSubjectPermissionResponse, error) mustEmbedUnimplementedPermissionServer() } @@ -429,7 +455,9 @@ var Watch_ServiceDesc = grpc.ServiceDesc{ // // 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 SchemaClient interface { + // Write is an RPC that allows you to write your authorization model. Write(ctx context.Context, in *SchemaWriteRequest, opts ...grpc.CallOption) (*SchemaWriteResponse, error) + // Read is an RPC that allows you to read your authorization model. Read(ctx context.Context, in *SchemaReadRequest, opts ...grpc.CallOption) (*SchemaReadResponse, error) } @@ -463,7 +491,9 @@ func (c *schemaClient) Read(ctx context.Context, in *SchemaReadRequest, opts ... // All implementations must embed UnimplementedSchemaServer // for forward compatibility type SchemaServer interface { + // Write is an RPC that allows you to write your authorization model. Write(context.Context, *SchemaWriteRequest) (*SchemaWriteResponse, error) + // Read is an RPC that allows you to read your authorization model. Read(context.Context, *SchemaReadRequest) (*SchemaReadResponse, error) mustEmbedUnimplementedSchemaServer() } @@ -547,158 +577,278 @@ var Schema_ServiceDesc = grpc.ServiceDesc{ Metadata: "base/v1/service.proto", } -// RelationshipClient is the client API for Relationship service. +// DataClient is the client API for Data 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 RelationshipClient interface { - Write(ctx context.Context, in *RelationshipWriteRequest, opts ...grpc.CallOption) (*RelationshipWriteResponse, error) - Read(ctx context.Context, in *RelationshipReadRequest, opts ...grpc.CallOption) (*RelationshipReadResponse, error) - Delete(ctx context.Context, in *RelationshipDeleteRequest, opts ...grpc.CallOption) (*RelationshipDeleteResponse, error) +type DataClient interface { + // The Write RPC method creates a new relation tuple. + Write(ctx context.Context, in *DataWriteRequest, opts ...grpc.CallOption) (*DataWriteResponse, error) + // RPC method to write relationships for a tenant. This can be accessed via a POST request to the given HTTP path. It's tagged under "Data" in OpenAPI documentation. + WriteRelationships(ctx context.Context, in *RelationshipWriteRequest, opts ...grpc.CallOption) (*RelationshipWriteResponse, error) + // The ReadRelationships RPC method reads relation tuple(s). + ReadRelationships(ctx context.Context, in *RelationshipReadRequest, opts ...grpc.CallOption) (*RelationshipReadResponse, error) + // The ReadAttributes RPC method reads attribute(s) of a relation. + ReadAttributes(ctx context.Context, in *AttributeReadRequest, opts ...grpc.CallOption) (*AttributeReadResponse, error) + // The Delete RPC method deletes a relation tuple. + Delete(ctx context.Context, in *DataDeleteRequest, opts ...grpc.CallOption) (*DataDeleteResponse, error) + // RPC method to delete relationships for a tenant, accessed via a POST request to the specified path, tagged as "Data" in OpenAPI documentation. + DeleteRelationships(ctx context.Context, in *RelationshipDeleteRequest, opts ...grpc.CallOption) (*RelationshipDeleteResponse, error) +} + +type dataClient struct { + cc grpc.ClientConnInterface } -type relationshipClient struct { - cc grpc.ClientConnInterface +func NewDataClient(cc grpc.ClientConnInterface) DataClient { + return &dataClient{cc} } -func NewRelationshipClient(cc grpc.ClientConnInterface) RelationshipClient { - return &relationshipClient{cc} +func (c *dataClient) Write(ctx context.Context, in *DataWriteRequest, opts ...grpc.CallOption) (*DataWriteResponse, error) { + out := new(DataWriteResponse) + err := c.cc.Invoke(ctx, "/base.v1.Data/Write", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (c *relationshipClient) Write(ctx context.Context, in *RelationshipWriteRequest, opts ...grpc.CallOption) (*RelationshipWriteResponse, error) { +func (c *dataClient) WriteRelationships(ctx context.Context, in *RelationshipWriteRequest, opts ...grpc.CallOption) (*RelationshipWriteResponse, error) { out := new(RelationshipWriteResponse) - err := c.cc.Invoke(ctx, "/base.v1.Relationship/Write", in, out, opts...) + err := c.cc.Invoke(ctx, "/base.v1.Data/WriteRelationships", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *relationshipClient) Read(ctx context.Context, in *RelationshipReadRequest, opts ...grpc.CallOption) (*RelationshipReadResponse, error) { +func (c *dataClient) ReadRelationships(ctx context.Context, in *RelationshipReadRequest, opts ...grpc.CallOption) (*RelationshipReadResponse, error) { out := new(RelationshipReadResponse) - err := c.cc.Invoke(ctx, "/base.v1.Relationship/Read", in, out, opts...) + err := c.cc.Invoke(ctx, "/base.v1.Data/ReadRelationships", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *relationshipClient) Delete(ctx context.Context, in *RelationshipDeleteRequest, opts ...grpc.CallOption) (*RelationshipDeleteResponse, error) { - out := new(RelationshipDeleteResponse) - err := c.cc.Invoke(ctx, "/base.v1.Relationship/Delete", in, out, opts...) +func (c *dataClient) ReadAttributes(ctx context.Context, in *AttributeReadRequest, opts ...grpc.CallOption) (*AttributeReadResponse, error) { + out := new(AttributeReadResponse) + err := c.cc.Invoke(ctx, "/base.v1.Data/ReadAttributes", in, out, opts...) if err != nil { return nil, err } return out, nil } -// RelationshipServer is the server API for Relationship service. -// All implementations must embed UnimplementedRelationshipServer -// for forward compatibility -type RelationshipServer interface { - Write(context.Context, *RelationshipWriteRequest) (*RelationshipWriteResponse, error) - Read(context.Context, *RelationshipReadRequest) (*RelationshipReadResponse, error) - Delete(context.Context, *RelationshipDeleteRequest) (*RelationshipDeleteResponse, error) - mustEmbedUnimplementedRelationshipServer() +func (c *dataClient) Delete(ctx context.Context, in *DataDeleteRequest, opts ...grpc.CallOption) (*DataDeleteResponse, error) { + out := new(DataDeleteResponse) + err := c.cc.Invoke(ctx, "/base.v1.Data/Delete", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -// UnimplementedRelationshipServer must be embedded to have forward compatible implementations. -type UnimplementedRelationshipServer struct { +func (c *dataClient) DeleteRelationships(ctx context.Context, in *RelationshipDeleteRequest, opts ...grpc.CallOption) (*RelationshipDeleteResponse, error) { + out := new(RelationshipDeleteResponse) + err := c.cc.Invoke(ctx, "/base.v1.Data/DeleteRelationships", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil } -func (UnimplementedRelationshipServer) Write(context.Context, *RelationshipWriteRequest) (*RelationshipWriteResponse, error) { +// DataServer is the server API for Data service. +// All implementations must embed UnimplementedDataServer +// for forward compatibility +type DataServer interface { + // The Write RPC method creates a new relation tuple. + Write(context.Context, *DataWriteRequest) (*DataWriteResponse, error) + // RPC method to write relationships for a tenant. This can be accessed via a POST request to the given HTTP path. It's tagged under "Data" in OpenAPI documentation. + WriteRelationships(context.Context, *RelationshipWriteRequest) (*RelationshipWriteResponse, error) + // The ReadRelationships RPC method reads relation tuple(s). + ReadRelationships(context.Context, *RelationshipReadRequest) (*RelationshipReadResponse, error) + // The ReadAttributes RPC method reads attribute(s) of a relation. + ReadAttributes(context.Context, *AttributeReadRequest) (*AttributeReadResponse, error) + // The Delete RPC method deletes a relation tuple. + Delete(context.Context, *DataDeleteRequest) (*DataDeleteResponse, error) + // RPC method to delete relationships for a tenant, accessed via a POST request to the specified path, tagged as "Data" in OpenAPI documentation. + DeleteRelationships(context.Context, *RelationshipDeleteRequest) (*RelationshipDeleteResponse, error) + mustEmbedUnimplementedDataServer() +} + +// UnimplementedDataServer must be embedded to have forward compatible implementations. +type UnimplementedDataServer struct { +} + +func (UnimplementedDataServer) Write(context.Context, *DataWriteRequest) (*DataWriteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Write not implemented") } -func (UnimplementedRelationshipServer) Read(context.Context, *RelationshipReadRequest) (*RelationshipReadResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Read not implemented") +func (UnimplementedDataServer) WriteRelationships(context.Context, *RelationshipWriteRequest) (*RelationshipWriteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WriteRelationships not implemented") +} +func (UnimplementedDataServer) ReadRelationships(context.Context, *RelationshipReadRequest) (*RelationshipReadResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReadRelationships not implemented") } -func (UnimplementedRelationshipServer) Delete(context.Context, *RelationshipDeleteRequest) (*RelationshipDeleteResponse, error) { +func (UnimplementedDataServer) ReadAttributes(context.Context, *AttributeReadRequest) (*AttributeReadResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReadAttributes not implemented") +} +func (UnimplementedDataServer) Delete(context.Context, *DataDeleteRequest) (*DataDeleteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") } -func (UnimplementedRelationshipServer) mustEmbedUnimplementedRelationshipServer() {} +func (UnimplementedDataServer) DeleteRelationships(context.Context, *RelationshipDeleteRequest) (*RelationshipDeleteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteRelationships not implemented") +} +func (UnimplementedDataServer) mustEmbedUnimplementedDataServer() {} -// UnsafeRelationshipServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to RelationshipServer will +// UnsafeDataServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DataServer will // result in compilation errors. -type UnsafeRelationshipServer interface { - mustEmbedUnimplementedRelationshipServer() +type UnsafeDataServer interface { + mustEmbedUnimplementedDataServer() } -func RegisterRelationshipServer(s grpc.ServiceRegistrar, srv RelationshipServer) { - s.RegisterService(&Relationship_ServiceDesc, srv) +func RegisterDataServer(s grpc.ServiceRegistrar, srv DataServer) { + s.RegisterService(&Data_ServiceDesc, srv) +} + +func _Data_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DataWriteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataServer).Write(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/base.v1.Data/Write", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataServer).Write(ctx, req.(*DataWriteRequest)) + } + return interceptor(ctx, in, info, handler) } -func _Relationship_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Data_WriteRelationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RelationshipWriteRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RelationshipServer).Write(ctx, in) + return srv.(DataServer).WriteRelationships(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/base.v1.Relationship/Write", + FullMethod: "/base.v1.Data/WriteRelationships", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RelationshipServer).Write(ctx, req.(*RelationshipWriteRequest)) + return srv.(DataServer).WriteRelationships(ctx, req.(*RelationshipWriteRequest)) } return interceptor(ctx, in, info, handler) } -func _Relationship_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Data_ReadRelationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RelationshipReadRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RelationshipServer).Read(ctx, in) + return srv.(DataServer).ReadRelationships(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/base.v1.Data/ReadRelationships", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataServer).ReadRelationships(ctx, req.(*RelationshipReadRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Data_ReadAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AttributeReadRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataServer).ReadAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/base.v1.Data/ReadAttributes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataServer).ReadAttributes(ctx, req.(*AttributeReadRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Data_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DataDeleteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataServer).Delete(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/base.v1.Relationship/Read", + FullMethod: "/base.v1.Data/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RelationshipServer).Read(ctx, req.(*RelationshipReadRequest)) + return srv.(DataServer).Delete(ctx, req.(*DataDeleteRequest)) } return interceptor(ctx, in, info, handler) } -func _Relationship_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Data_DeleteRelationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RelationshipDeleteRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(RelationshipServer).Delete(ctx, in) + return srv.(DataServer).DeleteRelationships(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/base.v1.Relationship/Delete", + FullMethod: "/base.v1.Data/DeleteRelationships", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RelationshipServer).Delete(ctx, req.(*RelationshipDeleteRequest)) + return srv.(DataServer).DeleteRelationships(ctx, req.(*RelationshipDeleteRequest)) } return interceptor(ctx, in, info, handler) } -// Relationship_ServiceDesc is the grpc.ServiceDesc for Relationship service. +// Data_ServiceDesc is the grpc.ServiceDesc for Data service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var Relationship_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "base.v1.Relationship", - HandlerType: (*RelationshipServer)(nil), +var Data_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "base.v1.Data", + HandlerType: (*DataServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Write", - Handler: _Relationship_Write_Handler, + Handler: _Data_Write_Handler, }, { - MethodName: "Read", - Handler: _Relationship_Read_Handler, + MethodName: "WriteRelationships", + Handler: _Data_WriteRelationships_Handler, + }, + { + MethodName: "ReadRelationships", + Handler: _Data_ReadRelationships_Handler, + }, + { + MethodName: "ReadAttributes", + Handler: _Data_ReadAttributes_Handler, }, { MethodName: "Delete", - Handler: _Relationship_Delete_Handler, + Handler: _Data_Delete_Handler, + }, + { + MethodName: "DeleteRelationships", + Handler: _Data_DeleteRelationships_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -709,8 +859,14 @@ var Relationship_ServiceDesc = grpc.ServiceDesc{ // // 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 TenancyClient interface { + // Create is a unary RPC to create a new tenant. + // It requires a TenantCreateRequest and returns a TenantCreateResponse. Create(ctx context.Context, in *TenantCreateRequest, opts ...grpc.CallOption) (*TenantCreateResponse, error) + // Delete is a unary RPC to delete an existing tenant. + // It requires a TenantDeleteRequest and returns a TenantDeleteResponse. Delete(ctx context.Context, in *TenantDeleteRequest, opts ...grpc.CallOption) (*TenantDeleteResponse, error) + // List is a unary RPC to get a list of all tenants. + // It requires a TenantListRequest and returns a TenantListResponse. List(ctx context.Context, in *TenantListRequest, opts ...grpc.CallOption) (*TenantListResponse, error) } @@ -753,8 +909,14 @@ func (c *tenancyClient) List(ctx context.Context, in *TenantListRequest, opts .. // All implementations must embed UnimplementedTenancyServer // for forward compatibility type TenancyServer interface { + // Create is a unary RPC to create a new tenant. + // It requires a TenantCreateRequest and returns a TenantCreateResponse. Create(context.Context, *TenantCreateRequest) (*TenantCreateResponse, error) + // Delete is a unary RPC to delete an existing tenant. + // It requires a TenantDeleteRequest and returns a TenantDeleteResponse. Delete(context.Context, *TenantDeleteRequest) (*TenantDeleteResponse, error) + // List is a unary RPC to get a list of all tenants. + // It requires a TenantListRequest and returns a TenantListResponse. List(context.Context, *TenantListRequest) (*TenantListResponse, error) mustEmbedUnimplementedTenancyServer() } diff --git a/generated/base/v1/service_vtproto.pb.go b/generated/base/v1/service_vtproto.pb.go index d10aac9..50484b9 100644 --- a/generated/base/v1/service_vtproto.pb.go +++ b/generated/base/v1/service_vtproto.pb.go @@ -47,17 +47,27 @@ func (m *PermissionCheckRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.ContextualTuples) > 0 { - for iNdEx := len(m.ContextualTuples) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.ContextualTuples[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if len(m.Arguments) > 0 { + for iNdEx := len(m.Arguments) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Arguments[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a + } + } + if m.Context != nil { + size, err := m.Context.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 } if m.Subject != nil { size, err := m.Subject.MarshalToSizedBufferVT(dAtA[:i]) @@ -274,17 +284,27 @@ func (m *PermissionExpandRequest) MarshalToSizedBufferVT(dAtA []byte) (int, erro i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.ContextualTuples) > 0 { - for iNdEx := len(m.ContextualTuples) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.ContextualTuples[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if len(m.Arguments) > 0 { + for iNdEx := len(m.Arguments) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Arguments[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 + } + } + if m.Context != nil { + size, err := m.Context.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a } if len(m.Permission) > 0 { i -= len(m.Permission) @@ -443,17 +463,15 @@ func (m *PermissionLookupEntityRequest) MarshalToSizedBufferVT(dAtA []byte) (int i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.ContextualTuples) > 0 { - for iNdEx := len(m.ContextualTuples) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.ContextualTuples[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 + if m.Context != nil { + size, err := m.Context.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 } if m.Subject != nil { size, err := m.Subject.MarshalToSizedBufferVT(dAtA[:i]) @@ -663,17 +681,15 @@ func (m *PermissionEntityFilterRequest) MarshalToSizedBufferVT(dAtA []byte) (int i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.ContextualTuples) > 0 { - for iNdEx := len(m.ContextualTuples) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.ContextualTuples[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a + if m.Context != nil { + size, err := m.Context.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a } if m.Subject != nil { size, err := m.Subject.MarshalToSizedBufferVT(dAtA[:i]) @@ -797,17 +813,15 @@ func (m *PermissionLookupSubjectRequest) MarshalToSizedBufferVT(dAtA []byte) (in i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.ContextualTuples) > 0 { - for iNdEx := len(m.ContextualTuples) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.ContextualTuples[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 + if m.Context != nil { + size, err := m.Context.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 } if m.SubjectReference != nil { size, err := m.SubjectReference.MarshalToSizedBufferVT(dAtA[:i]) @@ -886,6 +900,11 @@ func (m *PermissionLookupSubjectRequestMetadata) MarshalToSizedBufferVT(dAtA []b i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.Depth != 0 { + i = encodeVarint(dAtA, i, uint64(m.Depth)) + i-- + dAtA[i] = 0x18 + } if len(m.SnapToken) > 0 { i -= len(m.SnapToken) copy(dAtA[i:], m.SnapToken) @@ -975,17 +994,15 @@ func (m *PermissionSubjectPermissionRequest) MarshalToSizedBufferVT(dAtA []byte) i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.ContextualTuples) > 0 { - for iNdEx := len(m.ContextualTuples) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.ContextualTuples[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a + if m.Context != nil { + size, err := m.Context.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2a } if m.Subject != nil { size, err := m.Subject.MarshalToSizedBufferVT(dAtA[:i]) @@ -1449,6 +1466,160 @@ func (m *SchemaReadResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *DataWriteRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DataWriteRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DataWriteRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Attributes[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 + } + } + if len(m.Tuples) > 0 { + for iNdEx := len(m.Tuples) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Tuples[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + } + if m.Metadata != nil { + size, err := m.Metadata.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.TenantId) > 0 { + i -= len(m.TenantId) + copy(dAtA[i:], m.TenantId) + i = encodeVarint(dAtA, i, uint64(len(m.TenantId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DataWriteRequestMetadata) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DataWriteRequestMetadata) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DataWriteRequestMetadata) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SchemaVersion) > 0 { + i -= len(m.SchemaVersion) + copy(dAtA[i:], m.SchemaVersion) + i = encodeVarint(dAtA, i, uint64(len(m.SchemaVersion))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DataWriteResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DataWriteResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DataWriteResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SnapToken) > 0 { + i -= len(m.SnapToken) + copy(dAtA[i:], m.SnapToken) + i = encodeVarint(dAtA, i, uint64(len(m.SnapToken))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *RelationshipWriteRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -1755,7 +1926,7 @@ func (m *RelationshipReadResponse) MarshalToSizedBufferVT(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *RelationshipDeleteRequest) MarshalVT() (dAtA []byte, err error) { +func (m *AttributeReadRequest) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -1768,12 +1939,12 @@ func (m *RelationshipDeleteRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *RelationshipDeleteRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *AttributeReadRequest) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *RelationshipDeleteRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *AttributeReadRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -1785,6 +1956,18 @@ func (m *RelationshipDeleteRequest) MarshalToSizedBufferVT(dAtA []byte) (int, er i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if len(m.ContinuousToken) > 0 { + i -= len(m.ContinuousToken) + copy(dAtA[i:], m.ContinuousToken) + i = encodeVarint(dAtA, i, uint64(len(m.ContinuousToken))) + i-- + dAtA[i] = 0x2a + } + if m.PageSize != 0 { + i = encodeVarint(dAtA, i, uint64(m.PageSize)) + i-- + dAtA[i] = 0x20 + } if m.Filter != nil { size, err := m.Filter.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { @@ -1793,6 +1976,16 @@ func (m *RelationshipDeleteRequest) MarshalToSizedBufferVT(dAtA []byte) (int, er i -= size i = encodeVarint(dAtA, i, uint64(size)) i-- + dAtA[i] = 0x1a + } + if m.Metadata != nil { + size, err := m.Metadata.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- dAtA[i] = 0x12 } if len(m.TenantId) > 0 { @@ -1805,7 +1998,7 @@ func (m *RelationshipDeleteRequest) MarshalToSizedBufferVT(dAtA []byte) (int, er return len(dAtA) - i, nil } -func (m *RelationshipDeleteResponse) MarshalVT() (dAtA []byte, err error) { +func (m *AttributeReadRequestMetadata) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -1818,12 +2011,12 @@ func (m *RelationshipDeleteResponse) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *RelationshipDeleteResponse) MarshalToVT(dAtA []byte) (int, error) { +func (m *AttributeReadRequestMetadata) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *RelationshipDeleteResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *AttributeReadRequestMetadata) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -1845,7 +2038,7 @@ func (m *RelationshipDeleteResponse) MarshalToSizedBufferVT(dAtA []byte) (int, e return len(dAtA) - i, nil } -func (m *TenantCreateRequest) MarshalVT() (dAtA []byte, err error) { +func (m *AttributeReadResponse) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil } @@ -1858,12 +2051,12 @@ func (m *TenantCreateRequest) MarshalVT() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TenantCreateRequest) MarshalToVT(dAtA []byte) (int, error) { +func (m *AttributeReadResponse) MarshalToVT(dAtA []byte) (int, error) { size := m.SizeVT() return m.MarshalToSizedBufferVT(dAtA[:size]) } -func (m *TenantCreateRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { +func (m *AttributeReadResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if m == nil { return 0, nil } @@ -1875,19 +2068,261 @@ func (m *TenantCreateRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + if len(m.ContinuousToken) > 0 { + i -= len(m.ContinuousToken) + copy(dAtA[i:], m.ContinuousToken) + i = encodeVarint(dAtA, i, uint64(len(m.ContinuousToken))) i-- dAtA[i] = 0x12 } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.Attributes[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *DataDeleteRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DataDeleteRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DataDeleteRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.AttributeFilter != nil { + size, err := m.AttributeFilter.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + } + if m.TupleFilter != nil { + size, err := m.TupleFilter.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.TenantId) > 0 { + i -= len(m.TenantId) + copy(dAtA[i:], m.TenantId) + i = encodeVarint(dAtA, i, uint64(len(m.TenantId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DataDeleteResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DataDeleteResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DataDeleteResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SnapToken) > 0 { + i -= len(m.SnapToken) + copy(dAtA[i:], m.SnapToken) + i = encodeVarint(dAtA, i, uint64(len(m.SnapToken))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RelationshipDeleteRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RelationshipDeleteRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *RelationshipDeleteRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Filter != nil { + size, err := m.Filter.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if len(m.TenantId) > 0 { + i -= len(m.TenantId) + copy(dAtA[i:], m.TenantId) + i = encodeVarint(dAtA, i, uint64(len(m.TenantId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RelationshipDeleteResponse) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RelationshipDeleteResponse) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *RelationshipDeleteResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.SnapToken) > 0 { + i -= len(m.SnapToken) + copy(dAtA[i:], m.SnapToken) + i = encodeVarint(dAtA, i, uint64(len(m.SnapToken))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TenantCreateRequest) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TenantCreateRequest) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *TenantCreateRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -2141,8 +2576,12 @@ func (m *PermissionCheckRequest) SizeVT() (n int) { l = m.Subject.SizeVT() n += 1 + l + sov(uint64(l)) } - if len(m.ContextualTuples) > 0 { - for _, e := range m.ContextualTuples { + if m.Context != nil { + l = m.Context.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if len(m.Arguments) > 0 { + for _, e := range m.Arguments { l = e.SizeVT() n += 1 + l + sov(uint64(l)) } @@ -2232,8 +2671,12 @@ func (m *PermissionExpandRequest) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } - if len(m.ContextualTuples) > 0 { - for _, e := range m.ContextualTuples { + if m.Context != nil { + l = m.Context.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if len(m.Arguments) > 0 { + for _, e := range m.Arguments { l = e.SizeVT() n += 1 + l + sov(uint64(l)) } @@ -2306,11 +2749,9 @@ func (m *PermissionLookupEntityRequest) SizeVT() (n int) { l = m.Subject.SizeVT() n += 1 + l + sov(uint64(l)) } - if len(m.ContextualTuples) > 0 { - for _, e := range m.ContextualTuples { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } + if m.Context != nil { + l = m.Context.SizeVT() + n += 1 + l + sov(uint64(l)) } if m.unknownFields != nil { n += len(m.unknownFields) @@ -2397,11 +2838,9 @@ func (m *PermissionEntityFilterRequest) SizeVT() (n int) { l = m.Subject.SizeVT() n += 1 + l + sov(uint64(l)) } - if len(m.ContextualTuples) > 0 { - for _, e := range m.ContextualTuples { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } + if m.Context != nil { + l = m.Context.SizeVT() + n += 1 + l + sov(uint64(l)) } if m.unknownFields != nil { n += len(m.unknownFields) @@ -2458,11 +2897,9 @@ func (m *PermissionLookupSubjectRequest) SizeVT() (n int) { l = m.SubjectReference.SizeVT() n += 1 + l + sov(uint64(l)) } - if len(m.ContextualTuples) > 0 { - for _, e := range m.ContextualTuples { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } + if m.Context != nil { + l = m.Context.SizeVT() + n += 1 + l + sov(uint64(l)) } if m.unknownFields != nil { n += len(m.unknownFields) @@ -2484,6 +2921,9 @@ func (m *PermissionLookupSubjectRequestMetadata) SizeVT() (n int) { if l > 0 { n += 1 + l + sov(uint64(l)) } + if m.Depth != 0 { + n += 1 + sov(uint64(m.Depth)) + } if m.unknownFields != nil { n += len(m.unknownFields) } @@ -2530,11 +2970,9 @@ func (m *PermissionSubjectPermissionRequest) SizeVT() (n int) { l = m.Subject.SizeVT() n += 1 + l + sov(uint64(l)) } - if len(m.ContextualTuples) > 0 { - for _, e := range m.ContextualTuples { - l = e.SizeVT() - n += 1 + l + sov(uint64(l)) - } + if m.Context != nil { + l = m.Context.SizeVT() + n += 1 + l + sov(uint64(l)) } if m.unknownFields != nil { n += len(m.unknownFields) @@ -2712,6 +3150,70 @@ func (m *SchemaReadResponse) SizeVT() (n int) { return n } +func (m *DataWriteRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TenantId) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if len(m.Tuples) > 0 { + for _, e := range m.Tuples { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *DataWriteRequestMetadata) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SchemaVersion) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *DataWriteResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SnapToken) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + func (m *RelationshipWriteRequest) SizeVT() (n int) { if m == nil { return 0 @@ -2839,6 +3341,115 @@ func (m *RelationshipReadResponse) SizeVT() (n int) { return n } +func (m *AttributeReadRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TenantId) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.Filter != nil { + l = m.Filter.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.PageSize != 0 { + n += 1 + sov(uint64(m.PageSize)) + } + l = len(m.ContinuousToken) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *AttributeReadRequestMetadata) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SnapToken) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *AttributeReadResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } + l = len(m.ContinuousToken) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *DataDeleteRequest) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TenantId) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.TupleFilter != nil { + l = m.TupleFilter.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.AttributeFilter != nil { + l = m.AttributeFilter.SizeVT() + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + +func (m *DataDeleteResponse) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SnapToken) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + func (m *RelationshipDeleteRequest) SizeVT() (n int) { if m == nil { return 0 @@ -3187,7 +3798,43 @@ func (m *PermissionCheckRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContextualTuples", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Context == nil { + m.Context = &Context{} + } + if err := m.Context.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Arguments", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3214,8 +3861,8 @@ func (m *PermissionCheckRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ContextualTuples = append(m.ContextualTuples, &Tuple{}) - if err := m.ContextualTuples[len(m.ContextualTuples)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Arguments = append(m.Arguments, &Argument{}) + if err := m.Arguments[len(m.Arguments)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3718,7 +4365,43 @@ func (m *PermissionExpandRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContextualTuples", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Context == nil { + m.Context = &Context{} + } + if err := m.Context.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Arguments", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3745,8 +4428,8 @@ func (m *PermissionExpandRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ContextualTuples = append(m.ContextualTuples, &Tuple{}) - if err := m.ContextualTuples[len(m.ContextualTuples)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Arguments = append(m.Arguments, &Argument{}) + if err := m.Arguments[len(m.Arguments)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4173,7 +4856,7 @@ func (m *PermissionLookupEntityRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContextualTuples", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4200,8 +4883,10 @@ func (m *PermissionLookupEntityRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ContextualTuples = append(m.ContextualTuples, &Tuple{}) - if err := m.ContextualTuples[len(m.ContextualTuples)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.Context == nil { + m.Context = &Context{} + } + if err := m.Context.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4698,7 +5383,7 @@ func (m *PermissionEntityFilterRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContextualTuples", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4725,8 +5410,10 @@ func (m *PermissionEntityFilterRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ContextualTuples = append(m.ContextualTuples, &Tuple{}) - if err := m.ContextualTuples[len(m.ContextualTuples)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.Context == nil { + m.Context = &Context{} + } + if err := m.Context.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5089,7 +5776,7 @@ func (m *PermissionLookupSubjectRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContextualTuples", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5116,8 +5803,10 @@ func (m *PermissionLookupSubjectRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ContextualTuples = append(m.ContextualTuples, &Tuple{}) - if err := m.ContextualTuples[len(m.ContextualTuples)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.Context == nil { + m.Context = &Context{} + } + if err := m.Context.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5236,6 +5925,25 @@ func (m *PermissionLookupSubjectRequestMetadata) UnmarshalVT(dAtA []byte) error } m.SnapToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Depth", wireType) + } + m.Depth = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Depth |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -5512,7 +6220,7 @@ func (m *PermissionSubjectPermissionRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContextualTuples", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5539,8 +6247,10 @@ func (m *PermissionSubjectPermissionRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ContextualTuples = append(m.ContextualTuples, &Tuple{}) - if err := m.ContextualTuples[len(m.ContextualTuples)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.Context == nil { + m.Context = &Context{} + } + if err := m.Context.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6058,7 +6768,7 @@ func (m *WatchResponse) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Changes == nil { - m.Changes = &TupleChanges{} + m.Changes = &DataChanges{} } if err := m.Changes.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err @@ -6573,7 +7283,7 @@ func (m *SchemaReadResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *RelationshipWriteRequest) UnmarshalVT(dAtA []byte) error { +func (m *DataWriteRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6596,10 +7306,10 @@ func (m *RelationshipWriteRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RelationshipWriteRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DataWriteRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RelationshipWriteRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DataWriteRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6664,7 +7374,7 @@ func (m *RelationshipWriteRequest) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Metadata == nil { - m.Metadata = &RelationshipWriteRequestMetadata{} + m.Metadata = &DataWriteRequestMetadata{} } if err := m.Metadata.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err @@ -6704,11 +7414,45 @@ func (m *RelationshipWriteRequest) UnmarshalVT(dAtA []byte) error { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) - if err != nil { - return err + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLength @@ -6726,7 +7470,7 @@ func (m *RelationshipWriteRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *RelationshipWriteRequestMetadata) UnmarshalVT(dAtA []byte) error { +func (m *DataWriteRequestMetadata) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6749,10 +7493,10 @@ func (m *RelationshipWriteRequestMetadata) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RelationshipWriteRequestMetadata: wiretype end group for non-group") + return fmt.Errorf("proto: DataWriteRequestMetadata: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RelationshipWriteRequestMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DataWriteRequestMetadata: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6809,7 +7553,7 @@ func (m *RelationshipWriteRequestMetadata) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *RelationshipWriteResponse) UnmarshalVT(dAtA []byte) error { +func (m *DataWriteResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6832,10 +7576,10 @@ func (m *RelationshipWriteResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RelationshipWriteResponse: wiretype end group for non-group") + return fmt.Errorf("proto: DataWriteResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RelationshipWriteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DataWriteResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6892,7 +7636,7 @@ func (m *RelationshipWriteResponse) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *RelationshipReadRequest) UnmarshalVT(dAtA []byte) error { +func (m *RelationshipWriteRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6915,10 +7659,10 @@ func (m *RelationshipReadRequest) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RelationshipReadRequest: wiretype end group for non-group") + return fmt.Errorf("proto: RelationshipWriteRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RelationshipReadRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RelationshipWriteRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6983,7 +7727,7 @@ func (m *RelationshipReadRequest) UnmarshalVT(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Metadata == nil { - m.Metadata = &RelationshipReadRequestMetadata{} + m.Metadata = &RelationshipWriteRequestMetadata{} } if err := m.Metadata.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err @@ -6991,7 +7735,7 @@ func (m *RelationshipReadRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Tuples", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7018,35 +7762,65 @@ func (m *RelationshipReadRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Filter == nil { - m.Filter = &TupleFilter{} - } - if err := m.Filter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + m.Tuples = append(m.Tuples, &Tuple{}) + if err := m.Tuples[len(m.Tuples)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err } - m.PageSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PageSize |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength } - case 5: + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RelationshipWriteRequestMetadata) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RelationshipWriteRequestMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RelationshipWriteRequestMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContinuousToken", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7074,7 +7848,7 @@ func (m *RelationshipReadRequest) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ContinuousToken = string(dAtA[iNdEx:postIndex]) + m.SchemaVersion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7098,7 +7872,7 @@ func (m *RelationshipReadRequest) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *RelationshipReadRequestMetadata) UnmarshalVT(dAtA []byte) error { +func (m *RelationshipWriteResponse) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7121,10 +7895,10 @@ func (m *RelationshipReadRequestMetadata) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RelationshipReadRequestMetadata: wiretype end group for non-group") + return fmt.Errorf("proto: RelationshipWriteResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RelationshipReadRequestMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RelationshipWriteResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -7181,7 +7955,7 @@ func (m *RelationshipReadRequestMetadata) UnmarshalVT(dAtA []byte) error { } return nil } -func (m *RelationshipReadResponse) UnmarshalVT(dAtA []byte) error { +func (m *RelationshipReadRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7204,15 +7978,47 @@ func (m *RelationshipReadResponse) UnmarshalVT(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RelationshipReadResponse: wiretype end group for non-group") + return fmt.Errorf("proto: RelationshipReadRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RelationshipReadResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RelationshipReadRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tuples", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TenantId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TenantId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7239,12 +8045,69 @@ func (m *RelationshipReadResponse) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Tuples = append(m.Tuples, &Tuple{}) - if err := m.Tuples[len(m.Tuples)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + if m.Metadata == nil { + m.Metadata = &RelationshipReadRequestMetadata{} + } + if err := m.Metadata.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Filter == nil { + m.Filter = &TupleFilter{} + } + if err := m.Filter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) + } + m.PageSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PageSize |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ContinuousToken", wireType) } @@ -7298,6 +8161,850 @@ func (m *RelationshipReadResponse) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *RelationshipReadRequestMetadata) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RelationshipReadRequestMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RelationshipReadRequestMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SnapToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SnapToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RelationshipReadResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RelationshipReadResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RelationshipReadResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tuples", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tuples = append(m.Tuples, &Tuple{}) + if err := m.Tuples[len(m.Tuples)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContinuousToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContinuousToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttributeReadRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AttributeReadRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttributeReadRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TenantId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TenantId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &AttributeReadRequestMetadata{} + } + if err := m.Metadata.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Filter == nil { + m.Filter = &AttributeFilter{} + } + if err := m.Filter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageSize", wireType) + } + m.PageSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PageSize |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContinuousToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContinuousToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttributeReadRequestMetadata) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AttributeReadRequestMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttributeReadRequestMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SnapToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SnapToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttributeReadResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AttributeReadResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttributeReadResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContinuousToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContinuousToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DataDeleteRequest) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DataDeleteRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DataDeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TenantId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TenantId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TupleFilter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TupleFilter == nil { + m.TupleFilter = &TupleFilter{} + } + if err := m.TupleFilter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttributeFilter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AttributeFilter == nil { + m.AttributeFilter = &AttributeFilter{} + } + if err := m.AttributeFilter.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DataDeleteResponse) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DataDeleteResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DataDeleteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SnapToken", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SnapToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *RelationshipDeleteRequest) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/proto/base/v1/base.proto b/proto/base/v1/base.proto index 7a6e9d8..1b9ca52 100644 --- a/proto/base/v1/base.proto +++ b/proto/base/v1/base.proto @@ -1,232 +1,451 @@ syntax = "proto3"; package base.v1; -option go_package = "github.com/Permify/permify/pkg/pb/base/v1"; - -import "validate/validate.proto"; +import "google/api/expr/v1alpha1/checked.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +import "validate/validate.proto"; -// CheckResult +option go_package = "github.com/Permify/permify/pkg/pb/base/v1"; + +// Enumerates results of a check operation. enum CheckResult { - RESULT_UNKNOWN = 0; - RESULT_ALLOWED = 1; - RESULT_DENIED = 2; + // Not specified check result. This is the default value. + CHECK_RESULT_UNSPECIFIED = 0; + + // Represents a successful check (the check allowed the operation). + CHECK_RESULT_ALLOWED = 1; + + // Represents a failed check (the check denied the operation). + CHECK_RESULT_DENIED = 2; +} + +// Enumerates the types of attribute. +enum AttributeType { + // Not specified attribute type. This is the default value. + ATTRIBUTE_TYPE_UNSPECIFIED = 0; + + // A boolean attribute type. + ATTRIBUTE_TYPE_BOOLEAN = 1; + // A boolean array attribute type. + ATTRIBUTE_TYPE_BOOLEAN_ARRAY = 2; + + // A string attribute type. + ATTRIBUTE_TYPE_STRING = 3; + // A string array attribute type. + ATTRIBUTE_TYPE_STRING_ARRAY = 4; + + // An integer attribute type. + ATTRIBUTE_TYPE_INTEGER = 5; + // An integer array attribute type. + ATTRIBUTE_TYPE_INTEGER_ARRAY = 6; + + // A double attribute type. + ATTRIBUTE_TYPE_DOUBLE = 7; + // A double array attribute type. + ATTRIBUTE_TYPE_DOUBLE_ARRAY = 8; +} + +// Context encapsulates the information related to a single operation, +// including the tuples involved and the associated attributes. +message Context { + // A repeated field of tuples involved in the operation. + repeated Tuple tuples = 1 [json_name = "tuples"]; + + // A repeated field of attributes associated with the operation. + repeated Attribute attributes = 2 [json_name = "attributes"]; + + // Additional data associated with the context. + google.protobuf.Struct data = 3; } -// Child +// Child represents a node in the permission tree. message Child { + // Child node can be either a leaf or a rewrite operation. oneof type { + // Either leaf or rewrite operation is required. option (validate.required) = true; + + // Leaf node in the permission tree. Leaf leaf = 1 [(validate.rules).message.required = true]; + + // Rewrite operation in the permission tree. Rewrite rewrite = 2 [(validate.rules).message.required = true]; } } -// Leaf +// Leaf represents a leaf node in the permission tree. message Leaf { + // Leaf node can be one of several types. oneof type { + // One type is required. option (validate.required) = true; + + // A computed set of users. ComputedUserSet computed_user_set = 1 [(validate.rules).message.required = true]; + + // A tuple to user set conversion. TupleToUserSet tuple_to_user_set = 2 [(validate.rules).message.required = true]; + + // A computed attribute. + ComputedAttribute computed_attribute = 3 [(validate.rules).message.required = true]; + + // A call to a function or method. + Call call = 4 [(validate.rules).message.required = true]; } } -// Rewrite +// The Rewrite message represents a specific rewrite operation. +// This operation could be one of the following: union, intersection, or exclusion. message Rewrite { - // Operation + // Operation enum includes potential rewrite operations. + // OPERATION_UNION: Represents a union operation. + // OPERATION_INTERSECTION: Represents an intersection operation. + // OPERATION_EXCLUSION: Represents an exclusion operation. enum Operation { - OPERATION_UNSPECIFIED = 0; - OPERATION_UNION = 1; - OPERATION_INTERSECTION = 2; - OPERATION_EXCLUSION = 3; + OPERATION_UNSPECIFIED = 0; // Default, unspecified operation. + OPERATION_UNION = 1; // Represents a union operation. + OPERATION_INTERSECTION = 2; // Represents an intersection operation. + OPERATION_EXCLUSION = 3; // Represents an exclusion operation. } + // The type of rewrite operation to be performed. Operation rewrite_operation = 1; + // A list of children that are operated upon by the rewrite operation. repeated Child children = 2; } -// Definition +// The SchemaDefinition message provides definitions for entities and rules, +// and includes references to clarify whether a name refers to an entity or a rule. message SchemaDefinition { + // The Reference enum helps distinguish whether a name corresponds to an entity or a rule. + enum Reference { + REFERENCE_UNSPECIFIED = 0; // Default, unspecified reference. + REFERENCE_ENTITY = 1; // Indicates that the name refers to an entity. + REFERENCE_RULE = 2; // Indicates that the name refers to a rule. + } + + // Map of entity definitions. The key is the entity name, and the value is the corresponding EntityDefinition. map entity_definitions = 1; + + // Map of rule definitions. The key is the rule name, and the value is the corresponding RuleDefinition. + map rule_definitions = 2; + + // Map of references to signify whether a string refers to an entity or a rule. + map references = 3; } -// EntityDefinition +// The EntityDefinition message provides detailed information about a specific entity. message EntityDefinition { - // RelationalReference - enum RelationalReference { - RELATIONAL_REFERENCE_UNSPECIFIED = 0; - RELATIONAL_REFERENCE_RELATION = 1; - RELATIONAL_REFERENCE_PERMISSION = 2; + // The Reference enum specifies whether a name pertains to a relation, permission, or attribute. + enum Reference { + REFERENCE_UNSPECIFIED = 0; // Default, unspecified reference. + REFERENCE_RELATION = 1; // Indicates that the name refers to a relation. + REFERENCE_PERMISSION = 2; // Indicates that the name refers to a permission. + REFERENCE_ATTRIBUTE = 3; // Indicates that the name refers to an attribute. } + // The name of the entity, which follows a specific string pattern and has a maximum byte size. string name = 1 [(validate.rules).string = { - pattern : "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", - max_bytes : 64, + pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", + max_bytes: 64, }]; - // ["relation_name"] => RelationDefinition + // Map of relation definitions within this entity. The key is the relation name, and the value is the RelationDefinition. map relations = 2; - // ["permission_name"] => PermissionDefinition + // Map of permission definitions within this entity. The key is the permission name, and the value is the PermissionDefinition. map permissions = 3; - // ["relation_name or permission_name"] => RelationalReference - map references = 4; + // Map of attribute definitions within this entity. The key is the attribute name, and the value is the AttributeDefinition. + map attributes = 4; + + // Map of references indicating whether a string pertains to a relation, permission, or attribute. + map references = 5; +} + +// The RuleDefinition message provides detailed information about a specific rule. +message RuleDefinition { + // The name of the rule, which follows a specific string pattern and has a maximum byte size. + string name = 1 [(validate.rules).string = { + pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", + max_bytes: 64, + }]; + + // Map of arguments for this rule. The key is the attribute name, and the value is the AttributeType. + map arguments = 2; + + // The expression for this rule in the form of a google.api.expr.v1alpha1.CheckedExpr. + google.api.expr.v1alpha1.CheckedExpr expression = 3; } -// RelationDefinition +// The AttributeDefinition message provides detailed information about a specific attribute. +message AttributeDefinition { + // The name of the attribute, which follows a specific string pattern and has a maximum byte size. + string name = 1 [(validate.rules).string = { + pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", + max_bytes: 64, + }]; + + // The type of the attribute. + AttributeType type = 2; +} + +// The RelationDefinition message provides detailed information about a specific relation. message RelationDefinition { + // The name of the relation, which follows a specific string pattern and has a maximum byte size. string name = 1 [(validate.rules).string = { - pattern : "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", - max_bytes : 64, + pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", + max_bytes: 64, }]; + // A list of references to other relations. repeated RelationReference relation_references = 2; } -// PermissionDefinition +// The PermissionDefinition message provides detailed information about a specific permission. message PermissionDefinition { + // The name of the permission, which follows a specific string pattern and has a maximum byte size. string name = 1 [(validate.rules).string = { - pattern : "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", - max_bytes : 64, + pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", + max_bytes: 64, }]; + // The child related to this permission. Child child = 2; } -// RelationReference +// The RelationReference message provides a reference to a specific relation. message RelationReference { + // The type of the referenced entity, which follows a specific string pattern and has a maximum byte size. string type = 1 [(validate.rules).string = { - pattern : "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", - max_bytes : 64, + pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", + max_bytes: 64, }]; + // The name of the referenced relation, which follows a specific string pattern and has a maximum byte size. string relation = 2 [(validate.rules).string = { - pattern : "^[a-z][a-z0-9_]{1,62}[a-z0-9]$", - max_bytes : 64, + pattern: "^[a-z][a-z0-9_]{1,62}[a-z0-9]$", + max_bytes: 64, ignore_empty: true, }]; } -// ComputedUserSet +// Argument defines the type of argument in a Call. It can be either a ComputedAttribute or a ContextAttribute. +message Argument { + oneof type { + ComputedAttribute computed_attribute = 1; + ContextAttribute context_attribute = 2; + } +} + +// Call represents a call to a rule. It includes the name of the rule and the arguments passed to it. +message Call { + string rule_name = 1; // Name of the rule + repeated Argument arguments = 2; // Arguments passed to the rule +} + +// ComputedAttribute defines a computed attribute which includes its name. +message ComputedAttribute { + string name = 1 [(validate.rules).string = { + pattern: "^[a-z][a-z0-9_]{1,62}[a-z0-9]$", + max_bytes: 64, + }]; // Name of the computed attribute +} + +// ContextAttribute defines a context attribute which includes its name. +message ContextAttribute { + string name = 1 [(validate.rules).string = { + pattern: "^[a-z][a-z0-9_]{1,62}[a-z0-9]$", + max_bytes: 64, + }]; // Name of the context attribute +} + +// ComputedUserSet defines a set of computed users which includes the relation name. message ComputedUserSet { string relation = 1 [(validate.rules).string = { - pattern : "^[a-z][a-z0-9_]{1,62}[a-z0-9]$", - max_bytes : 64, - }]; + pattern: "^[a-z][a-z0-9_]{1,62}[a-z0-9]$", + max_bytes: 64, + }]; // Relation name +} + +// TupleToUserSet defines a mapping from tuple sets to computed user sets. +message TupleToUserSet { + TupleSet tupleSet = 1; // The tuple set + ComputedUserSet computed = 2; // The computed user set } -// TupleSet +// TupleSet represents a set of tuples associated with a specific relation. message TupleSet { string relation = 1 [(validate.rules).string = { - pattern : "^[a-z][a-z0-9_]{1,62}[a-z0-9]$", - max_bytes : 64, + pattern: "^[a-z][a-z0-9_]{1,62}[a-z0-9]$", + max_bytes: 64, }]; } -// TupleToUserSet -message TupleToUserSet { - TupleSet tupleSet = 1; - ComputedUserSet computed = 2; +// Tuple is a structure that includes an entity, a relation, and a subject. +message Tuple { + Entity entity = 1 [ + json_name = "entity", + (validate.rules).message.required = true + ]; + + string relation = 2 [ + json_name = "relation", + (validate.rules).string = { + pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", + max_bytes: 64, + } + ]; + + Subject subject = 3 [ + json_name = "subject", + (validate.rules).message.required = true + ]; } -// Tuple -message Tuple { - Entity entity = 1 [json_name = "entity", (validate.rules).message.required = true]; +// Attribute represents an attribute of an entity with a specific type and value. +message Attribute { + Entity entity = 1 [ + json_name = "entity", + (validate.rules).message.required = true + ]; - string relation = 2 [json_name = "relation", (validate.rules).string = { - pattern : "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", - max_bytes : 64, - }]; + string attribute = 2 [json_name = "attribute"]; // Name of the attribute - Subject subject = 3 [json_name = "subject", (validate.rules).message.required = true]; + google.protobuf.Any value = 3 [json_name = "value"]; } -// Tuples +// Tuples is a collection of tuples. message Tuples { repeated Tuple tuples = 1 [json_name = "tuples"]; } -// Entity -message Entity { - string type = 1 [json_name = "type", (validate.rules).string = { - pattern : "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", - max_bytes : 64, - }]; +// Attributes is a collection of attributes. +message Attributes { + repeated Attribute attributes = 1 [json_name = "attributes"]; +} - string id = 2 [json_name = "id", (validate.rules).string = { - pattern : "^(([a-zA-Z0-9_][a-zA-Z0-9_|-]{0,127})|\\*)$", - max_bytes : 128, - }]; +// Entity represents an entity with a type and an identifier. +message Entity { + string type = 1 [ + json_name = "type", + (validate.rules).string = { + pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", + max_bytes: 64, + } + ]; + + string id = 2 [ + json_name = "id", + (validate.rules).string = { + pattern: "^(([a-zA-Z0-9_][a-zA-Z0-9_|-]{0,127})|\\*)$", + max_bytes: 128, + } + ]; } +// EntityAndRelation represents an entity along with a relation. message EntityAndRelation { - Entity entity = 1 [json_name = "entity", (validate.rules).message.required = true]; - - string relation = 2 [json_name = "relation", (validate.rules).string = { - pattern : "^([a-z][a-z0-9_]{1,64}[a-z0-9])$", - max_bytes : 64, - }]; + Entity entity = 1 [ + json_name = "entity", + (validate.rules).message.required = true + ]; + + string relation = 2 [ + json_name = "relation", + (validate.rules).string = { + pattern: "^([a-z][a-z0-9_]{1,64}[a-z0-9])$", + max_bytes: 64, + } + ]; } -// Subject +// Subject represents an entity subject with a type, an identifier, and a relation. message Subject { - string type = 1 [json_name = "type", (validate.rules).string = { - pattern : "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", - max_bytes : 64, - }]; + string type = 1 [ + json_name = "type", + (validate.rules).string = { + pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", + max_bytes: 64, + } + ]; + + string id = 2 [ + json_name = "id", + (validate.rules).string = { + pattern: "^(([a-zA-Z0-9_][a-zA-Z0-9_|-]{0,127})|\\*)$", + max_bytes: 128, + } + ]; + + string relation = 3 [ + json_name = "relation", + (validate.rules).string = { + pattern: "^([.&a-z][.&a-z0-9_]{1,62}[.&a-z0-9])$", + max_bytes: 64, + ignore_empty: true, + } + ]; +} - string id = 2 [json_name = "id", (validate.rules).string = { - pattern : "^(([a-zA-Z0-9_][a-zA-Z0-9_|-]{0,127})|\\*)$", - max_bytes : 128, - }]; +// AttributeFilter is used to filter attributes based on the entity and attribute names. +message AttributeFilter { + EntityFilter entity = 1 [ + json_name = "entity", + (validate.rules).message.required = true + ]; - string relation = 3 [json_name = "relation", (validate.rules).string = { - pattern : "^([.&a-z][.&a-z0-9_]{1,62}[.&a-z0-9])$", - max_bytes : 64, - ignore_empty: true, - }]; + repeated string attributes = 2 [json_name = "attributes"]; // Names of the attributes to be filtered } -// Filters - -// TupleFilter is used to filter tuples +// TupleFilter is used to filter tuples based on the entity, relation and the subject. message TupleFilter { - EntityFilter entity = 1 [json_name = "entity", (validate.rules).message.required = true]; - - string relation = 2 [json_name = "relation", (validate.rules).string = { - pattern : "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", - max_bytes : 64, - ignore_empty: true, - }]; - - SubjectFilter subject = 3 [json_name = "subject"]; + EntityFilter entity = 1 [ + json_name = "entity", + (validate.rules).message.required = true + ]; + + string relation = 2 [ + json_name = "relation", + (validate.rules).string = { + pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])$", + max_bytes: 64, + ignore_empty: true, + } + ]; + + SubjectFilter subject = 3 [json_name = "subject"]; // The subject filter } -// EntityFilter is used to filter entities +// EntityFilter is used to filter entities based on the type and ids. message EntityFilter { - string type = 1 [json_name = "type"]; + string type = 1 [json_name = "type"]; // Type of the entity - repeated string ids = 2 [json_name = "ids"]; + repeated string ids = 2 [json_name = "ids"]; // List of entity IDs } -// SubjectFilter is used to filter subjects +// SubjectFilter is used to filter subjects based on the type, ids and relation. message SubjectFilter { - string type = 1 [json_name = "type"]; - - repeated string ids = 2 [json_name = "ids"]; - - string relation = 3 [json_name = "relation", (validate.rules).string = { - pattern : "^([.&a-z][.&a-z0-9_]{1,62}[.&a-z0-9])$", - max_bytes : 64, - ignore_empty: true, - }]; + string type = 1 [json_name = "type"]; // Type of the subject + + repeated string ids = 2 [json_name = "ids"]; // List of subject IDs + + string relation = 3 [ + json_name = "relation", + (validate.rules).string = { + pattern: "^([.&a-z][.&a-z0-9_]{1,62}[.&a-z0-9])$", + max_bytes: 64, + ignore_empty: true, + } + ]; } -// ExpandTreeNode +// ExpandTreeNode represents a node in an expansion tree with a specific operation and its children. message ExpandTreeNode { - // Operation + // Operation is an enum representing the type of operation to be applied on the tree node. enum Operation { OPERATION_UNSPECIFIED = 0; OPERATION_UNION = 1; @@ -234,48 +453,117 @@ message ExpandTreeNode { OPERATION_EXCLUSION = 3; } - Operation operation = 1; + Operation operation = 1; // Operation to be applied on this tree node - repeated Expand children = 2; + repeated Expand children = 2; // The children of this tree node } -// Expand +// Expand is used to define a hierarchical structure for permissions. +// It has an entity, permission, and arguments. The node can be either another hierarchical structure or a set of subjects. message Expand { - EntityAndRelation target = 1; + // entity is the entity for which the hierarchical structure is defined. + Entity entity = 1; + + // permission is the permission applied to the entity. + string permission = 2; + + // arguments are the additional information or context used to evaluate permissions. + repeated Argument arguments = 3; + + // The node can either be an ExpandTreeNode or a set of Subjects. oneof node { - ExpandTreeNode expand = 2; - Subjects leaf = 3; + // expand contains another hierarchical structure. + ExpandTreeNode expand = 4; + + // leaf contains a set of subjects. + ExpandLeaf leaf = 5; } } -// Result +// ExpandLeaf is the leaf node of an Expand tree and can be either a set of Subjects or a set of Values. +message ExpandLeaf { + oneof type { // type can be either Subjects or Values. + option (validate.required) = true; + + // subjects are used when the leaf is a set of subjects. + Subjects subjects = 1 [json_name = "subjects"]; + + // values are used when the leaf node is a set of values. + Values values = 2 [json_name = "values"]; + + // value is used when the leaf node is a single value. + google.protobuf.Any value = 3 [json_name = "value"]; + } +} + +message Values { + map values = 1 [json_name = "values"]; +} + +// Subjects holds a repeated field of Subject type. message Subjects { - repeated Subject subjects = 1 [json_name = "subjects"]; + repeated Subject subjects = 1 [json_name = "subjects"]; // A list of subjects. } -// Tenant +// Tenant represents a tenant with an id, a name, and a timestamp indicating when it was created. message Tenant { - string id = 1 [json_name = "id"]; - string name = 2 [json_name = "name"]; - google.protobuf.Timestamp created_at = 3 [json_name = "created_at"]; + string id = 1 [json_name = "id"]; // The ID of the tenant. + string name = 2 [json_name = "name"]; // The name of the tenant. + google.protobuf.Timestamp created_at = 3 [json_name = "created_at"]; // The time at which the tenant was created. } -// TupleChanges -message TupleChanges { - string snap_token = 1 [json_name = "snap_token"]; +// DataChanges represent changes in data with a snap token and a list of data change objects. +message DataChanges { + string snap_token = 1 [json_name = "snap_token"]; // The snapshot token. - repeated TupleChange tuple_changes = 2 [json_name = "tuple_changes"]; + repeated DataChange data_changes = 2 [json_name = "data_changes"]; // The list of data changes. } -// TupleChange -message TupleChange { +// DataChange represents a single change in data, with an operation type and the actual change which could be a tuple or an attribute. +message DataChange { enum Operation { - OPERATION_UNSPECIFIED = 0; - OPERATION_CREATE = 1; - OPERATION_DELETE = 2; + OPERATION_UNSPECIFIED = 0; // Default operation, not specified. + OPERATION_CREATE = 1; // Creation operation. + OPERATION_DELETE = 2; // Deletion operation. + } + + Operation operation = 1 [json_name = "operation"]; // The operation type. + + oneof type { // The type of the change which can be either a tuple or an attribute. + option (validate.required) = true; + Tuple tuple = 2 [json_name = "tuple"]; // If the change is a tuple. + Attribute attribute = 3 [json_name = "attribute"]; // If the change is an attribute. } +} + +message String { + string value = 1; +} + +message Integer { + int32 value = 1; +} + +message Double { + double value = 1; +} - Operation operation = 1 [json_name = "operation"]; +message Boolean { + bool value = 1; +} + +message StringArray { + repeated string values = 1; +} + +message IntegerArray { + repeated int32 values = 1; +} + +message DoubleArray { + repeated double values = 1; +} - Tuple tuple = 2 [json_name = "tuple"]; +message BooleanArray { + repeated bool values = 1; } \ No newline at end of file diff --git a/proto/base/v1/errors.proto b/proto/base/v1/errors.proto index 24229c2..e4bd506 100644 --- a/proto/base/v1/errors.proto +++ b/proto/base/v1/errors.proto @@ -35,6 +35,10 @@ enum ErrorCode { ERROR_CODE_INVALID_KEY = 2022; ERROR_CODE_ENTITY_TYPE_REQUIRED = 2023; ERROR_CODE_NO_ENTITY_REFERENCES_FOUND_IN_SCHEMA = 2024; + ERROR_CODE_INVALID_ARGUMENT = 2025; + ERROR_CODE_INVALID_RULE_REFERENCE = 2026; + ERROR_CODE_NOT_SUPPORTED_WALK = 2027; + ERROR_CODE_MISSING_ARGUMENT = 2028; // not found ERROR_CODE_NOT_FOUND = 4000; @@ -47,6 +51,8 @@ enum ErrorCode { ERROR_CODE_RELATION_DEFINITION_NOT_FOUND = 4007; ERROR_CODE_RECORD_NOT_FOUND = 4008; ERROR_CODE_TENANT_NOT_FOUND = 4009; + ERROR_CODE_ATTRIBUTE_DEFINITION_NOT_FOUND = 4010; + ERROR_CODE_ATTRIBUTE_TYPE_MISMATCH = 4011; // internal ERROR_CODE_INTERNAL = 5000; diff --git a/proto/base/v1/openapi.proto b/proto/base/v1/openapi.proto index fdb19d9..c431ce6 100644 --- a/proto/base/v1/openapi.proto +++ b/proto/base/v1/openapi.proto @@ -9,7 +9,7 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { title: "Permify API"; description: "Permify is an open-source authorization service for creating and maintaining fine-grained authorizations across your individual applications and services. Permify converts authorization data as relational tuples into a database you point at. We called that database a Write Database (WriteDB) and it behaves as a centralized data source for your authorization system. You can model of your authorization with Permify's DSL - Permify Schema - and perform access checks with a single API call anywhere on your stack. Access decisions made according to stored relational tuples."; - version: "v0.4.7"; + version: "v0.5.0"; contact: { name: "API Support"; url: "https://github.com/Permify/permify/issues"; diff --git a/proto/base/v1/service.proto b/proto/base/v1/service.proto index 2f9bf46..edc8453 100644 --- a/proto/base/v1/service.proto +++ b/proto/base/v1/service.proto @@ -1,8 +1,6 @@ syntax = "proto3"; package base.v1; -import "google/protobuf/empty.proto"; - option go_package = "github.com/Permify/permify/pkg/pb/base/v1"; import "base/v1/base.proto"; @@ -12,16 +10,21 @@ import "protoc-gen-openapiv2/options/annotations.proto"; // ** PERMISSION SERVICE ** -// Permission +// Permission service contains methods to interact with permissions. service Permission { + + // Check method receives a PermissionCheckRequest and returns a PermissionCheckResponse. + // It is used to determine whether a specific user has permission to perform an action on a resource. + // For example, "Can the user 1 push to repository 1?" rpc Check(PermissionCheckRequest) returns (PermissionCheckResponse) { + // HTTP mapping for this method option (google.api.http) = { post: "/v1/tenants/{tenant_id}/permissions/check" body: "*" }; - + // OpenAPI annotations for this method option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "This method returns a decision about whether user can perform an permission on a certain resource. For example, Can the user 1 push to repository 1?" + summary: "This method returns a decision about whether user can perform an permission on a certain resource." tags: [ "Permission" ] @@ -29,12 +32,15 @@ service Permission { }; } + // Expand method receives a PermissionExpandRequest and returns a PermissionExpandResponse. + // It expands relationships according to the schema provided. rpc Expand(PermissionExpandRequest) returns (PermissionExpandResponse) { + // HTTP mapping for this method option (google.api.http) = { post: "/v1/tenants/{tenant_id}/permissions/expand" body: "*" }; - + // OpenAPI annotations for this method option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { summary: "expand relationships according to schema" tags: [ @@ -44,14 +50,17 @@ service Permission { }; } + // LookupEntity method receives a PermissionLookupEntityRequest and returns a PermissionLookupEntityResponse. + // It is used to retrieve an entity by its identifier. rpc LookupEntity(PermissionLookupEntityRequest) returns (PermissionLookupEntityResponse) { + // HTTP mapping for this method option (google.api.http) = { post: "/v1/tenants/{tenant_id}/permissions/lookup-entity" body: "*" }; - + // OpenAPI annotations for this method option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "" + summary: "Retrieve an entity by its identifier." tags: [ "Permission" ] @@ -59,14 +68,17 @@ service Permission { }; } + // LookupEntityStream method receives a PermissionLookupEntityRequest and streams a series of PermissionLookupEntityStreamResponse messages. + // It is used to retrieve entities by their identifiers in a streaming fashion. rpc LookupEntityStream(PermissionLookupEntityRequest) returns (stream PermissionLookupEntityStreamResponse) { + // HTTP mapping for this method option (google.api.http) = { post: "/v1/tenants/{tenant_id}/permissions/lookup-entity-stream" body: "*" }; - + // OpenAPI annotations for this method option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "" + summary: "Stream entities by their identifiers." tags: [ "Permission" ] @@ -74,14 +86,17 @@ service Permission { }; } + // LookupSubject method receives a PermissionLookupSubjectRequest and returns a PermissionLookupSubjectResponse. + // It is used to retrieve a subject by its identifier. rpc LookupSubject(PermissionLookupSubjectRequest) returns (PermissionLookupSubjectResponse) { + // HTTP mapping for this method option (google.api.http) = { post: "/v1/tenants/{tenant_id}/permissions/lookup-subject" body: "*" }; - + // OpenAPI annotations for this method option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "" + summary: "Retrieve a subject by its identifier." tags: [ "Permission" ] @@ -89,14 +104,17 @@ service Permission { }; } + // SubjectPermission method receives a PermissionSubjectPermissionRequest and returns a PermissionSubjectPermissionResponse. + // It is used to retrieve permissions related to a specific subject. rpc SubjectPermission(PermissionSubjectPermissionRequest) returns (PermissionSubjectPermissionResponse) { + // HTTP mapping for this method option (google.api.http) = { post: "/v1/tenants/{tenant_id}/permissions/subject-permission" body: "*" }; - + // OpenAPI annotations for this method option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "" + summary: "Retrieve permissions related to a specific subject." tags: [ "Permission" ] @@ -107,392 +125,638 @@ service Permission { // CHECK -// PermissionCheckRequest +// PermissionCheckRequest is the request message for the Check method in the Permission service. message PermissionCheckRequest { + + // Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. string tenant_id = 1 [json_name = "tenant_id", (validate.rules).string = { pattern : "[a-zA-Z0-9-,]+", max_bytes : 64, ignore_empty: false, }]; + // Metadata associated with this request, required. PermissionCheckRequestMetadata metadata = 2 [json_name = "metadata", (validate.rules).message.required = true]; + // Entity on which the permission needs to be checked, required. Entity entity = 3 [json_name = "entity", (validate.rules).message.required = true]; - // its can be permission or relation + // Name of the permission or relation, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes. string permission = 4 [json_name = "permission", (validate.rules).string = { pattern : "^([a-zA-Z][a-zA-Z0-9_]{1,62}[a-zA-Z0-9])$", max_bytes : 64, ignore_empty: false, }]; + // Subject for which the permission needs to be checked, required. Subject subject = 5 [json_name = "subject", (validate.rules).message.required = true]; - repeated Tuple contextual_tuples = 6 [json_name = "contextual_tuples"]; + // Context associated with this request. + Context context = 6 [json_name = "context"]; + + // Additional arguments associated with this request. + repeated Argument arguments = 7 [json_name = "arguments"]; } -// PermissionCheckRequestMetadata +// PermissionCheckRequestMetadata is the metadata associated with a PermissionCheckRequest. message PermissionCheckRequestMetadata { + + // Version of the schema. string schema_version = 1 [json_name = "schema_version"]; + + // Token associated with the snap. string snap_token = 2 [json_name = "snap_token"]; + + // Depth of the check, must be greater than or equal to 3. int32 depth = 3 [json_name = "depth", (validate.rules).int32.gte = 3]; } -// PermissionCheckResponse +// PermissionCheckResponse is the response message for the Check method in the Permission service. message PermissionCheckResponse { + + // Result of the permission check. CheckResult can = 1 [json_name = "can"]; + + // Metadata associated with this response. PermissionCheckResponseMetadata metadata = 2 [json_name = "metadata"]; } -// CheckResponseMetadata +// PermissionCheckResponseMetadata is the metadata associated with a PermissionCheckResponse. message PermissionCheckResponseMetadata { + + // The count of the checks performed. int32 check_count = 1 [json_name = "check_count"]; } // EXPAND -// PermissionExpandRequest +// PermissionExpandRequest is the request message for the Expand method in the Permission service. message PermissionExpandRequest { + + // Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. string tenant_id = 1 [json_name = "tenant_id", (validate.rules).string = { pattern : "[a-zA-Z0-9-,]+", max_bytes : 64, ignore_empty: false, }]; + // Metadata associated with this request, required. PermissionExpandRequestMetadata metadata = 2 [json_name = "metadata", (validate.rules).message.required = true]; + // Entity on which the permission needs to be expanded, required. Entity entity = 3 [json_name = "entity", (validate.rules).message.required = true]; + // Name of the permission to be expanded, not required, must start with a letter and can include alphanumeric and underscore, max 64 bytes. string permission = 4 [json_name = "permission", (validate.rules).string = { pattern : "^([a-zA-Z][a-zA-Z0-9_]{1,62}[a-zA-Z0-9])$", max_bytes : 64, ignore_empty: true, }]; - repeated Tuple contextual_tuples = 5 [json_name = "contextual_tuples"]; + // Context associated with this request. + Context context = 5 [json_name = "context"]; + + // Additional arguments associated with this request. + repeated Argument arguments = 6 [json_name = "arguments"]; } -// PermissionExpandRequestMetadata +// PermissionExpandRequestMetadata is the metadata associated with a PermissionExpandRequest. message PermissionExpandRequestMetadata { + + // Version of the schema. string schema_version = 1 [json_name = "schema_version"]; + + // Token associated with the snap. string snap_token = 2 [json_name = "snap_token"]; } -// PermissionExpandResponse +// PermissionExpandResponse is the response message for the Expand method in the Permission service. message PermissionExpandResponse { + + // Expansion tree. Expand tree = 1 [json_name = "tree"]; } // LOOKUP ENTITY -// PermissionLookupEntityRequest +// PermissionLookupEntityRequest is the request message for the LookupEntity method in the Permission service. message PermissionLookupEntityRequest { + + // Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. string tenant_id = 1 [json_name = "tenant_id", (validate.rules).string = { pattern : "[a-zA-Z0-9-,]+", max_bytes : 64, ignore_empty: false, }]; + // Metadata associated with this request, required. PermissionLookupEntityRequestMetadata metadata = 2 [json_name = "metadata", (validate.rules).message.required = true]; + // Type of the entity to lookup, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes. string entity_type = 3 [json_name = "entity_type", (validate.rules).string = { pattern : "^([a-zA-Z][a-zA-Z0-9_]{1,62}[a-zA-Z0-9])$", max_bytes : 64, ignore_empty: false, }]; + // Name of the permission to check, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes. string permission = 4 [json_name = "permission", (validate.rules).string = { pattern : "^([a-zA-Z][a-zA-Z0-9_]{1,62}[a-zA-Z0-9])$", max_bytes : 64, ignore_empty: false, }]; + // Subject for which to check the permission, required. Subject subject = 5 [json_name = "subject", (validate.rules).message.required = true]; - repeated Tuple contextual_tuples = 6 [json_name = "contextual_tuples"]; + // Context associated with this request. + Context context = 6 [json_name = "context"]; } -// PermissionLookupEntityRequestMetadata +// PermissionLookupEntityRequestMetadata is the metadata associated with a PermissionLookupEntityRequest. message PermissionLookupEntityRequestMetadata { + + // Version of the schema. string schema_version = 1 [json_name = "schema_version"]; + + // Token associated with the snap. string snap_token = 2 [json_name = "snap_token"]; + + // Depth of lookup, required, must be greater or equal to 3. int32 depth = 3 [json_name = "depth", (validate.rules).int32.gte = 3]; } -// PermissionLookupEntityResponse +// PermissionLookupEntityResponse is the response message for the LookupEntity method in the Permission service. message PermissionLookupEntityResponse { + + // List of identifiers for entities that match the lookup. repeated string entity_ids = 1 [json_name = "entity_ids"]; } -// PermissionLookupEntityStreamResponse +// LOOKUP STREAM + +// PermissionLookupEntityStreamResponse is the response message for the LookupEntityStream method in the Permission service. message PermissionLookupEntityStreamResponse { + + // Identifier for an entity that matches the lookup. string entity_id = 1 [json_name = "entity_id"]; } -// PermissionEntityFilterRequest +// PermissionEntityFilterRequest is the request message for the LookupEntityStream method in the Permission service. message PermissionEntityFilterRequest { + + // Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. string tenant_id = 1 [json_name = "tenant_id", (validate.rules).string = { pattern : "[a-zA-Z0-9-,]+", max_bytes : 64, ignore_empty: false, }]; + // Metadata associated with this request, required. PermissionEntityFilterRequestMetadata metadata = 2 [json_name = "metadata", (validate.rules).message.required = true]; + // Reference to the entity to filter. RelationReference entity_reference = 3 [json_name = "entity_reference"]; + // Subject for which to check the permission. Subject subject = 4 [json_name = "subject"]; - repeated Tuple contextual_tuples = 5 [json_name = "contextual_tuples"]; + // Context associated with this request. + Context context = 5 [json_name = "context"]; } -// PermissionEntityFilterRequestMetadata +// PermissionEntityFilterRequestMetadata is the metadata associated with a PermissionEntityFilterRequest. message PermissionEntityFilterRequestMetadata { + + // Version of the schema. string schema_version = 1 [json_name = "schema_version"]; + + // Token associated with the snap. string snap_token = 2 [json_name = "snap_token"]; + + // Depth of lookup, required, must be greater or equal to 3. int32 depth = 3 [json_name = "depth", (validate.rules).int32.gte = 3]; } // LOOKUP SUBJECT -// PermissionLookupSubjectRequest +// PermissionLookupSubjectRequest is the request message for the LookupSubject method in the Permission service. message PermissionLookupSubjectRequest { + + // Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. string tenant_id = 1 [json_name = "tenant_id", (validate.rules).string = { pattern : "[a-zA-Z0-9-,]+", max_bytes : 64, ignore_empty: false, }]; + // Metadata associated with this request, required. PermissionLookupSubjectRequestMetadata metadata = 2 [json_name = "metadata", (validate.rules).message.required = true]; + // Entity for which to check the permission, required. Entity entity = 3 [json_name = "entity", (validate.rules).message.required = true]; - // its can be permission or relation + // Permission to be checked, can be a permission or relation. Required, and must match the pattern "^([a-zA-Z][a-zA-Z0-9_]{1,62}[a-zA-Z0-9])$", max 64 bytes. string permission = 4 [json_name = "permission", (validate.rules).string = { pattern : "^([a-zA-Z][a-zA-Z0-9_]{1,62}[a-zA-Z0-9])$", max_bytes : 64, ignore_empty: false, }]; + // Reference to the subject to lookup. RelationReference subject_reference = 5 [json_name = "subject_reference"]; - repeated Tuple contextual_tuples = 6 [json_name = "contextual_tuples"]; + // Context associated with this request. + Context context = 6 [json_name = "context"]; } -// PermissionLookupSubjectRequestMetadata +// PermissionLookupSubjectRequestMetadata is the metadata associated with a PermissionLookupSubjectRequest. message PermissionLookupSubjectRequestMetadata { + + // Version of the schema. string schema_version = 1 [json_name = "schema_version"]; + + // Token associated with the snap. string snap_token = 2 [json_name = "snap_token"]; + + // Depth of the check, must be greater than or equal to 3. + int32 depth = 3 [json_name = "depth", (validate.rules).int32.gte = 3]; } -// PermissionLookupSubjectResponse +// PermissionLookupSubjectResponse is the response message for the LookupSubject method in the Permission service. message PermissionLookupSubjectResponse { + + // List of identifiers for subjects that match the lookup. repeated string subject_ids = 1 [json_name = "subject_ids"]; } // SUBJECT PERMISSION +// PermissionSubjectPermissionRequest is the request message for the SubjectPermission method in the Permission service. message PermissionSubjectPermissionRequest { + + // Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. string tenant_id = 1 [json_name = "tenant_id", (validate.rules).string = { pattern : "[a-zA-Z0-9-,]+", max_bytes : 64, ignore_empty: false, }]; + // Metadata associated with this request, required. PermissionSubjectPermissionRequestMetadata metadata = 2 [json_name = "metadata", (validate.rules).message.required = true]; + // Entity for which to check the permission, required. Entity entity = 3 [json_name = "entity", (validate.rules).message.required = true]; + // Subject for which to check the permission, required. Subject subject = 4 [json_name = "subject", (validate.rules).message.required = true]; - repeated Tuple contextual_tuples = 5 [json_name = "contextual_tuples"]; + // Context associated with this request. + Context context = 5 [json_name = "context"]; } -// PermissionCheckRequestMetadata +// PermissionSubjectPermissionRequestMetadata is the metadata associated with a PermissionSubjectPermissionRequest. message PermissionSubjectPermissionRequestMetadata { + + // Version of the schema. string schema_version = 1 [json_name = "schema_version"]; + + // Token associated with the snap. string snap_token = 2 [json_name = "snap_token"]; + + // Whether to only check permissions. bool only_permission = 3 [json_name = "only_permission"]; + + // Depth of the check, must be greater than or equal to 3. int32 depth = 4 [json_name = "depth", (validate.rules).int32.gte = 3]; } -// SubjectPermissionResponse +// PermissionSubjectPermissionResponse is the response message for the SubjectPermission method in the Permission service. message PermissionSubjectPermissionResponse { + + // Map of results for each permission check. map results = 1 [json_name = "results"]; } // ** WATCH SERVICE ** -// Watch +// Watch service provides a streaming RPC that can be used to watch changes in the data. + +// Watch is the main RPC in the Watch service. It establishes a stream between +// the client and the server. The server pushes data changes into this stream +// and the client can read those in real time. service Watch { rpc Watch(WatchRequest) returns (stream WatchResponse) { option (google.api.http) = { - post: "/v1/tenants/{tenant_id}/watch" - body: "*" + post: "/v1/tenants/{tenant_id}/watch" // HTTP mapping: POST request to the /v1/tenants/{tenant_id}/watch endpoint. + body: "*" // The entire request message will be the HTTP request body. }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "" + summary: "" // Short summary of what the operation does. tags: [ - "Watch" + "Watch" // Adds an additional categorization for the operation. ] - operation_id: "watch.watch" + operation_id: "watch.watch" // Unique string used to identify the operation. }; } } -// WatchRequest +// WatchRequest is the request message for the Watch RPC. It contains the +// details needed to establish a watch stream. message WatchRequest { + + // Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. string tenant_id = 1 [json_name = "tenant_id", (validate.rules).string = { pattern : "[a-zA-Z0-9-,]+", max_bytes : 64, ignore_empty: false, }]; + // Snap token to be used for watching. string snap_token = 2 [json_name = "snap_token"]; } -// WatchResponse +// WatchResponse is the response message for the Watch RPC. It contains the +// changes in the data that are being watched. message WatchResponse { - TupleChanges changes = 1 [json_name = "changes"]; + + // Changes in the data. + DataChanges changes = 1 [json_name = "changes"]; } // ** SCHEMA SERVICE ** -// Schema +// Schema service provides methods to manage the authorization model of your application. +// It allows you to read and write the schema of your authorization model. + +// The Schema service definition. service Schema { + + // Write is an RPC that allows you to write your authorization model. rpc Write(SchemaWriteRequest) returns (SchemaWriteResponse) { + + // It maps to HTTP POST requests and the entire request message + // will be treated as the HTTP request body. option (google.api.http) = { - post: "/v1/tenants/{tenant_id}/schemas/write" - body: "*" + post: "/v1/tenants/{tenant_id}/schemas/write" // HTTP mapping: POST request to the /v1/tenants/{tenant_id}/schemas/write endpoint. + body: "*" // The entire request message will be the HTTP request body. }; + // OpenAPI specific annotation option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "write your authorization model" - tags: [ - "Schema" - ] - operation_id: "schemas.write" + summary: "write your authorization model" // Short summary of what the operation does. + tags: ["Schema"] // Adds an additional categorization for the operation. + operation_id: "schemas.write" // Unique string used to identify the operation. }; } + // Read is an RPC that allows you to read your authorization model. rpc Read(SchemaReadRequest) returns (SchemaReadResponse) { + + // It maps to HTTP POST requests and the entire request message + // will be treated as the HTTP request body. option (google.api.http) = { - post: "/v1/tenants/{tenant_id}/schemas/read" - body: "*" + post: "/v1/tenants/{tenant_id}/schemas/read" // HTTP mapping: POST request to the /v1/tenants/{tenant_id}/schemas/read endpoint. + body: "*" // The entire request message will be the HTTP request body. }; + // OpenAPI specific annotation option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "read your authorization model" - tags: [ - "Schema" - ] - operation_id: "schemas.read" + summary: "read your authorization model" // Short summary of what the operation does. + tags: ["Schema"] // Adds an additional categorization for the operation. + operation_id: "schemas.read" // Unique string used to identify the operation. }; } } // WRITE -// SchemaWriteRequest +// SchemaWriteRequest is the request message for the Write method in the Schema service. +// It contains tenant_id and the schema to be written. message SchemaWriteRequest { + + // tenant_id is a string that identifies the tenant. It must match the pattern "[a-zA-Z0-9-,]+", + // be a maximum of 64 bytes, and must not be empty. string tenant_id = 1 [json_name = "tenant_id", (validate.rules).string = { pattern : "[a-zA-Z0-9-,]+", max_bytes : 64, ignore_empty: false, }]; + // schema is the string representation of the schema to be written. string schema = 2 [json_name = "schema"]; } -// SchemaWriteResponse +// SchemaWriteResponse is the response message for the Write method in the Schema service. +// It returns the version of the written schema. message SchemaWriteResponse { + + // schema_version is the string that identifies the version of the written schema. string schema_version = 1 [json_name = "schema_version"]; } // READ -// SchemaReadRequest +// SchemaReadRequest is the request message for the Read method in the Schema service. +// It contains tenant_id and metadata about the schema to be read. message SchemaReadRequest { + + // tenant_id is a string that identifies the tenant. It must match the pattern "[a-zA-Z0-9-,]+", + // be a maximum of 64 bytes, and must not be empty. string tenant_id = 1 [json_name = "tenant_id", (validate.rules).string = { pattern : "[a-zA-Z0-9-,]+", max_bytes : 64, ignore_empty: false, }]; + // metadata is the additional information needed for the Read request. SchemaReadRequestMetadata metadata = 2 [json_name = "metadata", (validate.rules).message.required = true]; } -// SchemaReadRequestMetadata +// SchemaReadRequestMetadata provides additional information for the Schema Read request. +// It contains schema_version to specify which version of the schema should be read. message SchemaReadRequestMetadata { + + // schema_version is the string that identifies the version of the schema to be read. string schema_version = 1 [json_name = "schema_version"]; } -// SchemaReadRequest +// SchemaReadResponse is the response message for the Read method in the Schema service. +// It returns the requested schema. message SchemaReadResponse { + + // schema is the SchemaDefinition that represents the read schema. SchemaDefinition schema = 1 [json_name = "schema"]; } -// ** RELATIONSHIP SERVICE ** +// ** DATA SERVICE ** -// Schema -service Relationship { - rpc Write(RelationshipWriteRequest) returns (RelationshipWriteResponse) { +// The Data service provides RPC methods for managing data in the context of relationships and attributes. +service Data { + + // The Write RPC method creates a new relation tuple. + rpc Write(DataWriteRequest) returns (DataWriteResponse) { + option (google.api.http) = { + post: "/v1/tenants/{tenant_id}/data/write" + body: "*" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "create data" + tags: [ + "Data" + ] + operation_id: "data.write" + }; + } + + // RPC method to write relationships for a tenant. This can be accessed via a POST request to the given HTTP path. It's tagged under "Data" in OpenAPI documentation. + rpc WriteRelationships(RelationshipWriteRequest) returns (RelationshipWriteResponse) { option (google.api.http) = { post: "/v1/tenants/{tenant_id}/relationships/write" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "create new relation tuple" + summary: "create new relationships" tags: [ - "Relationship" + "Data" ] operation_id: "relationships.write" }; } - rpc Read(RelationshipReadRequest) returns (RelationshipReadResponse) { + // The ReadRelationships RPC method reads relation tuple(s). + rpc ReadRelationships(RelationshipReadRequest) returns (RelationshipReadResponse) { option (google.api.http) = { - post: "/v1/tenants/{tenant_id}/relationships/read" + post: "/v1/tenants/{tenant_id}/data/relationships/read" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { summary: "read relation tuple(s)" tags: [ - "Relationship" + "Data" ] - operation_id: "relationships.read" + operation_id: "data.relationships.read" }; } - rpc Delete(RelationshipDeleteRequest) returns (RelationshipDeleteResponse) { + // The ReadAttributes RPC method reads attribute(s) of a relation. + rpc ReadAttributes(AttributeReadRequest) returns (AttributeReadResponse) { + option (google.api.http) = { + post: "/v1/tenants/{tenant_id}/data/attributes/read" + body: "*" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "read attribute(s)" + tags: [ + "Data" + ] + operation_id: "data.attributes.read" + }; + } + + // The Delete RPC method deletes a relation tuple. + rpc Delete(DataDeleteRequest) returns (DataDeleteResponse) { + option (google.api.http) = { + post: "/v1/tenants/{tenant_id}/data/delete" + body: "*" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "delete data" + tags: [ + "Data" + ] + operation_id: "data.delete" + }; + } + + // RPC method to delete relationships for a tenant, accessed via a POST request to the specified path, tagged as "Data" in OpenAPI documentation. + rpc DeleteRelationships(RelationshipDeleteRequest) returns (RelationshipDeleteResponse) { option (google.api.http) = { post: "/v1/tenants/{tenant_id}/relationships/delete" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "delete relation tuple" + summary: "delete relationships" tags: [ - "Relationship" + "Data" ] operation_id: "relationships.delete" }; } } -// RelationshipWriteRequest +// DataWriteRequest defines the structure of a request for writing data. +// It contains the necessary information such as tenant_id, metadata, +// tuples and attributes for the write operation. +message DataWriteRequest { + // tenant_id represents the unique identifier of the tenant for which data is written. + string tenant_id = 1 [json_name = "tenant_id", (validate.rules).string = { + pattern : "[a-zA-Z0-9-,]+", + max_bytes : 64, + ignore_empty: false, + }]; + + // metadata holds additional data related to the request. + DataWriteRequestMetadata metadata = 2 [json_name = "metadata", (validate.rules).message.required = true]; + + // tuples contains the list of tuples (entity-relation-entity triples) that need to be written. + repeated Tuple tuples = 3 [json_name = "tuples", (validate.rules).repeated = { + min_items : 0, + max_items : 100, + items : { + message : { + required : true, + }, + }, + }]; + + // attributes contains the list of attributes (entity-attribute-value triples) that need to be written. + repeated Attribute attributes = 4 [json_name = "attributes", (validate.rules).repeated = { + min_items : 0, + max_items : 100, + items : { + message : { + required : true, + }, + }, + }]; +} + +// DataWriteRequestMetadata defines the structure of metadata for a write request. +// It includes the schema version of the data to be written. +message DataWriteRequestMetadata { + // schema_version represents the version of the schema for the data being written. + string schema_version = 1 [json_name = "schema_version"]; +} + +// DataWriteResponse defines the structure of the response after writing data. +// It contains the snap_token generated after the write operation. +message DataWriteResponse { + // snap_token is the token generated after the data write operation, representing a snapshot of the data. + string snap_token = 1 [json_name = "snap_token"]; +} + +// Represents a request to write relationship data. message RelationshipWriteRequest { + + // Unique identifier for the tenant with specific constraints. string tenant_id = 1 [json_name = "tenant_id", (validate.rules).string = { pattern : "[a-zA-Z0-9-,]+", max_bytes : 64, ignore_empty: false, }]; + // Metadata for the request. It's required. RelationshipWriteRequestMetadata metadata = 2 [json_name = "metadata", (validate.rules).message.required = true]; + // List of tuples for the request. Must have between 1 and 100 items. repeated Tuple tuples = 3 [json_name = "tuples", (validate.rules).repeated = { min_items : 1, max_items : 100, @@ -514,46 +778,127 @@ message RelationshipWriteResponse { string snap_token = 1 [json_name = "snap_token"]; } -// RelationshipReadRequest +// RelationshipReadRequest defines the structure of a request for reading relationships. +// It contains the necessary information such as tenant_id, metadata, and filter for the read operation. message RelationshipReadRequest { + // tenant_id represents the unique identifier of the tenant for which relationships are read. string tenant_id = 1 [json_name = "tenant_id", (validate.rules).string = { pattern : "[a-zA-Z0-9-,]+", max_bytes : 64, ignore_empty: false, }]; + // metadata holds additional data related to the request. RelationshipReadRequestMetadata metadata = 2 [json_name = "metadata", (validate.rules).message.required = true]; + // filter is used to specify criteria for the data that needs to be read. TupleFilter filter = 3 [json_name = "filter", (validate.rules).message.required = true]; + // page_size specifies the number of results to return in a single page. + // If more results are available, a continuous_token is included in the response. uint32 page_size = 4 [ json_name = "page_size", (validate.rules).uint32 = {gte: 1, lte: 100, ignore_empty: true} ]; + // continuous_token is used in case of paginated reads to get the next page of results. string continuous_token = 5 [json_name = "continuous_token", (validate.rules).string = {ignore_empty: true}]; } -// RelationshipWriteRequestMetadata +// RelationshipReadRequestMetadata defines the structure of the metadata for a read request focused on relationships. +// It includes the snap_token associated with a particular state of the database. message RelationshipReadRequestMetadata { + // snap_token represents a specific state or "snapshot" of the database. string snap_token = 1 [json_name = "snap_token"]; } -// RelationshipReadResponse +// RelationshipReadResponse defines the structure of the response after reading relationships. +// It includes the tuples representing the relationships and a continuous token for handling result pagination. message RelationshipReadResponse { + // tuples is a list of the relationships retrieved in the read operation, represented as entity-relation-entity triples. repeated Tuple tuples = 1 [json_name = "tuples"]; + + // continuous_token is used in the case of paginated reads to retrieve the next page of results. string continuous_token = 2 [json_name = "continuous_token"]; } +// AttributeReadRequest defines the structure of a request for reading attributes. +// It includes the tenant_id, metadata, attribute filter, page size for pagination, and a continuous token for multi-page results. +message AttributeReadRequest { + // tenant_id represents the unique identifier of the tenant from which the attributes are being read. + string tenant_id = 1 [json_name = "tenant_id", (validate.rules).string = { + pattern : "[a-zA-Z0-9-,]+", + max_bytes : 64, + ignore_empty: false, + }]; + + // metadata holds additional information related to the request. + AttributeReadRequestMetadata metadata = 2 [json_name = "metadata", (validate.rules).message.required = true]; + + // filter specifies the criteria used to select the attributes that should be returned. + AttributeFilter filter = 3 [json_name = "filter", (validate.rules).message.required = true]; + + // page_size specifies the number of results to return in a single page. + // If more results are available, a continuous_token is included in the response. + uint32 page_size = 4 [ + json_name = "page_size", + (validate.rules).uint32 = {gte: 1, lte: 100, ignore_empty: true} + ]; + + // continuous_token is used in case of paginated reads to get the next page of results. + string continuous_token = 5 [json_name = "continuous_token", (validate.rules).string = {ignore_empty: true}]; +} + +// AttributeReadRequestMetadata defines the structure for the metadata of an attribute read request. +// It includes the snap_token associated with a particular state of the database. +message AttributeReadRequestMetadata { + // snap_token represents a specific state or "snapshot" of the database. + string snap_token = 1 [json_name = "snap_token"]; +} + +// AttributeReadResponse defines the structure of the response to an attribute read request. +// It includes the attributes retrieved and a continuous token for handling result pagination. +message AttributeReadResponse { + // attributes is a list of the attributes retrieved in the read operation. + repeated Attribute attributes = 1 [json_name = "attributes"]; + + // continuous_token is used in the case of paginated reads to retrieve the next page of results. + string continuous_token = 2 [json_name = "continuous_token"]; +} + +// DataDeleteRequest defines the structure of a request to delete data. +// It includes the tenant_id and filters for selecting tuples and attributes to be deleted. +message DataDeleteRequest { + // tenant_id represents the unique identifier of the tenant from which the data will be deleted. + string tenant_id = 1 [json_name = "tenant_id", (validate.rules).string = { + pattern : "[a-zA-Z0-9-,]+", + max_bytes : 64, + ignore_empty: false, + }]; + + // tuple_filter specifies the criteria used to select the tuples that should be deleted. + TupleFilter tuple_filter = 2 [json_name = "tuple_filter", (validate.rules).message.required = true]; + + // attribute_filter specifies the criteria used to select the attributes that should be deleted. + AttributeFilter attribute_filter = 3 [json_name = "attribute_filter", (validate.rules).message.required = true]; +} + +// DataDeleteResponse defines the structure of the response to a data delete request. +// It includes a snap_token representing the state of the database after the deletion. +message DataDeleteResponse { + // snap_token represents the state of the database after the requested deletions. + string snap_token = 1 [json_name = "snap_token"]; +} + // RelationshipDeleteRequest message RelationshipDeleteRequest { string tenant_id = 1 [json_name = "tenant_id", (validate.rules).string = { - pattern : "[a-zA-Z0-9-,]+", + pattern: "^[a-zA-Z0-9]+$", max_bytes : 64, ignore_empty: false, }]; - TupleFilter filter = 2 [json_name = "filter", (validate.rules).message.required = true]; + TupleFilter filter = 2 [json_name = "filter"]; } // RelationshipDeleteResponse @@ -562,8 +907,11 @@ message RelationshipDeleteResponse { } // ** TENANCY SERVICE ** +// The Tenancy service defines the gRPC methods for managing tenants. service Tenancy { + // Create is a unary RPC to create a new tenant. + // It requires a TenantCreateRequest and returns a TenantCreateResponse. rpc Create(TenantCreateRequest) returns (TenantCreateResponse) { option (google.api.http) = { post: "/v1/tenants/create" @@ -579,6 +927,8 @@ service Tenancy { }; } + // Delete is a unary RPC to delete an existing tenant. + // It requires a TenantDeleteRequest and returns a TenantDeleteResponse. rpc Delete(TenantDeleteRequest) returns (TenantDeleteResponse) { option (google.api.http) = { delete: "/v1/tenants/{id}" @@ -593,6 +943,8 @@ service Tenancy { }; } + // List is a unary RPC to get a list of all tenants. + // It requires a TenantListRequest and returns a TenantListResponse. rpc List(TenantListRequest) returns (TenantListResponse) { option (google.api.http) = { post: "/v1/tenants/list" @@ -609,49 +961,61 @@ service Tenancy { } } -// TenantCreateRequest +// TenantCreateRequest is the message used for the request to create a tenant. message TenantCreateRequest { + // id is a unique identifier for the tenant. string id = 1 [json_name = "id", (validate.rules).string = { pattern : "[a-zA-Z0-9-,]+", max_bytes : 64, ignore_empty: false, }]; + // name is the name of the tenant. string name = 2 [json_name = "name", (validate.rules).string = { max_bytes : 64, ignore_empty: false, }]; } -// TenantCreateResponse +// TenantCreateResponse is the message returned from the request to create a tenant. message TenantCreateResponse { + // tenant is the created tenant information. Tenant tenant = 1 [json_name = "tenant"]; } -// TenantDeleteRequest +// TenantDeleteRequest is the message used for the request to delete a tenant. message TenantDeleteRequest { + // id is the unique identifier of the tenant to be deleted. string id = 1 [json_name = "id", (validate.rules).string = { ignore_empty: false, }]; } -// TenantDeleteResponse +// TenantDeleteResponse is the message returned from the request to delete a tenant. message TenantDeleteResponse { + // tenant is the tenant information that was deleted. Tenant tenant = 1 [json_name = "tenant"]; } -// TenantListRequest +// TenantListRequest is the message used for the request to list all tenants. message TenantListRequest { + // page_size is the number of tenants to be returned in the response. + // The value should be between 1 and 100. uint32 page_size = 1 [ json_name = "page_size", (validate.rules).uint32 = {gte: 1, lte: 100, ignore_empty: true} ]; + // continuous_token is an optional parameter used for pagination. + // It should be the value received in the previous response. string continuous_token = 2 [json_name = "continuous_token", (validate.rules).string = {ignore_empty: true}]; } -// TenantListResponse +// TenantListResponse is the message returned from the request to list all tenants. message TenantListResponse { + // tenants is a list of tenants. repeated Tenant tenants = 1 [json_name = "tenants"]; + + // continuous_token is a string that can be used to paginate and retrieve the next set of results. string continuous_token = 2 [json_name = "continuous_token"]; } diff --git a/v1/client.go b/v1/client.go index 13061d8..087ce33 100644 --- a/v1/client.go +++ b/v1/client.go @@ -8,11 +8,11 @@ import ( // Client - Permify client type Client struct { - Permission v1.PermissionClient - Schema v1.SchemaClient - Relationship v1.RelationshipClient - Tenancy v1.TenancyClient - Watch v1.WatchClient + Permission v1.PermissionClient + Schema v1.SchemaClient + Data v1.DataClient + Tenancy v1.TenancyClient + Watch v1.WatchClient } // Config - Permify client configuration @@ -32,10 +32,10 @@ func NewClient(c Config, opts ...grpc.DialOption) (*Client, error) { } return &Client{ - Permission: v1.NewPermissionClient(conn), - Schema: v1.NewSchemaClient(conn), - Relationship: v1.NewRelationshipClient(conn), - Tenancy: v1.NewTenancyClient(conn), - Watch: v1.NewWatchClient(conn), + Permission: v1.NewPermissionClient(conn), + Schema: v1.NewSchemaClient(conn), + Data: v1.NewDataClient(conn), + Tenancy: v1.NewTenancyClient(conn), + Watch: v1.NewWatchClient(conn), }, nil } diff --git a/v1/client_test.go b/v1/client_test.go index 524344c..30a48b2 100644 --- a/v1/client_test.go +++ b/v1/client_test.go @@ -68,7 +68,7 @@ var _ = Describe("Client Test", func() { }) Expect(err).ShouldNot(HaveOccurred()) - Expect(cr.Can).Should(Equal(v1.CheckResult_RESULT_DENIED)) + Expect(cr.Can).Should(Equal(v1.CheckResult_CHECK_RESULT_DENIED)) }) It("Lookup entity request", func() { @@ -84,7 +84,7 @@ var _ = Describe("Client Test", func() { }`, }) - rr, err := client.Relationship.Write(context.Background(), &v1.RelationshipWriteRequest{ + rr, err := client.Data.WriteRelationships(context.Background(), &v1.RelationshipWriteRequest{ TenantId: "t1", Metadata: &v1.RelationshipWriteRequestMetadata{ SchemaVersion: wr.SchemaVersion,